blob: 7dab8975f1a56de969ebcfe0c29779a4b16762ad [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Matthias Klose3cef2a92012-03-14 23:39:33 +01002# From configure.ac Revision.
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004# Generated by GNU Autoconf 2.69 for python 2.7.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Georg Brandl464432d2009-05-20 18:24:08 +00006# Report bugs to <http://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00007#
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008#
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010#
11#
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012# This configure script is free software; the Free Software Foundation
13# gives unlimited permission to copy, distribute and modify it.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014## -------------------- ##
15## M4sh Initialization. ##
16## -------------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +000017
Martin v. Löwiseba40652007-08-30 20:10:57 +000018# Be more Bourne compatible
19DUALCASE=1; export DUALCASE # for MKS sh
Matthias Klosea0bea5d2010-05-08 10:00:28 +000020if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000021 emulate sh
22 NULLCMD=:
Matthias Klosea0bea5d2010-05-08 10:00:28 +000023 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000024 # is contrary to our usage. Disable this feature.
25 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000026 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000027else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000028 case `(set -o) 2>/dev/null` in #(
29 *posix*) :
30 set -o posix ;; #(
31 *) :
32 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000033esac
Martin v. Löwis11437992002-04-12 09:54:03 +000034fi
35
Skip Montanaro6dead952003-09-25 14:50:04 +000036
Matthias Klosea0bea5d2010-05-08 10:00:28 +000037as_nl='
38'
39export as_nl
40# Printing a long string crashes Solaris 7 /usr/bin/printf.
41as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
42as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
43as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
44# Prefer a ksh shell builtin over an external printf program on Solaris,
45# but without wasting forks for bash or zsh.
46if test -z "$BASH_VERSION$ZSH_VERSION" \
47 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
48 as_echo='print -r --'
49 as_echo_n='print -rn --'
50elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
51 as_echo='printf %s\n'
52 as_echo_n='printf %s'
53else
54 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
55 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
56 as_echo_n='/usr/ucb/echo -n'
57 else
58 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
59 as_echo_n_body='eval
60 arg=$1;
61 case $arg in #(
62 *"$as_nl"*)
63 expr "X$arg" : "X\\(.*\\)$as_nl";
64 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
65 esac;
66 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
67 '
68 export as_echo_n_body
69 as_echo_n='sh -c $as_echo_n_body as_echo'
70 fi
71 export as_echo_body
72 as_echo='sh -c $as_echo_body as_echo'
73fi
Martin v. Löwis11437992002-04-12 09:54:03 +000074
75# The user is always right.
76if test "${PATH_SEPARATOR+set}" != set; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000077 PATH_SEPARATOR=:
78 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
79 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
80 PATH_SEPARATOR=';'
81 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000082fi
Martin v. Löwis11437992002-04-12 09:54:03 +000083
Martin v. Löwiseba40652007-08-30 20:10:57 +000084
85# IFS
86# We need space, tab and new line, in precisely that order. Quoting is
87# there to prevent editors from complaining about space-tab.
88# (If _AS_PATH_WALK were called with IFS unset, it would disable word
89# splitting by setting IFS to empty value.)
Martin v. Löwiseba40652007-08-30 20:10:57 +000090IFS=" "" $as_nl"
91
92# Find who we are. Look in the path if we contain no directory separator.
Matthias Klose3cef2a92012-03-14 23:39:33 +010093as_myself=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000094case $0 in #((
Martin v. Löwiseba40652007-08-30 20:10:57 +000095 *[\\/]* ) as_myself=$0 ;;
96 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000097for as_dir in $PATH
98do
99 IFS=$as_save_IFS
100 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000101 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
102 done
Martin v. Löwiseba40652007-08-30 20:10:57 +0000103IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +0000104
Martin v. Löwiseba40652007-08-30 20:10:57 +0000105 ;;
106esac
107# We did not find ourselves, most probably we were run as `sh COMMAND'
108# in which case we are not to be found in the path.
109if test "x$as_myself" = x; then
110 as_myself=$0
111fi
112if test ! -f "$as_myself"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000113 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
114 exit 1
Martin v. Löwiseba40652007-08-30 20:10:57 +0000115fi
116
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000117# Unset variables that we do not need and which cause bugs (e.g. in
118# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
119# suppresses any "Segmentation fault" message there. '((' could
120# trigger a bug in pdksh 5.2.14.
121for as_var in BASH_ENV ENV MAIL MAILPATH
122do eval test x\${$as_var+set} = xset \
123 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Martin v. Löwiseba40652007-08-30 20:10:57 +0000124done
125PS1='$ '
126PS2='> '
127PS4='+ '
128
129# NLS nuisances.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000130LC_ALL=C
131export LC_ALL
132LANGUAGE=C
133export LANGUAGE
Martin v. Löwiseba40652007-08-30 20:10:57 +0000134
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000135# CDPATH.
136(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
137
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100138# Use a proper internal environment variable to ensure we don't fall
139 # into an infinite loop, continuously re-executing ourselves.
140 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
141 _as_can_reexec=no; export _as_can_reexec;
142 # We cannot yet assume a decent shell, so we have to provide a
143# neutralization value for shells without unset; and this also
144# works around shells that cannot unset nonexistent variables.
145# Preserve -v and -x to the replacement shell.
146BASH_ENV=/dev/null
147ENV=/dev/null
148(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
149case $- in # ((((
150 *v*x* | *x*v* ) as_opts=-vx ;;
151 *v* ) as_opts=-v ;;
152 *x* ) as_opts=-x ;;
153 * ) as_opts= ;;
154esac
155exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
156# Admittedly, this is quite paranoid, since all the known shells bail
157# out after a failed `exec'.
158$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
159as_fn_exit 255
160 fi
161 # We don't want this to propagate to other subprocesses.
162 { _as_can_reexec=; unset _as_can_reexec;}
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000163if test "x$CONFIG_SHELL" = x; then
164 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
165 emulate sh
166 NULLCMD=:
167 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
168 # is contrary to our usage. Disable this feature.
169 alias -g '\${1+\"\$@\"}'='\"\$@\"'
170 setopt NO_GLOB_SUBST
171else
172 case \`(set -o) 2>/dev/null\` in #(
173 *posix*) :
174 set -o posix ;; #(
175 *) :
176 ;;
177esac
178fi
179"
180 as_required="as_fn_return () { (exit \$1); }
181as_fn_success () { as_fn_return 0; }
182as_fn_failure () { as_fn_return 1; }
183as_fn_ret_success () { return 0; }
184as_fn_ret_failure () { return 1; }
185
186exitcode=0
187as_fn_success || { exitcode=1; echo as_fn_success failed.; }
188as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
189as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
190as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
191if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
192
193else
194 exitcode=1; echo positional parameters were not saved.
195fi
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100196test x\$exitcode = x0 || exit 1
197test -x / || exit 1"
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000198 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
199 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
200 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
201 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
202test \$(( 1 + 1 )) = 2 || exit 1"
203 if (eval "$as_required") 2>/dev/null; then :
204 as_have_required=yes
205else
206 as_have_required=no
207fi
208 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
209
210else
211 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
212as_found=false
213for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
214do
215 IFS=$as_save_IFS
216 test -z "$as_dir" && as_dir=.
217 as_found=:
218 case $as_dir in #(
219 /*)
220 for as_base in sh bash ksh sh5; do
221 # Try only shells that exist, to save several forks.
222 as_shell=$as_dir/$as_base
223 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
224 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
225 CONFIG_SHELL=$as_shell as_have_required=yes
226 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
227 break 2
228fi
229fi
230 done;;
231 esac
232 as_found=false
233done
234$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
235 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
236 CONFIG_SHELL=$SHELL as_have_required=yes
237fi; }
238IFS=$as_save_IFS
239
240
241 if test "x$CONFIG_SHELL" != x; then :
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100242 export CONFIG_SHELL
243 # We cannot yet assume a decent shell, so we have to provide a
244# neutralization value for shells without unset; and this also
245# works around shells that cannot unset nonexistent variables.
246# Preserve -v and -x to the replacement shell.
247BASH_ENV=/dev/null
248ENV=/dev/null
249(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
250case $- in # ((((
251 *v*x* | *x*v* ) as_opts=-vx ;;
252 *v* ) as_opts=-v ;;
253 *x* ) as_opts=-x ;;
254 * ) as_opts= ;;
255esac
256exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
257# Admittedly, this is quite paranoid, since all the known shells bail
258# out after a failed `exec'.
259$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
260exit 255
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000261fi
262
263 if test x$as_have_required = xno; then :
264 $as_echo "$0: This script requires a shell more modern than all"
265 $as_echo "$0: the shells that I found on your system."
266 if test x${ZSH_VERSION+set} = xset ; then
267 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
268 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
269 else
270 $as_echo "$0: Please tell bug-autoconf@gnu.org and
271$0: http://bugs.python.org/ about your system, including
272$0: any error possibly output before this message. Then
273$0: install a modern shell, or manually run the script
274$0: under such a shell if you do have one."
275 fi
276 exit 1
277fi
278fi
279fi
280SHELL=${CONFIG_SHELL-/bin/sh}
281export SHELL
282# Unset more variables known to interfere with behavior of common tools.
283CLICOLOR_FORCE= GREP_OPTIONS=
284unset CLICOLOR_FORCE GREP_OPTIONS
285
286## --------------------- ##
287## M4sh Shell Functions. ##
288## --------------------- ##
289# as_fn_unset VAR
290# ---------------
291# Portably unset VAR.
292as_fn_unset ()
293{
294 { eval $1=; unset $1;}
295}
296as_unset=as_fn_unset
297
298# as_fn_set_status STATUS
299# -----------------------
300# Set $? to STATUS, without forking.
301as_fn_set_status ()
302{
303 return $1
304} # as_fn_set_status
305
306# as_fn_exit STATUS
307# -----------------
308# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
309as_fn_exit ()
310{
311 set +e
312 as_fn_set_status $1
313 exit $1
314} # as_fn_exit
315
316# as_fn_mkdir_p
317# -------------
318# Create "$as_dir" as a directory, including parents if necessary.
319as_fn_mkdir_p ()
320{
321
322 case $as_dir in #(
323 -*) as_dir=./$as_dir;;
324 esac
325 test -d "$as_dir" || eval $as_mkdir_p || {
326 as_dirs=
327 while :; do
328 case $as_dir in #(
329 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
330 *) as_qdir=$as_dir;;
331 esac
332 as_dirs="'$as_qdir' $as_dirs"
333 as_dir=`$as_dirname -- "$as_dir" ||
334$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
335 X"$as_dir" : 'X\(//\)[^/]' \| \
336 X"$as_dir" : 'X\(//\)$' \| \
337 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
338$as_echo X"$as_dir" |
339 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
340 s//\1/
341 q
342 }
343 /^X\(\/\/\)[^/].*/{
344 s//\1/
345 q
346 }
347 /^X\(\/\/\)$/{
348 s//\1/
349 q
350 }
351 /^X\(\/\).*/{
352 s//\1/
353 q
354 }
355 s/.*/./; q'`
356 test -d "$as_dir" && break
357 done
358 test -z "$as_dirs" || eval "mkdir $as_dirs"
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000359 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000360
361
362} # as_fn_mkdir_p
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100363
364# as_fn_executable_p FILE
365# -----------------------
366# Test if FILE is an executable regular file.
367as_fn_executable_p ()
368{
369 test -f "$1" && test -x "$1"
370} # as_fn_executable_p
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000371# as_fn_append VAR VALUE
372# ----------------------
373# Append the text in VALUE to the end of the definition contained in VAR. Take
374# advantage of any shell optimizations that allow amortized linear growth over
375# repeated appends, instead of the typical quadratic growth present in naive
376# implementations.
377if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
378 eval 'as_fn_append ()
379 {
380 eval $1+=\$2
381 }'
382else
383 as_fn_append ()
384 {
385 eval $1=\$$1\$2
386 }
387fi # as_fn_append
388
389# as_fn_arith ARG...
390# ------------------
391# Perform arithmetic evaluation on the ARGs, and store the result in the
392# global $as_val. Take advantage of shells that can avoid forks. The arguments
393# must be portable across $(()) and expr.
394if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
395 eval 'as_fn_arith ()
396 {
397 as_val=$(( $* ))
398 }'
399else
400 as_fn_arith ()
401 {
402 as_val=`expr "$@" || test $? -eq 1`
403 }
404fi # as_fn_arith
405
406
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000407# as_fn_error STATUS ERROR [LINENO LOG_FD]
408# ----------------------------------------
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000409# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
410# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000411# script with STATUS, using 1 if that was 0.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000412as_fn_error ()
413{
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000414 as_status=$1; test $as_status -eq 0 && as_status=1
415 if test "$4"; then
416 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
417 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000418 fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000419 $as_echo "$as_me: error: $2" >&2
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000420 as_fn_exit $as_status
421} # as_fn_error
422
Martin v. Löwiseba40652007-08-30 20:10:57 +0000423if expr a : '\(a\)' >/dev/null 2>&1 &&
424 test "X`expr 00001 : '.*\(...\)'`" = X001; then
425 as_expr=expr
426else
427 as_expr=false
428fi
429
430if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
431 as_basename=basename
432else
433 as_basename=false
434fi
435
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000436if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
437 as_dirname=dirname
438else
439 as_dirname=false
440fi
Martin v. Löwiseba40652007-08-30 20:10:57 +0000441
Martin v. Löwiseba40652007-08-30 20:10:57 +0000442as_me=`$as_basename -- "$0" ||
443$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
444 X"$0" : 'X\(//\)$' \| \
445 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000446$as_echo X/"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +0000447 sed '/^.*\/\([^/][^/]*\)\/*$/{
448 s//\1/
449 q
450 }
451 /^X\/\(\/\/\)$/{
452 s//\1/
453 q
454 }
455 /^X\/\(\/\).*/{
456 s//\1/
457 q
458 }
459 s/.*/./; q'`
460
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000461# Avoid depending upon Character Ranges.
462as_cr_letters='abcdefghijklmnopqrstuvwxyz'
463as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
464as_cr_Letters=$as_cr_letters$as_cr_LETTERS
465as_cr_digits='0123456789'
466as_cr_alnum=$as_cr_Letters$as_cr_digits
Martin v. Löwiseba40652007-08-30 20:10:57 +0000467
468
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000469 as_lineno_1=$LINENO as_lineno_1a=$LINENO
470 as_lineno_2=$LINENO as_lineno_2a=$LINENO
471 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
472 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
473 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
Martin v. Löwiseba40652007-08-30 20:10:57 +0000474 sed -n '
475 p
476 /[$]LINENO/=
477 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000478 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +0000479 s/[$]LINENO.*/&-/
480 t lineno
481 b
482 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000483 N
Martin v. Löwiseba40652007-08-30 20:10:57 +0000484 :loop
485 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000486 t loop
Martin v. Löwiseba40652007-08-30 20:10:57 +0000487 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000488 ' >$as_me.lineno &&
Martin v. Löwiseba40652007-08-30 20:10:57 +0000489 chmod +x "$as_me.lineno" ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000490 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
Martin v. Löwis11437992002-04-12 09:54:03 +0000491
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100492 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
493 # already done that, so ensure we don't try to do so again and fall
494 # in an infinite loop. This has already happened in practice.
495 _as_can_reexec=no; export _as_can_reexec
Martin v. Löwis11437992002-04-12 09:54:03 +0000496 # Don't try to exec as it changes $[0], causing all sort of problems
497 # (the dirname of $[0] is not the place where we might find the
Martin v. Löwiseba40652007-08-30 20:10:57 +0000498 # original and so on. Autoconf is especially sensitive to this).
499 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000500 # Exit status is that of the last command.
501 exit
502}
503
Martin v. Löwiseba40652007-08-30 20:10:57 +0000504ECHO_C= ECHO_N= ECHO_T=
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000505case `echo -n x` in #(((((
Martin v. Löwiseba40652007-08-30 20:10:57 +0000506-n*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000507 case `echo 'xy\c'` in
Martin v. Löwiseba40652007-08-30 20:10:57 +0000508 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000509 xy) ECHO_C='\c';;
510 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
511 ECHO_T=' ';;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000512 esac;;
513*)
514 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000515esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000516
Martin v. Löwis11437992002-04-12 09:54:03 +0000517rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +0000518if test -d conf$$.dir; then
519 rm -f conf$$.dir/conf$$.file
520else
521 rm -f conf$$.dir
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000522 mkdir conf$$.dir 2>/dev/null
Martin v. Löwiseba40652007-08-30 20:10:57 +0000523fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000524if (echo >conf$$.file) 2>/dev/null; then
525 if ln -s conf$$.file conf$$ 2>/dev/null; then
526 as_ln_s='ln -s'
527 # ... but there are two gotchas:
528 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
529 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100530 # In both cases, we have to default to `cp -pR'.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000531 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100532 as_ln_s='cp -pR'
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000533 elif ln conf$$.file conf$$ 2>/dev/null; then
534 as_ln_s=ln
535 else
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100536 as_ln_s='cp -pR'
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000537 fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000538else
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100539 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +0000540fi
Martin v. Löwiseba40652007-08-30 20:10:57 +0000541rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
542rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000543
Skip Montanaro6dead952003-09-25 14:50:04 +0000544if mkdir -p . 2>/dev/null; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000545 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +0000546else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000547 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000548 as_mkdir_p=false
549fi
550
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100551as_test_x='test -x'
552as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +0000553
554# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000555as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000556
557# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000558as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000559
560
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000561test -n "$DJDIR" || exec 7<&0 </dev/null
562exec 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000563
564# Name of the host.
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000565# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
Martin v. Löwis11437992002-04-12 09:54:03 +0000566# so uname gets run too.
567ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
568
Martin v. Löwis11437992002-04-12 09:54:03 +0000569#
570# Initializations.
571#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000572ac_default_prefix=/usr/local
Martin v. Löwiseba40652007-08-30 20:10:57 +0000573ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000574ac_config_libobj_dir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000575LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000576cross_compiling=no
577subdirs=
578MFLAGS=
579MAKEFLAGS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000580
Martin v. Löwis11437992002-04-12 09:54:03 +0000581# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000582PACKAGE_NAME='python'
583PACKAGE_TARNAME='python'
Martin v. Löwis174440b2008-10-03 08:59:41 +0000584PACKAGE_VERSION='2.7'
585PACKAGE_STRING='python 2.7'
Georg Brandl464432d2009-05-20 18:24:08 +0000586PACKAGE_BUGREPORT='http://bugs.python.org/'
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000587PACKAGE_URL=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000588
589ac_unique_file="Include/object.h"
590# Factoring default headers for most tests.
591ac_includes_default="\
592#include <stdio.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +0000593#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000594# include <sys/types.h>
595#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000596#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000597# include <sys/stat.h>
598#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000599#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000600# include <stdlib.h>
601# include <stddef.h>
602#else
Martin v. Löwiseba40652007-08-30 20:10:57 +0000603# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000604# include <stdlib.h>
605# endif
606#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000607#ifdef HAVE_STRING_H
608# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000609# include <memory.h>
610# endif
611# include <string.h>
612#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000613#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000614# include <strings.h>
615#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000616#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000617# include <inttypes.h>
Martin v. Löwis11437992002-04-12 09:54:03 +0000618#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000619#ifdef HAVE_STDINT_H
620# include <stdint.h>
621#endif
622#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000623# include <unistd.h>
624#endif"
625
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000626ac_subst_vars='LTLIBOBJS
Ned Deily3f1d0b32014-11-20 02:11:03 -0800627ENSUREPIP
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000628SRCDIRS
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000629THREADHEADERS
630UNICODE_OBJS
631LIBC
632LIBM
633HAVE_GETHOSTBYNAME
634HAVE_GETHOSTBYNAME_R
635HAVE_GETHOSTBYNAME_R_3_ARG
636HAVE_GETHOSTBYNAME_R_5_ARG
637HAVE_GETHOSTBYNAME_R_6_ARG
638LIBOBJS
639TRUE
640MACHDEP_OBJS
641DYNLOADFILE
642DLINCLDIR
643THREADOBJ
644LDLAST
645USE_THREAD_MODULE
646SIGNAL_OBJS
647USE_SIGNAL_MODULE
Ned Deilya2a9f572013-10-25 00:30:10 -0700648TCLTK_LIBS
649TCLTK_INCLUDES
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000650LIBFFI_INCLUDEDIR
Benjamin Peterson64e8f6e2014-12-15 00:00:23 -0500651PKG_CONFIG_LIBDIR
652PKG_CONFIG_PATH
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000653PKG_CONFIG
654SHLIBS
655CFLAGSFORSHARED
656LINKFORSHARED
657CCSHARED
658BLDSHARED
659LDCXXSHARED
660LDSHARED
661SO
662LIBTOOL_CRUFT
663OTHER_LIBTOOL_OPT
Brett Cannon4ff151a2015-09-18 15:09:42 -0700664LLVM_PROF_FOUND
665LLVM_PROF_ERR
666LLVM_PROF_FILE
667LLVM_PROF_MERGER
668PGO_PROF_USE_FLAG
669PGO_PROF_GEN_FLAG
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000670UNIVERSAL_ARCH_FLAGS
671BASECFLAGS
672OPT
673LN
Trent Nelsonf6407a12012-08-30 14:56:13 +0000674MKDIR_P
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000675INSTALL_DATA
676INSTALL_SCRIPT
677INSTALL_PROGRAM
Georg Brandl3a5508e2011-03-06 10:42:21 +0100678HAS_HG
679HGBRANCH
680HGTAG
681HGVERSION
Trent Nelsond86ceec2012-10-16 09:42:45 -0400682BASECPPFLAGS
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000683SVNVERSION
684ARFLAGS
doko@python.orgd65e2ba2013-01-31 23:52:03 +0100685ac_ct_AR
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000686AR
687RANLIB
688GNULD
689LINKCC
690RUNSHARED
691INSTSONAME
692LDLIBRARYDIR
693BLDLIBRARY
694DLLLIBRARY
695LDLIBRARY
696LIBRARY
697BUILDEXEEXT
698EGREP
699GREP
700CPP
doko@python.org4e63fbe2013-01-25 13:08:27 +0100701MULTIARCH
doko@python.orgd65e2ba2013-01-31 23:52:03 +0100702ac_ct_CXX
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000703MAINCC
704CXX
705OBJEXT
706EXEEXT
707ac_ct_CC
708CPPFLAGS
709LDFLAGS
710CFLAGS
711CC
712EXPORT_MACOSX_DEPLOYMENT_TARGET
713CONFIGURE_MACOSX_DEPLOYMENT_TARGET
714EXTRAMACHDEPPATH
715EXTRAPLATDIR
doko@ubuntu.coma50b0de2015-04-13 21:55:59 +0200716PLATDIR
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000717SGI_ABI
doko@python.orgd65e2ba2013-01-31 23:52:03 +0100718_PYTHON_HOST_PLATFORM
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000719MACHDEP
720FRAMEWORKINSTALLAPPSPREFIX
721FRAMEWORKUNIXTOOLSPREFIX
722FRAMEWORKALTINSTALLLAST
723FRAMEWORKALTINSTALLFIRST
724FRAMEWORKINSTALLLAST
725FRAMEWORKINSTALLFIRST
726PYTHONFRAMEWORKINSTALLDIR
727PYTHONFRAMEWORKPREFIX
728PYTHONFRAMEWORKDIR
729PYTHONFRAMEWORKIDENTIFIER
730PYTHONFRAMEWORK
731LIPO_32BIT_FLAGS
732ARCH_RUN_32BIT
733UNIVERSALSDK
734CONFIG_ARGS
735SOVERSION
736VERSION
doko@python.orgd65e2ba2013-01-31 23:52:03 +0100737PYTHON_FOR_BUILD
738host_os
739host_vendor
740host_cpu
741host
742build_os
743build_vendor
744build_cpu
745build
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000746target_alias
747host_alias
748build_alias
749LIBS
750ECHO_T
751ECHO_N
752ECHO_C
753DEFS
754mandir
755localedir
756libdir
757psdir
758pdfdir
759dvidir
760htmldir
761infodir
762docdir
763oldincludedir
764includedir
765localstatedir
766sharedstatedir
767sysconfdir
768datadir
769datarootdir
770libexecdir
771sbindir
772bindir
773program_transform_name
774prefix
775exec_prefix
776PACKAGE_URL
777PACKAGE_BUGREPORT
778PACKAGE_STRING
779PACKAGE_VERSION
780PACKAGE_TARNAME
781PACKAGE_NAME
782PATH_SEPARATOR
783SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000784ac_subst_files=''
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000785ac_user_opts='
786enable_option_checking
787enable_universalsdk
788with_universal_archs
789with_framework_name
790enable_framework
791with_gcc
792with_cxx_main
793with_suffix
794enable_shared
795enable_profiling
796with_pydebug
797enable_toolbox_glue
798with_libs
799with_system_expat
800with_system_ffi
Ned Deilya2a9f572013-10-25 00:30:10 -0700801with_tcltk_includes
802with_tcltk_libs
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000803with_dbmliborder
804with_signal_module
805with_dec_threads
806with_threads
807with_thread
808with_pth
809enable_ipv6
810with_doc_strings
811with_tsc
812with_pymalloc
813with_valgrind
814with_wctype_functions
815with_fpectl
816with_libm
817with_libc
818enable_big_digits
819enable_unicode
Benjamin Peterson2c992a02015-05-28 12:45:31 -0500820with_computed_gotos
Ned Deily3f1d0b32014-11-20 02:11:03 -0800821with_ensurepip
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000822'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000823 ac_precious_vars='build_alias
824host_alias
825target_alias
826CC
827CFLAGS
828LDFLAGS
829LIBS
830CPPFLAGS
Benjamin Peterson64e8f6e2014-12-15 00:00:23 -0500831CPP
832PKG_CONFIG
833PKG_CONFIG_PATH
834PKG_CONFIG_LIBDIR'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000835
Guido van Rossum627b2d71993-12-24 10:39:16 +0000836
Guido van Rossum7f43da71994-08-01 12:15:30 +0000837# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000838ac_init_help=
839ac_init_version=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000840ac_unrecognized_opts=
841ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000842# The variables have the same names as the options, with
843# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000844cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000845exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000846no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000847no_recursion=
848prefix=NONE
849program_prefix=NONE
850program_suffix=NONE
851program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000852silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000853site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000854srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000855verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000856x_includes=NONE
857x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000858
859# Installation directory options.
860# These are left unexpanded so users can "make install exec_prefix=/foo"
861# and all the variables that are supposed to be based on exec_prefix
862# by default will actually change.
863# Use braces instead of parens because sh, perl, etc. also accept them.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000864# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000865bindir='${exec_prefix}/bin'
866sbindir='${exec_prefix}/sbin'
867libexecdir='${exec_prefix}/libexec'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000868datarootdir='${prefix}/share'
869datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000870sysconfdir='${prefix}/etc'
871sharedstatedir='${prefix}/com'
872localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000873includedir='${prefix}/include'
874oldincludedir='/usr/include'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000875docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
876infodir='${datarootdir}/info'
877htmldir='${docdir}'
878dvidir='${docdir}'
879pdfdir='${docdir}'
880psdir='${docdir}'
881libdir='${exec_prefix}/lib'
882localedir='${datarootdir}/locale'
883mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000884
Guido van Rossum7f43da71994-08-01 12:15:30 +0000885ac_prev=
Martin v. Löwiseba40652007-08-30 20:10:57 +0000886ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000887for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000888do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000889 # If the previous option needs an argument, assign it.
890 if test -n "$ac_prev"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +0000891 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000892 ac_prev=
893 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000894 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000895
Martin v. Löwiseba40652007-08-30 20:10:57 +0000896 case $ac_option in
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000897 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
898 *=) ac_optarg= ;;
899 *) ac_optarg=yes ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000900 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000901
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000902 # Accept the important Cygnus configure options, so we can diagnose typos.
903
Martin v. Löwiseba40652007-08-30 20:10:57 +0000904 case $ac_dashdash$ac_option in
905 --)
906 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000907
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000908 -bindir | --bindir | --bindi | --bind | --bin | --bi)
909 ac_prev=bindir ;;
910 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000911 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000912
913 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000914 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000915 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000916 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000917
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000918 -cache-file | --cache-file | --cache-fil | --cache-fi \
919 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
920 ac_prev=cache_file ;;
921 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
922 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000923 cache_file=$ac_optarg ;;
924
925 --config-cache | -C)
926 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000927
Martin v. Löwiseba40652007-08-30 20:10:57 +0000928 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000929 ac_prev=datadir ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000930 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000931 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000932
Martin v. Löwiseba40652007-08-30 20:10:57 +0000933 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
934 | --dataroo | --dataro | --datar)
935 ac_prev=datarootdir ;;
936 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
937 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
938 datarootdir=$ac_optarg ;;
939
Guido van Rossum7f43da71994-08-01 12:15:30 +0000940 -disable-* | --disable-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000941 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000942 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000943 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000944 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000945 ac_useropt_orig=$ac_useropt
946 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
947 case $ac_user_opts in
948 *"
949"enable_$ac_useropt"
950"*) ;;
951 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
952 ac_unrecognized_sep=', ';;
953 esac
954 eval enable_$ac_useropt=no ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000955
956 -docdir | --docdir | --docdi | --doc | --do)
957 ac_prev=docdir ;;
958 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
959 docdir=$ac_optarg ;;
960
961 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
962 ac_prev=dvidir ;;
963 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
964 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000965
966 -enable-* | --enable-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000967 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000968 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000969 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000970 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000971 ac_useropt_orig=$ac_useropt
972 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
973 case $ac_user_opts in
974 *"
975"enable_$ac_useropt"
976"*) ;;
977 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
978 ac_unrecognized_sep=', ';;
979 esac
980 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000981
Guido van Rossum7f43da71994-08-01 12:15:30 +0000982 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
983 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
984 | --exec | --exe | --ex)
985 ac_prev=exec_prefix ;;
986 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
987 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
988 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000989 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000990
991 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000992 # Obsolete; use --with-gas.
993 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000994
Martin v. Löwis11437992002-04-12 09:54:03 +0000995 -help | --help | --hel | --he | -h)
996 ac_init_help=long ;;
997 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
998 ac_init_help=recursive ;;
999 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1000 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001001
1002 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001003 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001004 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001005 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001006
Martin v. Löwiseba40652007-08-30 20:10:57 +00001007 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1008 ac_prev=htmldir ;;
1009 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1010 | --ht=*)
1011 htmldir=$ac_optarg ;;
1012
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001013 -includedir | --includedir | --includedi | --included | --include \
1014 | --includ | --inclu | --incl | --inc)
1015 ac_prev=includedir ;;
1016 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1017 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001018 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001019
1020 -infodir | --infodir | --infodi | --infod | --info | --inf)
1021 ac_prev=infodir ;;
1022 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001023 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001024
1025 -libdir | --libdir | --libdi | --libd)
1026 ac_prev=libdir ;;
1027 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001028 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001029
1030 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1031 | --libexe | --libex | --libe)
1032 ac_prev=libexecdir ;;
1033 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1034 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001035 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001036
Martin v. Löwiseba40652007-08-30 20:10:57 +00001037 -localedir | --localedir | --localedi | --localed | --locale)
1038 ac_prev=localedir ;;
1039 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1040 localedir=$ac_optarg ;;
1041
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001042 -localstatedir | --localstatedir | --localstatedi | --localstated \
Martin v. Löwiseba40652007-08-30 20:10:57 +00001043 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001044 ac_prev=localstatedir ;;
1045 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Martin v. Löwiseba40652007-08-30 20:10:57 +00001046 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001047 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001048
1049 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1050 ac_prev=mandir ;;
1051 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001052 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001053
Guido van Rossum7f43da71994-08-01 12:15:30 +00001054 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001055 # Obsolete; use --without-fp.
1056 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001057
1058 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001059 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001060 no_create=yes ;;
1061
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001062 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1063 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1064 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001065
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001066 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1067 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1068 | --oldin | --oldi | --old | --ol | --o)
1069 ac_prev=oldincludedir ;;
1070 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1071 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1072 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001073 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001074
Guido van Rossum7f43da71994-08-01 12:15:30 +00001075 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1076 ac_prev=prefix ;;
1077 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001078 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001079
1080 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1081 | --program-pre | --program-pr | --program-p)
1082 ac_prev=program_prefix ;;
1083 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1084 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001085 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001086
1087 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1088 | --program-suf | --program-su | --program-s)
1089 ac_prev=program_suffix ;;
1090 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1091 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001092 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001093
1094 -program-transform-name | --program-transform-name \
1095 | --program-transform-nam | --program-transform-na \
1096 | --program-transform-n | --program-transform- \
1097 | --program-transform | --program-transfor \
1098 | --program-transfo | --program-transf \
1099 | --program-trans | --program-tran \
1100 | --progr-tra | --program-tr | --program-t)
1101 ac_prev=program_transform_name ;;
1102 -program-transform-name=* | --program-transform-name=* \
1103 | --program-transform-nam=* | --program-transform-na=* \
1104 | --program-transform-n=* | --program-transform-=* \
1105 | --program-transform=* | --program-transfor=* \
1106 | --program-transfo=* | --program-transf=* \
1107 | --program-trans=* | --program-tran=* \
1108 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001109 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001110
Martin v. Löwiseba40652007-08-30 20:10:57 +00001111 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1112 ac_prev=pdfdir ;;
1113 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1114 pdfdir=$ac_optarg ;;
1115
1116 -psdir | --psdir | --psdi | --psd | --ps)
1117 ac_prev=psdir ;;
1118 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1119 psdir=$ac_optarg ;;
1120
Guido van Rossum7f43da71994-08-01 12:15:30 +00001121 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1122 | -silent | --silent | --silen | --sile | --sil)
1123 silent=yes ;;
1124
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001125 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1126 ac_prev=sbindir ;;
1127 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1128 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001129 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001130
1131 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1132 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1133 | --sharedst | --shareds | --shared | --share | --shar \
1134 | --sha | --sh)
1135 ac_prev=sharedstatedir ;;
1136 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1137 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1138 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1139 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001140 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001141
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001142 -site | --site | --sit)
1143 ac_prev=site ;;
1144 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001145 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001146
Guido van Rossum7f43da71994-08-01 12:15:30 +00001147 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1148 ac_prev=srcdir ;;
1149 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001150 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001151
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001152 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1153 | --syscon | --sysco | --sysc | --sys | --sy)
1154 ac_prev=sysconfdir ;;
1155 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1156 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001157 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001158
Guido van Rossum7f43da71994-08-01 12:15:30 +00001159 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001160 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001161 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001162 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001163
1164 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1165 verbose=yes ;;
1166
Martin v. Löwis11437992002-04-12 09:54:03 +00001167 -version | --version | --versio | --versi | --vers | -V)
1168 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001169
1170 -with-* | --with-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001171 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001172 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001173 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001174 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001175 ac_useropt_orig=$ac_useropt
1176 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1177 case $ac_user_opts in
1178 *"
1179"with_$ac_useropt"
1180"*) ;;
1181 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1182 ac_unrecognized_sep=', ';;
1183 esac
1184 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001185
1186 -without-* | --without-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001187 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001188 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001189 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001190 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001191 ac_useropt_orig=$ac_useropt
1192 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1193 case $ac_user_opts in
1194 *"
1195"with_$ac_useropt"
1196"*) ;;
1197 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1198 ac_unrecognized_sep=', ';;
1199 esac
1200 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001201
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001202 --x)
1203 # Obsolete; use --with-x.
1204 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001205
1206 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1207 | --x-incl | --x-inc | --x-in | --x-i)
1208 ac_prev=x_includes ;;
1209 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1210 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001211 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001212
1213 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1214 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1215 ac_prev=x_libraries ;;
1216 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1217 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001218 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001219
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001220 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1221Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001222 ;;
1223
Martin v. Löwis11437992002-04-12 09:54:03 +00001224 *=*)
1225 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1226 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001227 case $ac_envvar in #(
1228 '' | [0-9]* | *[!_$as_cr_alnum]* )
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001229 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001230 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001231 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001232 export $ac_envvar ;;
1233
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001234 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001235 # FIXME: should be removed in autoconf 3.0.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001236 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001237 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001238 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Matthias Klose3cef2a92012-03-14 23:39:33 +01001239 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001240 ;;
1241
1242 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001243done
1244
Guido van Rossum7f43da71994-08-01 12:15:30 +00001245if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001246 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001247 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001248fi
1249
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001250if test -n "$ac_unrecognized_opts"; then
1251 case $enable_option_checking in
1252 no) ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001253 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001254 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1255 esac
1256fi
1257
1258# Check all directory arguments for consistency.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001259for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1260 datadir sysconfdir sharedstatedir localstatedir includedir \
1261 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1262 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001263do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001264 eval ac_val=\$$ac_var
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001265 # Remove trailing slashes.
1266 case $ac_val in
1267 */ )
1268 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1269 eval $ac_var=\$ac_val;;
1270 esac
1271 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001272 case $ac_val in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001273 [\\/$]* | ?:[\\/]* ) continue;;
1274 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001275 esac
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001276 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001277done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001278
Martin v. Löwis11437992002-04-12 09:54:03 +00001279# There might be people who depend on the old broken behavior: `$host'
1280# used to hold the argument of --host etc.
1281# FIXME: To remove some day.
1282build=$build_alias
1283host=$host_alias
1284target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001285
Martin v. Löwis11437992002-04-12 09:54:03 +00001286# FIXME: To remove some day.
1287if test "x$host_alias" != x; then
1288 if test "x$build_alias" = x; then
1289 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001290 elif test "x$build_alias" != "x$host_alias"; then
1291 cross_compiling=yes
1292 fi
1293fi
1294
1295ac_tool_prefix=
1296test -n "$host_alias" && ac_tool_prefix=$host_alias-
1297
1298test "$silent" = yes && exec 6>/dev/null
1299
Guido van Rossum627b2d71993-12-24 10:39:16 +00001300
Martin v. Löwiseba40652007-08-30 20:10:57 +00001301ac_pwd=`pwd` && test -n "$ac_pwd" &&
1302ac_ls_di=`ls -di .` &&
1303ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001304 as_fn_error $? "working directory cannot be determined"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001305test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001306 as_fn_error $? "pwd does not report name of working directory"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001307
1308
Guido van Rossum627b2d71993-12-24 10:39:16 +00001309# Find the source files, if location was not specified.
1310if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001311 ac_srcdir_defaulted=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +00001312 # Try the directory containing this script, then the parent directory.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001313 ac_confdir=`$as_dirname -- "$as_myself" ||
1314$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1315 X"$as_myself" : 'X\(//\)[^/]' \| \
1316 X"$as_myself" : 'X\(//\)$' \| \
1317 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1318$as_echo X"$as_myself" |
Martin v. Löwiseba40652007-08-30 20:10:57 +00001319 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1320 s//\1/
1321 q
1322 }
1323 /^X\(\/\/\)[^/].*/{
1324 s//\1/
1325 q
1326 }
1327 /^X\(\/\/\)$/{
1328 s//\1/
1329 q
1330 }
1331 /^X\(\/\).*/{
1332 s//\1/
1333 q
1334 }
1335 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001336 srcdir=$ac_confdir
Martin v. Löwiseba40652007-08-30 20:10:57 +00001337 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001338 srcdir=..
1339 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001340else
1341 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001342fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001343if test ! -r "$srcdir/$ac_unique_file"; then
1344 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001345 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Brett Cannon19fab762007-06-02 03:02:29 +00001346fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001347ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1348ac_abs_confdir=`(
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001349 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001350 pwd)`
1351# When building in place, set srcdir=.
1352if test "$ac_abs_confdir" = "$ac_pwd"; then
1353 srcdir=.
1354fi
1355# Remove unnecessary trailing slashes from srcdir.
1356# Double slashes in file names in object file debugging info
1357# mess up M-x gdb in Emacs.
1358case $srcdir in
1359*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1360esac
1361for ac_var in $ac_precious_vars; do
1362 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1363 eval ac_env_${ac_var}_value=\$${ac_var}
1364 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1365 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1366done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001367
Martin v. Löwis11437992002-04-12 09:54:03 +00001368#
1369# Report the --help message.
1370#
1371if test "$ac_init_help" = "long"; then
1372 # Omit some internal or obsolete options to make the list less imposing.
1373 # This message is too long to be a string in the A/UX 3.1 sh.
1374 cat <<_ACEOF
Martin v. Löwis174440b2008-10-03 08:59:41 +00001375\`configure' configures python 2.7 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001376
1377Usage: $0 [OPTION]... [VAR=VALUE]...
1378
1379To assign environment variables (e.g., CC, CFLAGS...), specify them as
1380VAR=VALUE. See below for descriptions of some of the useful variables.
1381
1382Defaults for the options are specified in brackets.
1383
1384Configuration:
1385 -h, --help display this help and exit
1386 --help=short display options specific to this package
1387 --help=recursive display the short help of all the included packages
1388 -V, --version display version information and exit
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001389 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001390 --cache-file=FILE cache test results in FILE [disabled]
1391 -C, --config-cache alias for \`--cache-file=config.cache'
1392 -n, --no-create do not create output files
1393 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1394
Martin v. Löwis11437992002-04-12 09:54:03 +00001395Installation directories:
1396 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001397 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001398 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001399 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001400
1401By default, \`make install' will install all the files in
1402\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1403an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1404for instance \`--prefix=\$HOME'.
1405
1406For better control, use the options below.
1407
1408Fine tuning of the installation directories:
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001409 --bindir=DIR user executables [EPREFIX/bin]
1410 --sbindir=DIR system admin executables [EPREFIX/sbin]
1411 --libexecdir=DIR program executables [EPREFIX/libexec]
1412 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1413 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1414 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1415 --libdir=DIR object code libraries [EPREFIX/lib]
1416 --includedir=DIR C header files [PREFIX/include]
1417 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1418 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1419 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1420 --infodir=DIR info documentation [DATAROOTDIR/info]
1421 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1422 --mandir=DIR man documentation [DATAROOTDIR/man]
1423 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1424 --htmldir=DIR html documentation [DOCDIR]
1425 --dvidir=DIR dvi documentation [DOCDIR]
1426 --pdfdir=DIR pdf documentation [DOCDIR]
1427 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001428_ACEOF
1429
1430 cat <<\_ACEOF
doko@python.orgd65e2ba2013-01-31 23:52:03 +01001431
1432System types:
1433 --build=BUILD configure for building on BUILD [guessed]
1434 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001435_ACEOF
1436fi
1437
1438if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001439 case $ac_init_help in
Martin v. Löwis174440b2008-10-03 08:59:41 +00001440 short | recursive ) echo "Configuration of python 2.7:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001441 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001442 cat <<\_ACEOF
1443
1444Optional Features:
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001445 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001446 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1447 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Brett Cannon91a1dec2008-02-13 19:15:44 +00001448 --enable-universalsdk[=SDKDIR]
Brett Cannon9a8bb0e2008-02-03 02:07:55 +00001449 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001450 --enable-framework[=INSTALLDIR]
1451 Build (MacOSX|Darwin) framework
1452 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001453 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001454 --enable-toolbox-glue disable/enable MacOSX glue code for extensions
1455 --enable-ipv6 Enable ipv6 (with ipv4) support
1456 --disable-ipv6 Disable ipv6 support
Mark Dickinsonefc82f72009-03-20 15:51:55 +00001457 --enable-big-digits[=BITS]
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001458 use big digits for Python longs [[BITS=30]]
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001459 --enable-unicode[=ucs[24]]
Benjamin Peterson66556b02010-05-25 02:23:32 +00001460 Enable Unicode strings (default is ucs2)
Martin v. Löwis11437992002-04-12 09:54:03 +00001461
1462Optional Packages:
1463 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1464 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001465 --with-universal-archs=ARCH
1466 select architectures for universal build ("32-bit",
Ronald Oussoren23d92532009-09-07 06:12:00 +00001467 "64-bit", "3-way", "intel" or "all")
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001468 --with-framework-name=FRAMEWORK
1469 specify an alternate name of the framework built
1470 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001471 --without-gcc never use gcc
Martin v. Löwis0f48d982006-04-14 14:34:26 +00001472 --with-cxx-main=<compiler>
1473 compile main() and link python executable with C++
1474 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001475 --with-suffix=.exe set executable suffix
1476 --with-pydebug build with Py_DEBUG defined
1477 --with-libs='lib1 ...' link against additional libs
Benjamin Peterson2c196742009-12-31 03:17:18 +00001478 --with-system-expat build pyexpat module using an installed expat
1479 library
Martin v. Löwis9176fc12006-04-11 11:12:43 +00001480 --with-system-ffi build _ctypes module using an installed ffi library
Ned Deilya2a9f572013-10-25 00:30:10 -07001481 --with-tcltk-includes='-I...'
1482 override search for Tcl and Tk include files
1483 --with-tcltk-libs='-L...'
1484 override search for Tcl and Tk libs
Benjamin Peterson867475c2009-04-29 20:36:25 +00001485 --with-dbmliborder=db1:db2:...
1486 order to check db backends for dbm. Valid value is a
1487 colon separated string with the backend names
1488 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001489 --with-signal-module disable/enable signal module
1490 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1491 --with(out)-threads[=DIRECTORY]
1492 disable/enable thread support
1493 --with(out)-thread[=DIRECTORY]
1494 deprecated; use --with(out)-threads
1495 --with-pth use GNU pth threading libraries
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001496 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001497 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001498 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00001499 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001500 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001501 --with-fpectl enable SIGFPE catching
1502 --with-libm=STRING math library
1503 --with-libc=STRING C library
Benjamin Peterson2c992a02015-05-28 12:45:31 -05001504 --with(out)-computed-gotos
1505 Use computed gotos in evaluation loop (enabled by
1506 default on supported compilers)
Ned Deily3f1d0b32014-11-20 02:11:03 -08001507 --with(out)-ensurepip=[=OPTION]
1508 "install" or "upgrade" using bundled pip, default is
1509 "no"
Martin v. Löwis11437992002-04-12 09:54:03 +00001510
1511Some influential environment variables:
1512 CC C compiler command
1513 CFLAGS C compiler flags
1514 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1515 nonstandard directory <lib dir>
Martin v. Löwiseba40652007-08-30 20:10:57 +00001516 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001517 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Martin v. Löwiseba40652007-08-30 20:10:57 +00001518 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001519 CPP C preprocessor
Benjamin Peterson64e8f6e2014-12-15 00:00:23 -05001520 PKG_CONFIG path to pkg-config utility
1521 PKG_CONFIG_PATH
1522 directories to add to pkg-config's search path
1523 PKG_CONFIG_LIBDIR
1524 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001525
1526Use these variables to override the choices made by `configure' or to help
1527it to find libraries and programs with nonstandard names/locations.
1528
Georg Brandl464432d2009-05-20 18:24:08 +00001529Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001530_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001531ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001532fi
1533
1534if test "$ac_init_help" = "recursive"; then
1535 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001536 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001537 test -d "$ac_dir" ||
1538 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1539 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001540 ac_builddir=.
1541
Martin v. Löwiseba40652007-08-30 20:10:57 +00001542case "$ac_dir" in
1543.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1544*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001545 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001546 # A ".." for each directory in $ac_dir_suffix.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001547 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001548 case $ac_top_builddir_sub in
1549 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1550 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1551 esac ;;
1552esac
1553ac_abs_top_builddir=$ac_pwd
1554ac_abs_builddir=$ac_pwd$ac_dir_suffix
1555# for backward compatibility:
1556ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001557
1558case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001559 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001560 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001561 ac_top_srcdir=$ac_top_builddir_sub
1562 ac_abs_top_srcdir=$ac_pwd ;;
1563 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001564 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001565 ac_top_srcdir=$srcdir
1566 ac_abs_top_srcdir=$srcdir ;;
1567 *) # Relative name.
1568 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1569 ac_top_srcdir=$ac_top_build_prefix$srcdir
1570 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001571esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001572ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001573
Martin v. Löwiseba40652007-08-30 20:10:57 +00001574 cd "$ac_dir" || { ac_status=$?; continue; }
1575 # Check for guested configure.
1576 if test -f "$ac_srcdir/configure.gnu"; then
1577 echo &&
1578 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1579 elif test -f "$ac_srcdir/configure"; then
1580 echo &&
1581 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001582 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001583 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001584 fi || ac_status=$?
1585 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001586 done
1587fi
1588
Martin v. Löwiseba40652007-08-30 20:10:57 +00001589test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001590if $ac_init_version; then
1591 cat <<\_ACEOF
Martin v. Löwis174440b2008-10-03 08:59:41 +00001592python configure 2.7
Charles-François Natalibe2b9072013-01-08 19:47:00 +01001593generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001594
Charles-François Natalibe2b9072013-01-08 19:47:00 +01001595Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001596This configure script is free software; the Free Software Foundation
1597gives unlimited permission to copy, distribute and modify it.
1598_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001599 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001600fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001601
1602## ------------------------ ##
1603## Autoconf initialization. ##
1604## ------------------------ ##
1605
1606# ac_fn_c_try_compile LINENO
1607# --------------------------
1608# Try to compile conftest.$ac_ext, and return whether this succeeded.
1609ac_fn_c_try_compile ()
1610{
1611 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1612 rm -f conftest.$ac_objext
1613 if { { ac_try="$ac_compile"
1614case "(($ac_try" in
1615 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1616 *) ac_try_echo=$ac_try;;
1617esac
1618eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1619$as_echo "$ac_try_echo"; } >&5
1620 (eval "$ac_compile") 2>conftest.err
1621 ac_status=$?
1622 if test -s conftest.err; then
1623 grep -v '^ *+' conftest.err >conftest.er1
1624 cat conftest.er1 >&5
1625 mv -f conftest.er1 conftest.err
1626 fi
1627 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1628 test $ac_status = 0; } && {
1629 test -z "$ac_c_werror_flag" ||
1630 test ! -s conftest.err
1631 } && test -s conftest.$ac_objext; then :
1632 ac_retval=0
1633else
1634 $as_echo "$as_me: failed program was:" >&5
1635sed 's/^/| /' conftest.$ac_ext >&5
1636
1637 ac_retval=1
1638fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01001639 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001640 as_fn_set_status $ac_retval
1641
1642} # ac_fn_c_try_compile
1643
1644# ac_fn_c_try_cpp LINENO
1645# ----------------------
1646# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1647ac_fn_c_try_cpp ()
1648{
1649 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1650 if { { ac_try="$ac_cpp conftest.$ac_ext"
1651case "(($ac_try" in
1652 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1653 *) ac_try_echo=$ac_try;;
1654esac
1655eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1656$as_echo "$ac_try_echo"; } >&5
1657 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1658 ac_status=$?
1659 if test -s conftest.err; then
1660 grep -v '^ *+' conftest.err >conftest.er1
1661 cat conftest.er1 >&5
1662 mv -f conftest.er1 conftest.err
1663 fi
1664 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001665 test $ac_status = 0; } > conftest.i && {
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001666 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1667 test ! -s conftest.err
1668 }; then :
1669 ac_retval=0
1670else
1671 $as_echo "$as_me: failed program was:" >&5
1672sed 's/^/| /' conftest.$ac_ext >&5
1673
1674 ac_retval=1
1675fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01001676 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001677 as_fn_set_status $ac_retval
1678
1679} # ac_fn_c_try_cpp
1680
1681# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1682# -------------------------------------------------------
1683# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1684# the include files in INCLUDES and setting the cache variable VAR
1685# accordingly.
1686ac_fn_c_check_header_mongrel ()
1687{
1688 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Matthias Klose3cef2a92012-03-14 23:39:33 +01001689 if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001690 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1691$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001692if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001693 $as_echo_n "(cached) " >&6
1694fi
1695eval ac_res=\$$3
1696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1697$as_echo "$ac_res" >&6; }
1698else
1699 # Is the header compilable?
1700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1701$as_echo_n "checking $2 usability... " >&6; }
1702cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1703/* end confdefs.h. */
1704$4
1705#include <$2>
1706_ACEOF
1707if ac_fn_c_try_compile "$LINENO"; then :
1708 ac_header_compiler=yes
1709else
1710 ac_header_compiler=no
1711fi
1712rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1713{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1714$as_echo "$ac_header_compiler" >&6; }
1715
1716# Is the header present?
1717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1718$as_echo_n "checking $2 presence... " >&6; }
1719cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1720/* end confdefs.h. */
1721#include <$2>
1722_ACEOF
1723if ac_fn_c_try_cpp "$LINENO"; then :
1724 ac_header_preproc=yes
1725else
1726 ac_header_preproc=no
1727fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001728rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001729{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1730$as_echo "$ac_header_preproc" >&6; }
1731
1732# So? What about this header?
1733case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1734 yes:no: )
1735 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1736$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1737 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1738$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1739 ;;
1740 no:yes:* )
1741 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1742$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1743 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1744$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1745 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1746$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1747 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1748$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1749 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1750$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001751( $as_echo "## -------------------------------------- ##
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001752## Report this to http://bugs.python.org/ ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001753## -------------------------------------- ##"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001754 ) | sed "s/^/$as_me: WARNING: /" >&2
1755 ;;
1756esac
1757 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1758$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001759if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001760 $as_echo_n "(cached) " >&6
1761else
1762 eval "$3=\$ac_header_compiler"
1763fi
1764eval ac_res=\$$3
1765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1766$as_echo "$ac_res" >&6; }
1767fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01001768 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001769
1770} # ac_fn_c_check_header_mongrel
1771
1772# ac_fn_c_try_run LINENO
1773# ----------------------
1774# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1775# that executables *can* be run.
1776ac_fn_c_try_run ()
1777{
1778 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1779 if { { ac_try="$ac_link"
1780case "(($ac_try" in
1781 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1782 *) ac_try_echo=$ac_try;;
1783esac
1784eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1785$as_echo "$ac_try_echo"; } >&5
1786 (eval "$ac_link") 2>&5
1787 ac_status=$?
1788 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1789 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1790 { { case "(($ac_try" in
1791 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1792 *) ac_try_echo=$ac_try;;
1793esac
1794eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1795$as_echo "$ac_try_echo"; } >&5
1796 (eval "$ac_try") 2>&5
1797 ac_status=$?
1798 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1799 test $ac_status = 0; }; }; then :
1800 ac_retval=0
1801else
1802 $as_echo "$as_me: program exited with status $ac_status" >&5
1803 $as_echo "$as_me: failed program was:" >&5
1804sed 's/^/| /' conftest.$ac_ext >&5
1805
1806 ac_retval=$ac_status
1807fi
1808 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Matthias Klose3cef2a92012-03-14 23:39:33 +01001809 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001810 as_fn_set_status $ac_retval
1811
1812} # ac_fn_c_try_run
1813
1814# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1815# -------------------------------------------------------
1816# Tests whether HEADER exists and can be compiled using the include files in
1817# INCLUDES, setting the cache variable VAR accordingly.
1818ac_fn_c_check_header_compile ()
1819{
1820 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1821 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1822$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001823if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001824 $as_echo_n "(cached) " >&6
1825else
1826 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1827/* end confdefs.h. */
1828$4
1829#include <$2>
1830_ACEOF
1831if ac_fn_c_try_compile "$LINENO"; then :
1832 eval "$3=yes"
1833else
1834 eval "$3=no"
1835fi
1836rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1837fi
1838eval ac_res=\$$3
1839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1840$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001841 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001842
1843} # ac_fn_c_check_header_compile
1844
1845# ac_fn_c_try_link LINENO
1846# -----------------------
1847# Try to link conftest.$ac_ext, and return whether this succeeded.
1848ac_fn_c_try_link ()
1849{
1850 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1851 rm -f conftest.$ac_objext conftest$ac_exeext
1852 if { { ac_try="$ac_link"
1853case "(($ac_try" in
1854 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1855 *) ac_try_echo=$ac_try;;
1856esac
1857eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1858$as_echo "$ac_try_echo"; } >&5
1859 (eval "$ac_link") 2>conftest.err
1860 ac_status=$?
1861 if test -s conftest.err; then
1862 grep -v '^ *+' conftest.err >conftest.er1
1863 cat conftest.er1 >&5
1864 mv -f conftest.er1 conftest.err
1865 fi
1866 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1867 test $ac_status = 0; } && {
1868 test -z "$ac_c_werror_flag" ||
1869 test ! -s conftest.err
1870 } && test -s conftest$ac_exeext && {
1871 test "$cross_compiling" = yes ||
Charles-François Natalibe2b9072013-01-08 19:47:00 +01001872 test -x conftest$ac_exeext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001873 }; then :
1874 ac_retval=0
1875else
1876 $as_echo "$as_me: failed program was:" >&5
1877sed 's/^/| /' conftest.$ac_ext >&5
1878
1879 ac_retval=1
1880fi
1881 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1882 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1883 # interfere with the next link command; also delete a directory that is
1884 # left behind by Apple's compiler. We do this before executing the actions.
1885 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Matthias Klose3cef2a92012-03-14 23:39:33 +01001886 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001887 as_fn_set_status $ac_retval
1888
1889} # ac_fn_c_try_link
1890
1891# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1892# -------------------------------------------
1893# Tests whether TYPE exists after having included INCLUDES, setting cache
1894# variable VAR accordingly.
1895ac_fn_c_check_type ()
1896{
1897 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1898 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1899$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001900if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001901 $as_echo_n "(cached) " >&6
1902else
1903 eval "$3=no"
1904 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1905/* end confdefs.h. */
1906$4
1907int
1908main ()
1909{
1910if (sizeof ($2))
1911 return 0;
1912 ;
1913 return 0;
1914}
1915_ACEOF
1916if ac_fn_c_try_compile "$LINENO"; then :
1917 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1918/* end confdefs.h. */
1919$4
1920int
1921main ()
1922{
1923if (sizeof (($2)))
1924 return 0;
1925 ;
1926 return 0;
1927}
1928_ACEOF
1929if ac_fn_c_try_compile "$LINENO"; then :
1930
1931else
1932 eval "$3=yes"
1933fi
1934rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1935fi
1936rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1937fi
1938eval ac_res=\$$3
1939 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1940$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001941 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001942
1943} # ac_fn_c_check_type
1944
1945# ac_fn_c_find_uintX_t LINENO BITS VAR
1946# ------------------------------------
1947# Finds an unsigned integer type with width BITS, setting cache variable VAR
1948# accordingly.
1949ac_fn_c_find_uintX_t ()
1950{
1951 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1952 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1953$as_echo_n "checking for uint$2_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001954if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001955 $as_echo_n "(cached) " >&6
1956else
1957 eval "$3=no"
1958 # Order is important - never check a type that is potentially smaller
1959 # than half of the expected target width.
1960 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1961 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1962 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1963/* end confdefs.h. */
1964$ac_includes_default
1965int
1966main ()
1967{
1968static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01001969test_array [0] = 0;
1970return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001971
1972 ;
1973 return 0;
1974}
1975_ACEOF
1976if ac_fn_c_try_compile "$LINENO"; then :
1977 case $ac_type in #(
1978 uint$2_t) :
1979 eval "$3=yes" ;; #(
1980 *) :
1981 eval "$3=\$ac_type" ;;
1982esac
1983fi
1984rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001985 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001986
1987else
1988 break
1989fi
1990 done
1991fi
1992eval ac_res=\$$3
1993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1994$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001995 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001996
1997} # ac_fn_c_find_uintX_t
1998
1999# ac_fn_c_find_intX_t LINENO BITS VAR
2000# -----------------------------------
2001# Finds a signed integer type with width BITS, setting cache variable VAR
2002# accordingly.
2003ac_fn_c_find_intX_t ()
2004{
2005 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2006 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
2007$as_echo_n "checking for int$2_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002008if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002009 $as_echo_n "(cached) " >&6
2010else
2011 eval "$3=no"
2012 # Order is important - never check a type that is potentially smaller
2013 # than half of the expected target width.
2014 for ac_type in int$2_t 'int' 'long int' \
2015 'long long int' 'short int' 'signed char'; do
2016 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2017/* end confdefs.h. */
2018$ac_includes_default
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002019 enum { N = $2 / 2 - 1 };
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002020int
2021main ()
2022{
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002023static 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 +01002024test_array [0] = 0;
2025return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002026
2027 ;
2028 return 0;
2029}
2030_ACEOF
2031if ac_fn_c_try_compile "$LINENO"; then :
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 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002040 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002041test_array [0] = 0;
2042return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002043
2044 ;
2045 return 0;
2046}
2047_ACEOF
2048if ac_fn_c_try_compile "$LINENO"; then :
2049
2050else
2051 case $ac_type in #(
2052 int$2_t) :
2053 eval "$3=yes" ;; #(
2054 *) :
2055 eval "$3=\$ac_type" ;;
2056esac
2057fi
2058rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2059fi
2060rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002061 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002062
2063else
2064 break
2065fi
2066 done
2067fi
2068eval ac_res=\$$3
2069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2070$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002071 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002072
2073} # ac_fn_c_find_intX_t
2074
2075# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2076# --------------------------------------------
2077# Tries to find the compile-time value of EXPR in a program that includes
2078# INCLUDES, setting VAR accordingly. Returns whether the value could be
2079# computed
2080ac_fn_c_compute_int ()
2081{
2082 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2083 if test "$cross_compiling" = yes; then
2084 # Depending upon the size, compute the lo and hi bounds.
2085cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2086/* end confdefs.h. */
2087$4
2088int
2089main ()
2090{
2091static int test_array [1 - 2 * !(($2) >= 0)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002092test_array [0] = 0;
2093return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002094
2095 ;
2096 return 0;
2097}
2098_ACEOF
2099if ac_fn_c_try_compile "$LINENO"; then :
2100 ac_lo=0 ac_mid=0
2101 while :; do
2102 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2103/* end confdefs.h. */
2104$4
2105int
2106main ()
2107{
2108static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002109test_array [0] = 0;
2110return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002111
2112 ;
2113 return 0;
2114}
2115_ACEOF
2116if ac_fn_c_try_compile "$LINENO"; then :
2117 ac_hi=$ac_mid; break
2118else
2119 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2120 if test $ac_lo -le $ac_mid; then
2121 ac_lo= ac_hi=
2122 break
2123 fi
2124 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2125fi
2126rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2127 done
2128else
2129 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2130/* end confdefs.h. */
2131$4
2132int
2133main ()
2134{
2135static int test_array [1 - 2 * !(($2) < 0)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002136test_array [0] = 0;
2137return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002138
2139 ;
2140 return 0;
2141}
2142_ACEOF
2143if ac_fn_c_try_compile "$LINENO"; then :
2144 ac_hi=-1 ac_mid=-1
2145 while :; do
2146 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2147/* end confdefs.h. */
2148$4
2149int
2150main ()
2151{
2152static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002153test_array [0] = 0;
2154return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002155
2156 ;
2157 return 0;
2158}
2159_ACEOF
2160if ac_fn_c_try_compile "$LINENO"; then :
2161 ac_lo=$ac_mid; break
2162else
2163 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2164 if test $ac_mid -le $ac_hi; then
2165 ac_lo= ac_hi=
2166 break
2167 fi
2168 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2169fi
2170rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2171 done
2172else
2173 ac_lo= ac_hi=
2174fi
2175rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2176fi
2177rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2178# Binary search between lo and hi bounds.
2179while test "x$ac_lo" != "x$ac_hi"; do
2180 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2181 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2182/* end confdefs.h. */
2183$4
2184int
2185main ()
2186{
2187static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002188test_array [0] = 0;
2189return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002190
2191 ;
2192 return 0;
2193}
2194_ACEOF
2195if ac_fn_c_try_compile "$LINENO"; then :
2196 ac_hi=$ac_mid
2197else
2198 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2199fi
2200rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2201done
2202case $ac_lo in #((
2203?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2204'') ac_retval=1 ;;
2205esac
2206 else
2207 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2208/* end confdefs.h. */
2209$4
2210static long int longval () { return $2; }
2211static unsigned long int ulongval () { return $2; }
2212#include <stdio.h>
2213#include <stdlib.h>
2214int
2215main ()
2216{
2217
2218 FILE *f = fopen ("conftest.val", "w");
2219 if (! f)
2220 return 1;
2221 if (($2) < 0)
2222 {
2223 long int i = longval ();
2224 if (i != ($2))
2225 return 1;
2226 fprintf (f, "%ld", i);
2227 }
2228 else
2229 {
2230 unsigned long int i = ulongval ();
2231 if (i != ($2))
2232 return 1;
2233 fprintf (f, "%lu", i);
2234 }
2235 /* Do not output a trailing newline, as this causes \r\n confusion
2236 on some platforms. */
2237 return ferror (f) || fclose (f) != 0;
2238
2239 ;
2240 return 0;
2241}
2242_ACEOF
2243if ac_fn_c_try_run "$LINENO"; then :
2244 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2245else
2246 ac_retval=1
2247fi
2248rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2249 conftest.$ac_objext conftest.beam conftest.$ac_ext
2250rm -f conftest.val
2251
2252 fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01002253 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002254 as_fn_set_status $ac_retval
2255
2256} # ac_fn_c_compute_int
2257
2258# ac_fn_c_check_func LINENO FUNC VAR
2259# ----------------------------------
2260# Tests whether FUNC exists, setting the cache variable VAR accordingly
2261ac_fn_c_check_func ()
2262{
2263 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2264 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2265$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002266if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002267 $as_echo_n "(cached) " >&6
2268else
2269 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2270/* end confdefs.h. */
2271/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2272 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2273#define $2 innocuous_$2
2274
2275/* System header to define __stub macros and hopefully few prototypes,
2276 which can conflict with char $2 (); below.
2277 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2278 <limits.h> exists even on freestanding compilers. */
2279
2280#ifdef __STDC__
2281# include <limits.h>
2282#else
2283# include <assert.h>
2284#endif
2285
2286#undef $2
2287
2288/* Override any GCC internal prototype to avoid an error.
2289 Use char because int might match the return type of a GCC
2290 builtin and then its argument prototype would still apply. */
2291#ifdef __cplusplus
2292extern "C"
2293#endif
2294char $2 ();
2295/* The GNU C library defines this for functions which it implements
2296 to always fail with ENOSYS. Some functions are actually named
2297 something starting with __ and the normal name is an alias. */
2298#if defined __stub_$2 || defined __stub___$2
2299choke me
2300#endif
2301
2302int
2303main ()
2304{
2305return $2 ();
2306 ;
2307 return 0;
2308}
2309_ACEOF
2310if ac_fn_c_try_link "$LINENO"; then :
2311 eval "$3=yes"
2312else
2313 eval "$3=no"
2314fi
2315rm -f core conftest.err conftest.$ac_objext \
2316 conftest$ac_exeext conftest.$ac_ext
2317fi
2318eval ac_res=\$$3
2319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2320$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002321 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002322
2323} # ac_fn_c_check_func
2324
2325# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2326# ----------------------------------------------------
2327# Tries to find if the field MEMBER exists in type AGGR, after including
2328# INCLUDES, setting cache variable VAR accordingly.
2329ac_fn_c_check_member ()
2330{
2331 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2332 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2333$as_echo_n "checking for $2.$3... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002334if eval \${$4+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002335 $as_echo_n "(cached) " >&6
2336else
2337 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2338/* end confdefs.h. */
2339$5
2340int
2341main ()
2342{
2343static $2 ac_aggr;
2344if (ac_aggr.$3)
2345return 0;
2346 ;
2347 return 0;
2348}
2349_ACEOF
2350if ac_fn_c_try_compile "$LINENO"; then :
2351 eval "$4=yes"
2352else
2353 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2354/* end confdefs.h. */
2355$5
2356int
2357main ()
2358{
2359static $2 ac_aggr;
2360if (sizeof 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 eval "$4=no"
2370fi
2371rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2372fi
2373rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2374fi
2375eval ac_res=\$$4
2376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2377$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002378 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002379
2380} # ac_fn_c_check_member
2381
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002382# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2383# ---------------------------------------------
2384# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2385# accordingly.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002386ac_fn_c_check_decl ()
2387{
2388 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002389 as_decl_name=`echo $2|sed 's/ *(.*//'`
2390 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2391 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2392$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002393if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002394 $as_echo_n "(cached) " >&6
2395else
2396 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2397/* end confdefs.h. */
2398$4
2399int
2400main ()
2401{
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002402#ifndef $as_decl_name
2403#ifdef __cplusplus
2404 (void) $as_decl_use;
2405#else
2406 (void) $as_decl_name;
2407#endif
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002408#endif
2409
2410 ;
2411 return 0;
2412}
2413_ACEOF
2414if ac_fn_c_try_compile "$LINENO"; then :
2415 eval "$3=yes"
2416else
2417 eval "$3=no"
2418fi
2419rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2420fi
2421eval ac_res=\$$3
2422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2423$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002424 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002425
2426} # ac_fn_c_check_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +00002427cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002428This file contains any messages produced by compilers while
2429running configure, to aid debugging if configure makes a mistake.
2430
Martin v. Löwis174440b2008-10-03 08:59:41 +00002431It was created by python $as_me 2.7, which was
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002432generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002433
2434 $ $0 $@
2435
2436_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00002437exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002438{
2439cat <<_ASUNAME
2440## --------- ##
2441## Platform. ##
2442## --------- ##
2443
2444hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2445uname -m = `(uname -m) 2>/dev/null || echo unknown`
2446uname -r = `(uname -r) 2>/dev/null || echo unknown`
2447uname -s = `(uname -s) 2>/dev/null || echo unknown`
2448uname -v = `(uname -v) 2>/dev/null || echo unknown`
2449
2450/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2451/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2452
2453/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2454/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2455/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Martin v. Löwiseba40652007-08-30 20:10:57 +00002456/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002457/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2458/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2459/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2460
2461_ASUNAME
2462
2463as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2464for as_dir in $PATH
2465do
2466 IFS=$as_save_IFS
2467 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002468 $as_echo "PATH: $as_dir"
2469 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002470IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002471
2472} >&5
2473
2474cat >&5 <<_ACEOF
2475
2476
2477## ----------- ##
2478## Core tests. ##
2479## ----------- ##
2480
2481_ACEOF
2482
2483
2484# Keep a trace of the command line.
2485# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002486# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002487# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002488# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002489ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002490ac_configure_args0=
2491ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002492ac_must_keep_next=false
2493for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002494do
Skip Montanaro6dead952003-09-25 14:50:04 +00002495 for ac_arg
2496 do
2497 case $ac_arg in
2498 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2499 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2500 | -silent | --silent | --silen | --sile | --sil)
2501 continue ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002502 *\'*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002503 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002504 esac
2505 case $ac_pass in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002506 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002507 2)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002508 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002509 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002510 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002511 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002512 case $ac_arg in
2513 *=* | --config-cache | -C | -disable-* | --disable-* \
2514 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2515 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2516 | -with-* | --with-* | -without-* | --without-* | --x)
2517 case "$ac_configure_args0 " in
2518 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2519 esac
2520 ;;
2521 -* ) ac_must_keep_next=true ;;
2522 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002523 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002524 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002525 ;;
2526 esac
2527 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002528done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002529{ ac_configure_args0=; unset ac_configure_args0;}
2530{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002531
2532# When interrupted or exit'd, cleanup temporary files, and complete
2533# config.log. We remove comments because anyway the quotes in there
2534# would cause problems or look ugly.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002535# WARNING: Use '\'' to represent an apostrophe within the trap.
2536# 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 +00002537trap 'exit_status=$?
2538 # Save into config.log some information that might help in debugging.
2539 {
2540 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002541
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002542 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002543## Cache variables. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002544## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002545 echo
2546 # The following way of writing the cache mishandles newlines in values,
Martin v. Löwiseba40652007-08-30 20:10:57 +00002547(
2548 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2549 eval ac_val=\$$ac_var
2550 case $ac_val in #(
2551 *${as_nl}*)
2552 case $ac_var in #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002553 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2554$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002555 esac
2556 case $ac_var in #(
2557 _ | IFS | as_nl) ;; #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002558 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2559 *) { eval $ac_var=; unset $ac_var;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002560 esac ;;
2561 esac
2562 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002563 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +00002564 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2565 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002566 sed -n \
Martin v. Löwiseba40652007-08-30 20:10:57 +00002567 "s/'\''/'\''\\\\'\'''\''/g;
2568 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2569 ;; #(
Skip Montanaro89e975f2007-08-22 19:05:21 +00002570 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00002571 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaro89e975f2007-08-22 19:05:21 +00002572 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002573 esac |
2574 sort
2575)
Martin v. Löwis11437992002-04-12 09:54:03 +00002576 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002577
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002578 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002579## Output variables. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002580## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002581 echo
2582 for ac_var in $ac_subst_vars
2583 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002584 eval ac_val=\$$ac_var
2585 case $ac_val in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002586 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002587 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002588 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002589 done | sort
2590 echo
2591
2592 if test -n "$ac_subst_files"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002593 $as_echo "## ------------------- ##
Martin v. Löwiseba40652007-08-30 20:10:57 +00002594## File substitutions. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002595## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002596 echo
2597 for ac_var in $ac_subst_files
2598 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002599 eval ac_val=\$$ac_var
2600 case $ac_val in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002601 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002602 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002603 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002604 done | sort
2605 echo
2606 fi
2607
Martin v. Löwis11437992002-04-12 09:54:03 +00002608 if test -s confdefs.h; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002609 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002610## confdefs.h. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002611## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002612 echo
Martin v. Löwiseba40652007-08-30 20:10:57 +00002613 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002614 echo
2615 fi
2616 test "$ac_signal" != 0 &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002617 $as_echo "$as_me: caught signal $ac_signal"
2618 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002619 } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002620 rm -f core *.core core.conftest.* &&
2621 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002622 exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +00002623' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002624for ac_signal in 1 2 13 15; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002625 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002626done
2627ac_signal=0
2628
2629# confdefs.h avoids OS command line length limits that DEFS can exceed.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002630rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002631
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002632$as_echo "/* confdefs.h */" > confdefs.h
2633
Martin v. Löwis11437992002-04-12 09:54:03 +00002634# Predefined preprocessor variables.
2635
2636cat >>confdefs.h <<_ACEOF
2637#define PACKAGE_NAME "$PACKAGE_NAME"
2638_ACEOF
2639
Martin v. Löwis11437992002-04-12 09:54:03 +00002640cat >>confdefs.h <<_ACEOF
2641#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2642_ACEOF
2643
Martin v. Löwis11437992002-04-12 09:54:03 +00002644cat >>confdefs.h <<_ACEOF
2645#define PACKAGE_VERSION "$PACKAGE_VERSION"
2646_ACEOF
2647
Martin v. Löwis11437992002-04-12 09:54:03 +00002648cat >>confdefs.h <<_ACEOF
2649#define PACKAGE_STRING "$PACKAGE_STRING"
2650_ACEOF
2651
Martin v. Löwis11437992002-04-12 09:54:03 +00002652cat >>confdefs.h <<_ACEOF
2653#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2654_ACEOF
2655
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002656cat >>confdefs.h <<_ACEOF
2657#define PACKAGE_URL "$PACKAGE_URL"
2658_ACEOF
2659
Martin v. Löwis11437992002-04-12 09:54:03 +00002660
2661# Let the site file select an alternate cache file if it wants to.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002662# Prefer an explicitly selected file to automatically selected ones.
2663ac_site_file1=NONE
2664ac_site_file2=NONE
Martin v. Löwiseba40652007-08-30 20:10:57 +00002665if test -n "$CONFIG_SITE"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002666 # We do not want a PATH search for config.site.
2667 case $CONFIG_SITE in #((
2668 -*) ac_site_file1=./$CONFIG_SITE;;
2669 */*) ac_site_file1=$CONFIG_SITE;;
2670 *) ac_site_file1=./$CONFIG_SITE;;
2671 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00002672elif test "x$prefix" != xNONE; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002673 ac_site_file1=$prefix/share/config.site
2674 ac_site_file2=$prefix/etc/config.site
Martin v. Löwiseba40652007-08-30 20:10:57 +00002675else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002676 ac_site_file1=$ac_default_prefix/share/config.site
2677 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002678fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002679for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Martin v. Löwiseba40652007-08-30 20:10:57 +00002680do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002681 test "x$ac_site_file" = xNONE && continue
2682 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2683 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2684$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002685 sed 's/^/| /' "$ac_site_file" >&5
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002686 . "$ac_site_file" \
2687 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2688$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2689as_fn_error $? "failed to load site script $ac_site_file
Matthias Klose3cef2a92012-03-14 23:39:33 +01002690See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002691 fi
2692done
2693
2694if test -r "$cache_file"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002695 # Some versions of bash will fail to source /dev/null (special files
2696 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2697 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2698 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2699$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002700 case $cache_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00002701 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2702 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002703 esac
2704 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002705else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002706 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2707$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002708 >$cache_file
2709fi
2710
2711# Check that the precious variables saved in the cache have kept the same
2712# value.
2713ac_cache_corrupted=false
Martin v. Löwiseba40652007-08-30 20:10:57 +00002714for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002715 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2716 eval ac_new_set=\$ac_env_${ac_var}_set
Martin v. Löwiseba40652007-08-30 20:10:57 +00002717 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2718 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002719 case $ac_old_set,$ac_new_set in
2720 set,)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002721 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2722$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 +00002723 ac_cache_corrupted=: ;;
2724 ,set)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002725 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2726$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002727 ac_cache_corrupted=: ;;
2728 ,);;
2729 *)
2730 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002731 # differences in whitespace do not lead to failure.
2732 ac_old_val_w=`echo x $ac_old_val`
2733 ac_new_val_w=`echo x $ac_new_val`
2734 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2735 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2736$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2737 ac_cache_corrupted=:
2738 else
2739 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2740$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2741 eval $ac_var=\$ac_old_val
2742 fi
2743 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2744$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2745 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2746$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002747 fi;;
2748 esac
2749 # Pass precious variables to config.status.
2750 if test "$ac_new_set" = set; then
2751 case $ac_new_val in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002752 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002753 *) ac_arg=$ac_var=$ac_new_val ;;
2754 esac
2755 case " $ac_configure_args " in
2756 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002757 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002758 esac
2759 fi
2760done
2761if $ac_cache_corrupted; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002762 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2763$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2764 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2765$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002766 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002767fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002768## -------------------- ##
2769## Main body of script. ##
2770## -------------------- ##
Martin v. Löwiseba40652007-08-30 20:10:57 +00002771
Guido van Rossum7f43da71994-08-01 12:15:30 +00002772ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002773ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002774ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2775ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2776ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002777
Guido van Rossum627b2d71993-12-24 10:39:16 +00002778
Michael W. Hudson54241132001-12-07 15:38:26 +00002779
Martin v. Löwiseba40652007-08-30 20:10:57 +00002780ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002781
2782
doko@python.orgd65e2ba2013-01-31 23:52:03 +01002783ac_aux_dir=
2784for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2785 if test -f "$ac_dir/install-sh"; then
2786 ac_aux_dir=$ac_dir
2787 ac_install_sh="$ac_aux_dir/install-sh -c"
2788 break
2789 elif test -f "$ac_dir/install.sh"; then
2790 ac_aux_dir=$ac_dir
2791 ac_install_sh="$ac_aux_dir/install.sh -c"
2792 break
2793 elif test -f "$ac_dir/shtool"; then
2794 ac_aux_dir=$ac_dir
2795 ac_install_sh="$ac_aux_dir/shtool install -c"
2796 break
2797 fi
2798done
2799if test -z "$ac_aux_dir"; then
2800 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2801fi
2802
2803# These three variables are undocumented and unsupported,
2804# and are intended to be withdrawn in a future Autoconf release.
2805# They can cause serious problems if a builder's source tree is in a directory
2806# whose full name contains unusual characters.
2807ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2808ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2809ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2810
2811
2812# Make sure we can run config.sub.
2813$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2814 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2815
2816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2817$as_echo_n "checking build system type... " >&6; }
2818if ${ac_cv_build+:} false; then :
2819 $as_echo_n "(cached) " >&6
2820else
2821 ac_build_alias=$build_alias
2822test "x$ac_build_alias" = x &&
2823 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2824test "x$ac_build_alias" = x &&
2825 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2826ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2827 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2828
2829fi
2830{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2831$as_echo "$ac_cv_build" >&6; }
2832case $ac_cv_build in
2833*-*-*) ;;
2834*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2835esac
2836build=$ac_cv_build
2837ac_save_IFS=$IFS; IFS='-'
2838set x $ac_cv_build
2839shift
2840build_cpu=$1
2841build_vendor=$2
2842shift; shift
2843# Remember, the first character of IFS is used to create $*,
2844# except with old shells:
2845build_os=$*
2846IFS=$ac_save_IFS
2847case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2848
2849
2850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2851$as_echo_n "checking host system type... " >&6; }
2852if ${ac_cv_host+:} false; then :
2853 $as_echo_n "(cached) " >&6
2854else
2855 if test "x$host_alias" = x; then
2856 ac_cv_host=$ac_cv_build
2857else
2858 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2859 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2860fi
2861
2862fi
2863{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2864$as_echo "$ac_cv_host" >&6; }
2865case $ac_cv_host in
2866*-*-*) ;;
2867*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2868esac
2869host=$ac_cv_host
2870ac_save_IFS=$IFS; IFS='-'
2871set x $ac_cv_host
2872shift
2873host_cpu=$1
2874host_vendor=$2
2875shift; shift
2876# Remember, the first character of IFS is used to create $*,
2877# except with old shells:
2878host_os=$*
2879IFS=$ac_save_IFS
2880case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2881
2882
2883
2884
2885
Ned Deily983df862014-08-22 13:30:59 -07002886# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2887rm -f pybuilddir.txt
2888
doko@python.orgd65e2ba2013-01-31 23:52:03 +01002889if test "$cross_compiling" = yes; then
2890 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2891$as_echo_n "checking for python interpreter for cross build... " >&6; }
2892 if test -z "$PYTHON_FOR_BUILD"; then
2893 for interp in python$PACKAGE_VERSION python2 python; do
2894 which $interp >/dev/null 2>&1 || continue
2895 if $interp -c 'import sys;sys.exit(not (sys.version_info[:2] >= (2,7) and sys.version_info[0] < 3))'; then
2896 break
2897 fi
2898 interp=
2899 done
2900 if test x$interp = x; then
2901 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2902 fi
2903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2904$as_echo "$interp" >&6; }
doko@ubuntu.coma50b0de2015-04-13 21:55:59 +02002905 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 +01002906 fi
2907elif test "$cross_compiling" = maybe; then
2908 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
2909else
2910 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2911fi
2912
2913
Martin v. Löwis11437992002-04-12 09:54:03 +00002914
Georg Brandlbcd64a32009-03-31 21:45:18 +00002915if test "$prefix" != "/"; then
2916 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2917fi
2918
2919
Martin v. Löwis11437992002-04-12 09:54:03 +00002920
2921
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002922# We don't use PACKAGE_ variables, and they cause conflicts
2923# with other autoconf-based packages that include Python.h
2924grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2925rm confdefs.h
2926mv confdefs.h.new confdefs.h
2927
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002928
Martin v. Löwis174440b2008-10-03 08:59:41 +00002929VERSION=2.7
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002930
Martin v. Löwis1142de32002-03-29 16:28:31 +00002931
2932SOVERSION=1.0
2933
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002934# The later defininition of _XOPEN_SOURCE disables certain features
2935# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2936
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002937$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002938
2939
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002940# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2941# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2942# them.
2943
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002944$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002945
2946
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002947# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2948# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2949# them.
2950
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002951$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002952
2953
Martin v. Löwisd6320502004-08-12 13:45:08 +00002954# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2955# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2956
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002957$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002958
2959
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002960# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2961# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2962# them.
2963
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002964$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002965
2966
2967
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002968define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002969
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002970# Arguments passed to configure.
2971
2972CONFIG_ARGS="$ac_configure_args"
2973
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
2975$as_echo_n "checking for --enable-universalsdk... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002976# Check whether --enable-universalsdk was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002977if test "${enable_universalsdk+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00002978 enableval=$enable_universalsdk;
Ronald Oussoren988117f2006-04-29 11:31:35 +00002979 case $enableval in
2980 yes)
2981 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002982 if test ! -d "${enableval}"
2983 then
2984 enableval=/
2985 fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00002986 ;;
2987 esac
2988 case $enableval in
2989 no)
2990 UNIVERSALSDK=
2991 enable_universalsdk=
2992 ;;
2993 *)
2994 UNIVERSALSDK=$enableval
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002995 if test ! -d "${UNIVERSALSDK}"
2996 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002997 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002998 fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00002999 ;;
3000 esac
3001
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003002
Ronald Oussoren988117f2006-04-29 11:31:35 +00003003else
3004
3005 UNIVERSALSDK=
3006 enable_universalsdk=
3007
Martin v. Löwiseba40652007-08-30 20:10:57 +00003008fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00003009
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003010if test -n "${UNIVERSALSDK}"
3011then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3013$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003014else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3016$as_echo "no" >&6; }
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003017fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00003018
Martin v. Löwiseba40652007-08-30 20:10:57 +00003019
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +00003020
Ned Deily8e60f6e2013-05-30 00:14:29 -07003021ARCH_RUN_32BIT=""
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +00003022
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003023UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren92919a62009-12-24 13:30:58 +00003024
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3026$as_echo_n "checking for --with-universal-archs... " >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003027
3028# Check whether --with-universal-archs was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003029if test "${with_universal_archs+set}" = set; then :
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003030 withval=$with_universal_archs;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
3032$as_echo "$withval" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003033 UNIVERSAL_ARCHS="$withval"
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00003034 if test "${enable_universalsdk}" ; then
3035 :
3036 else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003037 as_fn_error $? "--with-universal-archs without --enable-universalsdk. See Mac/README" "$LINENO" 5
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00003038 fi
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003039
3040else
3041
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 32-bit" >&5
3043$as_echo "32-bit" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003044
3045fi
3046
3047
3048
3049
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003050
3051# Check whether --with-framework-name was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003052if test "${with_framework_name+set}" = set; then :
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003053 withval=$with_framework_name;
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00003054 if test "${enable_framework}"; then
3055 :
3056 else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003057 as_fn_error $? "--with-framework-name without --enable-framework. See Mac/README" "$LINENO" 5
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00003058 fi
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003059 PYTHONFRAMEWORK=${withval}
3060 PYTHONFRAMEWORKDIR=${withval}.framework
3061 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3062
3063else
3064
3065 PYTHONFRAMEWORK=Python
3066 PYTHONFRAMEWORKDIR=Python.framework
3067 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3068
3069fi
3070
Martin v. Löwiseba40652007-08-30 20:10:57 +00003071# Check whether --enable-framework was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003072if test "${enable_framework+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003073 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003074 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003075 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003076 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003077 esac
3078 case $enableval in
3079 no)
3080 PYTHONFRAMEWORK=
3081 PYTHONFRAMEWORKDIR=no-framework
3082 PYTHONFRAMEWORKPREFIX=
3083 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00003084 FRAMEWORKINSTALLFIRST=
3085 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00003086 FRAMEWORKALTINSTALLFIRST=
3087 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00003088 if test "x${prefix}" = "xNONE"; then
3089 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3090 else
3091 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3092 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003093 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003094 ;;
3095 *)
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003096 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003097 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00003098 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003099 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure bininstall maninstall"
Ronald Oussoren92919a62009-12-24 13:30:58 +00003100 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3101 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003102 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003103
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00003104 if test "x${prefix}" = "xNONE" ; then
3105 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003106
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00003107 else
3108 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3109 fi
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003110
3111 case "${enableval}" in
3112 /System*)
3113 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3114 if test "${prefix}" = "NONE" ; then
3115 # See below
3116 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3117 fi
3118 ;;
3119
3120 /Library*)
3121 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3122 ;;
3123
3124 */Library/Frameworks)
3125 MDIR="`dirname "${enableval}"`"
3126 MDIR="`dirname "${MDIR}"`"
3127 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3128
3129 if test "${prefix}" = "NONE"; then
3130 # User hasn't specified the
3131 # --prefix option, but wants to install
3132 # the framework in a non-default location,
3133 # ensure that the compatibility links get
3134 # installed relative to that prefix as well
3135 # instead of in /usr/local.
3136 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3137 fi
3138 ;;
3139
3140 *)
3141 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3142 ;;
3143 esac
3144
Jack Jansen127e56e2001-09-11 14:41:54 +00003145 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Ronald Oussoren836b0392006-05-14 19:56:34 +00003146
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003147 # Add files for Mac specific code to the list of output
Ronald Oussoren836b0392006-05-14 19:56:34 +00003148 # files:
Martin v. Löwiseba40652007-08-30 20:10:57 +00003149 ac_config_files="$ac_config_files Mac/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00003150
Martin v. Löwiseba40652007-08-30 20:10:57 +00003151 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00003152
Martin v. Löwiseba40652007-08-30 20:10:57 +00003153 ac_config_files="$ac_config_files Mac/IDLE/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00003154
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003155 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3156
3157 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3158
Jack Jansene578a632001-08-15 01:27:14 +00003159 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003160
Guido van Rossum563e7081996-09-10 18:20:48 +00003161else
Martin v. Löwis11437992002-04-12 09:54:03 +00003162
Jack Jansene578a632001-08-15 01:27:14 +00003163 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003164 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003165 PYTHONFRAMEWORKPREFIX=
3166 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00003167 FRAMEWORKINSTALLFIRST=
3168 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00003169 FRAMEWORKALTINSTALLFIRST=
3170 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00003171 if test "x${prefix}" = "xNONE" ; then
3172 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3173 else
3174 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3175 fi
Jack Jansene578a632001-08-15 01:27:14 +00003176 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003177
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003178
Martin v. Löwiseba40652007-08-30 20:10:57 +00003179fi
3180
Michael W. Hudson54241132001-12-07 15:38:26 +00003181
3182
3183
3184
Jack Jansene578a632001-08-15 01:27:14 +00003185
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00003186
3187
Ronald Oussoren5b787322006-06-06 19:50:24 +00003188
3189
3190
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003191
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003192
Jack Jansene578a632001-08-15 01:27:14 +00003193##AC_ARG_WITH(dyld,
Matthias Klose22520ea2010-05-08 10:14:46 +00003194## AS_HELP_STRING([--with-dyld],
3195## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003196##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003197# Set name for machine-dependent library files
3198
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3200$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003201if test -z "$MACHDEP"
3202then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003203 # avoid using uname for cross builds
3204 if test "$cross_compiling" = yes; then
3205 # ac_sys_system and ac_sys_release are only used for setting
3206 # `define_xopen_source' in the case statement below. For the
3207 # current supported cross builds, this macro is not adjusted.
3208 case "$host" in
3209 *-*-linux*)
3210 ac_sys_system=Linux
3211 ;;
3212 *-*-cygwin*)
3213 ac_sys_system=Cygwin
3214 ;;
3215 *)
3216 # for now, limit cross builds to known configurations
3217 MACHDEP="unknown"
3218 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3219 esac
3220 ac_sys_release=
3221 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003222 ac_sys_system=`uname -s`
Georg Brandlfe18a112009-09-04 07:55:14 +00003223 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003224 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003225 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003226 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003227 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003228 fi
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003229 fi
3230 ac_md_system=`echo $ac_sys_system |
3231 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3232 ac_md_release=`echo $ac_sys_release |
3233 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3234 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003235
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003236 case $MACHDEP in
Victor Stinneracacbaa2011-08-20 14:02:38 +02003237 linux*) MACHDEP="linux2";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003238 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003239 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003240 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00003241 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003242 '') MACHDEP="unknown";;
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003243 esac
3244fi
3245
3246
3247if test "$cross_compiling" = yes; then
3248 case "$host" in
3249 *-*-linux*)
3250 case "$host_cpu" in
3251 arm*)
3252 _host_cpu=arm
3253 ;;
3254 *)
3255 _host_cpu=$host_cpu
3256 esac
3257 ;;
3258 *-*-cygwin*)
3259 _host_cpu=
3260 ;;
3261 *)
3262 # for now, limit cross builds to known configurations
3263 MACHDEP="unknown"
3264 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003265 esac
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003266 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003267fi
Guido van Rossum91922671997-10-09 20:24:13 +00003268
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003269# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3270# disable features if it is defined, without any means to access these
3271# features as extensions. For these systems, we skip the definition of
3272# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3273# some feature, make sure there is no alternative way to access this
3274# feature. Also, when using wildcards, make sure you have verified the
3275# need for not defining _XOPEN_SOURCE on all systems matching the
3276# wildcard, and that the wildcard does not include future systems
3277# (which may remove their limitations).
3278case $ac_sys_system/$ac_sys_release in
3279 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3280 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003281 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis7875ef62010-02-15 21:41:12 +00003282 # In addition, Stefan Krah confirms that issue #1244610 exists through
3283 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali97781b02011-07-22 23:43:42 +02003284 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Martin v. Löwiscb78de62007-12-29 18:49:21 +00003285 define_xopen_source=no
3286 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3287 # also defined. This can be overridden by defining _BSD_SOURCE
3288 # As this has a different meaning on Linux, only define it on OpenBSD
3289
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003290$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwiscb78de62007-12-29 18:49:21 +00003291
3292 ;;
Charles-François Natali97781b02011-07-22 23:43:42 +02003293 OpenBSD/*)
Martin v. Löwis5e2dd862010-02-15 08:32:00 +00003294 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3295 # also defined. This can be overridden by defining _BSD_SOURCE
3296 # As this has a different meaning on Linux, only define it on OpenBSD
3297
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003298$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis5e2dd862010-02-15 08:32:00 +00003299
3300 ;;
Martin v. Löwis4d542ec2006-11-25 15:39:19 +00003301 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3302 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3303 # Marc Recht
Benjamin Petersoneac68f42008-11-16 17:54:55 +00003304 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 +00003305 define_xopen_source=no;;
Martin v. Löwisb41afb52010-05-28 15:28:47 +00003306 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3307 # request to enable features supported by the standard as a request
3308 # to disable features not supported by the standard. The best way
3309 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3310 # entirely and define __EXTENSIONS__ instead.
3311 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003312 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003313 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3314 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003315 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003316 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003317 define_xopen_source=no;;
3318 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003319 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003320 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003321 define_xopen_source=no;;
Martin v. Löwisbb86d832008-11-04 20:40:09 +00003322 # On FreeBSD 4, the math functions C89 does not cover are never defined
3323 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3324 FreeBSD/4.*)
3325 define_xopen_source=no;;
3326 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3327 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3328 # identifies itself as Darwin/7.*
3329 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3330 # disables platform specific features beyond repair.
3331 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3332 # has no effect, don't bother defining them
3333 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003334 define_xopen_source=no;;
Ronald Oussorena55af9a2010-01-17 16:25:57 +00003335 Darwin/1[0-9].*)
3336 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003337 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3338 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3339 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003340 AIX/4)
3341 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003342 AIX/5)
3343 if test `uname -r` -eq 1; then
3344 define_xopen_source=no
3345 fi
3346 ;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00003347 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3348 # defining NI_NUMERICHOST.
3349 QNX/6.3.2)
3350 define_xopen_source=no
3351 ;;
Martin v. Löwisa0588362006-04-04 06:03:50 +00003352
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003353esac
3354
3355if test $define_xopen_source = yes
3356then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003357
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003358$as_echo "#define _XOPEN_SOURCE 600" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003359
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003360
3361 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3362 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3363 # several APIs are not declared. Since this is also needed in some
3364 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003365
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003366$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003367
3368
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003369
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003370$as_echo "#define _POSIX_C_SOURCE 200112L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003371
3372
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003373fi
3374
Guido van Rossum91922671997-10-09 20:24:13 +00003375#
3376# SGI compilers allow the specification of the both the ABI and the
3377# ISA on the command line. Depending on the values of these switches,
3378# different and often incompatable code will be generated.
3379#
3380# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3381# thus supply support for various ABI/ISA combinations. The MACHDEP
3382# variable is also adjusted.
3383#
3384
3385if test ! -z "$SGI_ABI"
3386then
3387 CC="cc $SGI_ABI"
3388 LDFLAGS="$SGI_ABI $LDFLAGS"
3389 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3390fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003391{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3392$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003393
doko@ubuntu.coma50b0de2015-04-13 21:55:59 +02003394
3395PLATDIR=plat-$MACHDEP
3396
Jack Jansen83f898c2002-12-30 22:23:40 +00003397# And add extra plat-mac for darwin
3398
Jack Jansen7b59b422003-03-17 15:44:10 +00003399
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking EXTRAPLATDIR" >&5
3401$as_echo_n "checking EXTRAPLATDIR... " >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00003402if test -z "$EXTRAPLATDIR"
3403then
3404 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00003405 darwin)
3406 EXTRAPLATDIR="\$(PLATMACDIRS)"
3407 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
3408 ;;
3409 *)
3410 EXTRAPLATDIR=""
3411 EXTRAMACHDEPPATH=""
3412 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00003413 esac
3414fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003415{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRAPLATDIR" >&5
3416$as_echo "$EXTRAPLATDIR" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00003417
Jack Jansen6b08a402004-06-03 12:41:45 +00003418# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3419# it may influence the way we can build extensions, so distutils
3420# needs to check it
3421
Ronald Oussoren988117f2006-04-29 11:31:35 +00003422
Jack Jansen6b08a402004-06-03 12:41:45 +00003423CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Ronald Oussoren988117f2006-04-29 11:31:35 +00003424EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003425
Guido van Rossum627b2d71993-12-24 10:39:16 +00003426# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003427
3428# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3429# for debug/optimization stuff. BASECFLAGS is for flags that are required
3430# just to get things to compile and link. Users are free to override OPT
3431# when running configure or make. The build should not break if they do.
3432# BASECFLAGS should generally not be messed with, however.
3433
3434# XXX shouldn't some/most/all of this code be merged with the stuff later
3435# on that fiddles with OPT and BASECFLAGS?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3437$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003438
Martin v. Löwiseba40652007-08-30 20:10:57 +00003439# Check whether --with-gcc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003440if test "${with_gcc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003441 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003442 case $withval in
Mark Dickinson04b27232009-01-04 12:29:36 +00003443 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003444 without_gcc=yes;;
3445 yes) CC=gcc
3446 without_gcc=no;;
3447 *) CC=$withval
3448 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003449 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003450else
Martin v. Löwis11437992002-04-12 09:54:03 +00003451
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003452 case $ac_sys_system in
Antoine Pitrou285cd162010-09-21 15:23:17 +00003453 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003454 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003455 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003456 case $BE_HOST_CPU in
3457 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00003458 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003459 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00003460 BASECFLAGS="$BASECFLAGS -export pragma"
3461 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003462 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003463 ;;
3464 x86)
Fred Drake5790be12000-10-09 17:06:13 +00003465 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003466 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00003467 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003468 ;;
3469 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003470 as_fn_error $? "Unknown BeOS platform \"$BE_HOST_CPU\"" "$LINENO" 5
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003471 ;;
3472 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003473 AR="\$(srcdir)/Modules/ar_beos"
3474 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003475 ;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003476 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003477 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00003478fi
3479
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003480{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3481$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003482
Guido van Rossum8b131c51995-03-09 14:10:13 +00003483# If the user switches compilers, we can't believe the cache
3484if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3485then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003486 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003487(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003488fi
3489
Trent Nelson15daa352012-12-13 06:46:39 +00003490if test "$MACHDEP" = "irix6" && test "$CC" != "gcc"; then
3491 # Normally, MIPSpro CC treats #error directives as warnings, which means
3492 # a successful exit code is returned (0). This is a problem because IRIX
3493 # has a bunch of system headers with this guard at the top:
3494 #
3495 # #ifndef __c99
3496 # #error This header file is to be used only for c99 mode compilations
3497 # #else
3498 #
3499 # When autoconf tests for such a header, like stdint.h, this happens:
3500 #
3501 # configure:4619: cc -c conftest.c >&5
3502 # cc-1035 cc: WARNING File = /usr/include/stdint.h, Line = 5
3503 # #error directive: This header file is to be used only for c99 mode
3504 # compilations
3505 #
3506 # #error This header file is to be used only for c99 mode compilations
3507 # ^
3508 #
3509 # configure:4619: $? = 0
3510 # configure:4619: result: yes
3511 #
3512 # Therefore, we use `-diag_error 1035` to have the compiler treat the
3513 # warning as an error, which causes cc to return a non-zero result,
3514 # which autoconf can interpret correctly.
3515 CFLAGS="$CFLAGS -diag_error 1035"
3516 # Whilst we're here, we might as well make sure CXX defaults to something
3517 # sensible if we're not using gcc.
3518 if test -z "$CXX"; then
3519 CXX="CC"
3520 fi
3521fi
3522
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00003523# If the user set CFLAGS, use this instead of the automatically
3524# determined setting
3525preset_cflags="$CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +00003526ac_ext=c
3527ac_cpp='$CPP $CPPFLAGS'
3528ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3529ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3530ac_compiler_gnu=$ac_cv_c_compiler_gnu
3531if test -n "$ac_tool_prefix"; then
3532 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3533set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3535$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003536if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003537 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003538else
3539 if test -n "$CC"; then
3540 ac_cv_prog_CC="$CC" # Let the user override the test.
3541else
Martin v. Löwis11437992002-04-12 09:54:03 +00003542as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3543for as_dir in $PATH
3544do
3545 IFS=$as_save_IFS
3546 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003547 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003548 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003549 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003550 $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 +00003551 break 2
3552 fi
3553done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003554 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003555IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003556
Jack Jansendd19cf82001-12-06 22:36:17 +00003557fi
3558fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003559CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003560if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3562$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003563else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3565$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003566fi
3567
Martin v. Löwiseba40652007-08-30 20:10:57 +00003568
Martin v. Löwis11437992002-04-12 09:54:03 +00003569fi
3570if test -z "$ac_cv_prog_CC"; then
3571 ac_ct_CC=$CC
3572 # Extract the first word of "gcc", so it can be a program name with args.
3573set dummy gcc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3575$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003576if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003577 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003578else
3579 if test -n "$ac_ct_CC"; then
3580 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3581else
3582as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3583for as_dir in $PATH
3584do
3585 IFS=$as_save_IFS
3586 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003587 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003588 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003589 ac_cv_prog_ac_ct_CC="gcc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003590 $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 +00003591 break 2
3592 fi
3593done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003594 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003595IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003596
3597fi
3598fi
3599ac_ct_CC=$ac_cv_prog_ac_ct_CC
3600if test -n "$ac_ct_CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3602$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003603else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3605$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003606fi
3607
Martin v. Löwiseba40652007-08-30 20:10:57 +00003608 if test "x$ac_ct_CC" = x; then
3609 CC=""
3610 else
3611 case $cross_compiling:$ac_tool_warned in
3612yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003613{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3614$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00003615ac_tool_warned=yes ;;
3616esac
3617 CC=$ac_ct_CC
3618 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003619else
3620 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003621fi
3622
Jack Jansendd19cf82001-12-06 22:36:17 +00003623if test -z "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003624 if test -n "$ac_tool_prefix"; then
3625 # 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 +00003626set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3628$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003629if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003630 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003631else
3632 if test -n "$CC"; then
3633 ac_cv_prog_CC="$CC" # Let the user override the test.
3634else
Martin v. Löwis11437992002-04-12 09:54:03 +00003635as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3636for as_dir in $PATH
3637do
3638 IFS=$as_save_IFS
3639 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003640 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003641 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003642 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003643 $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 +00003644 break 2
3645 fi
3646done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003647 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003648IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003649
3650fi
3651fi
3652CC=$ac_cv_prog_CC
3653if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3655$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003656else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3658$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003659fi
3660
Martin v. Löwiseba40652007-08-30 20:10:57 +00003661
Martin v. Löwis11437992002-04-12 09:54:03 +00003662 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003663fi
3664if test -z "$CC"; then
3665 # Extract the first word of "cc", so it can be a program name with args.
3666set dummy cc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3668$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003669if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003670 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003671else
3672 if test -n "$CC"; then
3673 ac_cv_prog_CC="$CC" # Let the user override the test.
3674else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003675 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003676as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3677for as_dir in $PATH
3678do
3679 IFS=$as_save_IFS
3680 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003681 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003682 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003683 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3684 ac_prog_rejected=yes
3685 continue
3686 fi
3687 ac_cv_prog_CC="cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003688 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003689 break 2
3690 fi
3691done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003692 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003693IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003694
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003695if test $ac_prog_rejected = yes; then
3696 # We found a bogon in the path, so make sure we never use it.
3697 set dummy $ac_cv_prog_CC
3698 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003699 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003700 # We chose a different compiler from the bogus one.
3701 # However, it has the same basename, so the bogon will be chosen
3702 # first if we set CC to just the basename; use the full file name.
3703 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003704 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003705 fi
3706fi
3707fi
3708fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003709CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003710if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3712$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003713else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3715$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003716fi
3717
Martin v. Löwiseba40652007-08-30 20:10:57 +00003718
Martin v. Löwis11437992002-04-12 09:54:03 +00003719fi
3720if test -z "$CC"; then
3721 if test -n "$ac_tool_prefix"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003722 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003723 do
3724 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3725set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003726{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3727$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003728if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003729 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003730else
3731 if test -n "$CC"; then
3732 ac_cv_prog_CC="$CC" # Let the user override the test.
3733else
Martin v. Löwis11437992002-04-12 09:54:03 +00003734as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3735for as_dir in $PATH
3736do
3737 IFS=$as_save_IFS
3738 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003739 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003740 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003741 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003742 $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 +00003743 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003744 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003745done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003746 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003747IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003748
3749fi
3750fi
3751CC=$ac_cv_prog_CC
3752if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3754$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003755else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003756 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3757$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003758fi
3759
Martin v. Löwiseba40652007-08-30 20:10:57 +00003760
Martin v. Löwis11437992002-04-12 09:54:03 +00003761 test -n "$CC" && break
3762 done
3763fi
3764if test -z "$CC"; then
3765 ac_ct_CC=$CC
Martin v. Löwiseba40652007-08-30 20:10:57 +00003766 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003767do
3768 # Extract the first word of "$ac_prog", so it can be a program name with args.
3769set dummy $ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3771$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003772if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003773 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003774else
3775 if test -n "$ac_ct_CC"; then
3776 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3777else
3778as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3779for as_dir in $PATH
3780do
3781 IFS=$as_save_IFS
3782 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003783 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003784 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003785 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003786 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003787 break 2
3788 fi
3789done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003790 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003791IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003792
Martin v. Löwis11437992002-04-12 09:54:03 +00003793fi
3794fi
3795ac_ct_CC=$ac_cv_prog_ac_ct_CC
3796if test -n "$ac_ct_CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3798$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003799else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3801$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003802fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003803
Martin v. Löwiseba40652007-08-30 20:10:57 +00003804
Martin v. Löwis11437992002-04-12 09:54:03 +00003805 test -n "$ac_ct_CC" && break
3806done
Michael W. Hudson54241132001-12-07 15:38:26 +00003807
Martin v. Löwiseba40652007-08-30 20:10:57 +00003808 if test "x$ac_ct_CC" = x; then
3809 CC=""
3810 else
3811 case $cross_compiling:$ac_tool_warned in
3812yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003813{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3814$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00003815ac_tool_warned=yes ;;
3816esac
3817 CC=$ac_ct_CC
3818 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003819fi
3820
3821fi
3822
3823
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003824test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3825$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003826as_fn_error $? "no acceptable C compiler found in \$PATH
Matthias Klose3cef2a92012-03-14 23:39:33 +01003827See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003828
3829# Provide some information about the compiler.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003830$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3831set X $ac_compile
3832ac_compiler=$2
3833for ac_option in --version -v -V -qversion; do
3834 { { ac_try="$ac_compiler $ac_option >&5"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003835case "(($ac_try" in
3836 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3837 *) ac_try_echo=$ac_try;;
3838esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003839eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3840$as_echo "$ac_try_echo"; } >&5
3841 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003842 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003843 if test -s conftest.err; then
3844 sed '10a\
3845... rest of stderr output deleted ...
3846 10q' conftest.err >conftest.er1
3847 cat conftest.er1 >&5
3848 fi
3849 rm -f conftest.er1 conftest.err
3850 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3851 test $ac_status = 0; }
3852done
Martin v. Löwis11437992002-04-12 09:54:03 +00003853
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003854cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003855/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003856
Martin v. Löwis11437992002-04-12 09:54:03 +00003857int
3858main ()
3859{
3860
3861 ;
3862 return 0;
3863}
3864_ACEOF
3865ac_clean_files_save=$ac_clean_files
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003866ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003867# Try to create an executable without -o first, disregard a.out.
3868# It will help us diagnose broken compilers, and finding out an intuition
3869# of exeext.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3871$as_echo_n "checking whether the C compiler works... " >&6; }
3872ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3873
3874# The possible output files:
3875ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3876
Martin v. Löwiseba40652007-08-30 20:10:57 +00003877ac_rmfiles=
3878for ac_file in $ac_files
3879do
3880 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003881 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00003882 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3883 esac
3884done
3885rm -f $ac_rmfiles
3886
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003887if { { ac_try="$ac_link_default"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003888case "(($ac_try" in
3889 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3890 *) ac_try_echo=$ac_try;;
3891esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003892eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3893$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003894 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003895 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003896 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3897 test $ac_status = 0; }; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003898 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3899# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3900# in a Makefile. We should not override ac_cv_exeext if it was cached,
3901# so that the user can short-circuit this test for compilers unknown to
3902# Autoconf.
3903for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003904do
3905 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003906 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003907 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Skip Montanarof0d5f792004-08-15 14:08:23 +00003908 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003909 [ab].out )
Skip Montanarof0d5f792004-08-15 14:08:23 +00003910 # We found the default executable, but exeext='' is most
3911 # certainly right.
3912 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003913 *.* )
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003914 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Martin v. Löwiseba40652007-08-30 20:10:57 +00003915 then :; else
3916 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3917 fi
3918 # We set ac_cv_exeext here because the later test for it is not
3919 # safe: cross compilers may not add the suffix if given an `-o'
3920 # argument, so we may need to know it at that point already.
3921 # Even if this section looks crufty: it has the advantage of
3922 # actually working.
Skip Montanarof0d5f792004-08-15 14:08:23 +00003923 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003924 * )
Skip Montanarof0d5f792004-08-15 14:08:23 +00003925 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003926 esac
3927done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003928test "$ac_cv_exeext" = no && ac_cv_exeext=
3929
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003930else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003931 ac_file=''
3932fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003933if test -z "$ac_file"; then :
3934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3935$as_echo "no" >&6; }
3936$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003937sed 's/^/| /' conftest.$ac_ext >&5
3938
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003939{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3940$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003941as_fn_error 77 "C compiler cannot create executables
Matthias Klose3cef2a92012-03-14 23:39:33 +01003942See \`config.log' for more details" "$LINENO" 5; }
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003943else
3944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3945$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003946fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3948$as_echo_n "checking for C compiler default output file name... " >&6; }
3949{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3950$as_echo "$ac_file" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003951ac_exeext=$ac_cv_exeext
Michael W. Hudson54241132001-12-07 15:38:26 +00003952
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003953rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00003954ac_clean_files=$ac_clean_files_save
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3956$as_echo_n "checking for suffix of executables... " >&6; }
3957if { { ac_try="$ac_link"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003958case "(($ac_try" in
3959 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3960 *) ac_try_echo=$ac_try;;
3961esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003962eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3963$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003964 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003965 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003966 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3967 test $ac_status = 0; }; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00003968 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3969# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3970# work properly (i.e., refer to `conftest.exe'), while it won't with
3971# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00003972for ac_file in conftest.exe conftest conftest.*; do
3973 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003974 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003975 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003976 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
Skip Montanarof0d5f792004-08-15 14:08:23 +00003977 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003978 * ) break;;
3979 esac
3980done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003981else
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 $? "cannot compute suffix of executables: cannot compile and link
Matthias Klose3cef2a92012-03-14 23:39:33 +01003985See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003986fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003987rm -f conftest conftest$ac_cv_exeext
3988{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3989$as_echo "$ac_cv_exeext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003990
3991rm -f conftest.$ac_ext
3992EXEEXT=$ac_cv_exeext
3993ac_exeext=$EXEEXT
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003994cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3995/* end confdefs.h. */
3996#include <stdio.h>
3997int
3998main ()
3999{
4000FILE *f = fopen ("conftest.out", "w");
4001 return ferror (f) || fclose (f) != 0;
4002
4003 ;
4004 return 0;
4005}
Skip Montanaro6dead952003-09-25 14:50:04 +00004006_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004007ac_clean_files="$ac_clean_files conftest.out"
4008# Check that the compiler produces executables we can run. If not, either
4009# the compiler is broken, or we cross compile.
4010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4011$as_echo_n "checking whether we are cross compiling... " >&6; }
4012if test "$cross_compiling" != yes; then
4013 { { ac_try="$ac_link"
4014case "(($ac_try" in
4015 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4016 *) ac_try_echo=$ac_try;;
4017esac
4018eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4019$as_echo "$ac_try_echo"; } >&5
4020 (eval "$ac_link") 2>&5
4021 ac_status=$?
4022 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4023 test $ac_status = 0; }
4024 if { ac_try='./conftest$ac_cv_exeext'
4025 { { case "(($ac_try" in
4026 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4027 *) ac_try_echo=$ac_try;;
4028esac
4029eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4030$as_echo "$ac_try_echo"; } >&5
4031 (eval "$ac_try") 2>&5
4032 ac_status=$?
4033 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4034 test $ac_status = 0; }; }; then
4035 cross_compiling=no
4036 else
4037 if test "$cross_compiling" = maybe; then
4038 cross_compiling=yes
4039 else
4040 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4041$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004042as_fn_error $? "cannot run C compiled programs.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004043If you meant to cross compile, use \`--host'.
Matthias Klose3cef2a92012-03-14 23:39:33 +01004044See \`config.log' for more details" "$LINENO" 5; }
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004045 fi
4046 fi
4047fi
4048{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4049$as_echo "$cross_compiling" >&6; }
4050
4051rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4052ac_clean_files=$ac_clean_files_save
4053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4054$as_echo_n "checking for suffix of object files... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004055if ${ac_cv_objext+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004056 $as_echo_n "(cached) " >&6
4057else
4058 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004059/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004060
Martin v. Löwis11437992002-04-12 09:54:03 +00004061int
4062main ()
4063{
4064
4065 ;
4066 return 0;
4067}
4068_ACEOF
4069rm -f conftest.o conftest.obj
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004070if { { ac_try="$ac_compile"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004071case "(($ac_try" in
4072 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4073 *) ac_try_echo=$ac_try;;
4074esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004075eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4076$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00004077 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004078 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004079 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4080 test $ac_status = 0; }; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004081 for ac_file in conftest.o conftest.obj conftest.*; do
4082 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004083 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004084 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004085 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4086 break;;
4087 esac
4088done
4089else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004090 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004091sed 's/^/| /' conftest.$ac_ext >&5
4092
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004093{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4094$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004095as_fn_error $? "cannot compute suffix of object files: cannot compile
Matthias Klose3cef2a92012-03-14 23:39:33 +01004096See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004097fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004098rm -f conftest.$ac_cv_objext conftest.$ac_ext
4099fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004100{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4101$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004102OBJEXT=$ac_cv_objext
4103ac_objext=$OBJEXT
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4105$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004106if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004107 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004108else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004109 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004110/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004111
Martin v. Löwis11437992002-04-12 09:54:03 +00004112int
4113main ()
4114{
4115#ifndef __GNUC__
4116 choke me
4117#endif
4118
4119 ;
4120 return 0;
4121}
4122_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004123if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004124 ac_compiler_gnu=yes
4125else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004126 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004127fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004128rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004129ac_cv_c_compiler_gnu=$ac_compiler_gnu
4130
4131fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004132{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4133$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4134if test $ac_compiler_gnu = yes; then
4135 GCC=yes
4136else
4137 GCC=
4138fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004139ac_test_CFLAGS=${CFLAGS+set}
4140ac_save_CFLAGS=$CFLAGS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4142$as_echo_n "checking whether $CC accepts -g... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004143if ${ac_cv_prog_cc_g+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004144 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004145else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004146 ac_save_c_werror_flag=$ac_c_werror_flag
4147 ac_c_werror_flag=yes
4148 ac_cv_prog_cc_g=no
4149 CFLAGS="-g"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004150 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004151/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004152
Martin v. Löwis11437992002-04-12 09:54:03 +00004153int
4154main ()
4155{
4156
4157 ;
4158 return 0;
4159}
4160_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004161if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004162 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004163else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004164 CFLAGS=""
4165 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004166/* end confdefs.h. */
4167
4168int
4169main ()
4170{
4171
4172 ;
4173 return 0;
4174}
4175_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004176if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004177
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004178else
4179 ac_c_werror_flag=$ac_save_c_werror_flag
Martin v. Löwiseba40652007-08-30 20:10:57 +00004180 CFLAGS="-g"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004181 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004182/* end confdefs.h. */
4183
4184int
4185main ()
4186{
4187
4188 ;
4189 return 0;
4190}
4191_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004192if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004193 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004194fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004195rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004196fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004197rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4198fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004199rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4200 ac_c_werror_flag=$ac_save_c_werror_flag
4201fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004202{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4203$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004204if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004205 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004206elif test $ac_cv_prog_cc_g = yes; then
4207 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004208 CFLAGS="-g -O2"
4209 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004210 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004211 fi
4212else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004213 if test "$GCC" = yes; then
4214 CFLAGS="-O2"
4215 else
4216 CFLAGS=
4217 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004218fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004219{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4220$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004221if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004222 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004223else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004224 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004225ac_save_CC=$CC
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004226cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004227/* end confdefs.h. */
4228#include <stdarg.h>
4229#include <stdio.h>
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004230struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004231/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4232struct buf { int x; };
4233FILE * (*rcsopen) (struct buf *, struct stat *, int);
4234static char *e (p, i)
4235 char **p;
4236 int i;
4237{
4238 return p[i];
4239}
4240static char *f (char * (*g) (char **, int), char **p, ...)
4241{
4242 char *s;
4243 va_list v;
4244 va_start (v,p);
4245 s = g (p, va_arg (v,int));
4246 va_end (v);
4247 return s;
4248}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004249
4250/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4251 function prototypes and stuff, but not '\xHH' hex character constants.
4252 These don't provoke an error unfortunately, instead are silently treated
Martin v. Löwiseba40652007-08-30 20:10:57 +00004253 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004254 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4255 array size at least. It's necessary to write '\x00'==0 to get something
Martin v. Löwiseba40652007-08-30 20:10:57 +00004256 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004257int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4258
Martin v. Löwiseba40652007-08-30 20:10:57 +00004259/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4260 inside strings and character constants. */
4261#define FOO(x) 'x'
4262int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4263
Skip Montanaro6dead952003-09-25 14:50:04 +00004264int test (int i, double x);
4265struct s1 {int (*f) (int a);};
4266struct s2 {int (*f) (double a);};
4267int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4268int argc;
4269char **argv;
4270int
4271main ()
4272{
4273return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4274 ;
4275 return 0;
4276}
4277_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00004278for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4279 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004280do
4281 CC="$ac_save_CC $ac_arg"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004282 if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004283 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004284fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004285rm -f core conftest.err conftest.$ac_objext
4286 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004287done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004288rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004289CC=$ac_save_CC
4290
4291fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004292# AC_CACHE_VAL
4293case "x$ac_cv_prog_cc_c89" in
4294 x)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4296$as_echo "none needed" >&6; } ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00004297 xno)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4299$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004300 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00004301 CC="$CC $ac_cv_prog_cc_c89"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4303$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004304esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004305if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004306
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004307fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004308
Martin v. Löwis11437992002-04-12 09:54:03 +00004309ac_ext=c
4310ac_cpp='$CPP $CPPFLAGS'
4311ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4312ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4313ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004314
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00004315if test ! -z "$preset_cflags"
4316then
4317 CFLAGS=$preset_cflags
4318fi
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004319
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004320
4321
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4323$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004324
Martin v. Löwiseba40652007-08-30 20:10:57 +00004325# Check whether --with-cxx_main was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004326if test "${with_cxx_main+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004327 withval=$with_cxx_main;
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004328
4329 case $withval in
4330 no) with_cxx_main=no
4331 MAINCC='$(CC)';;
4332 yes) with_cxx_main=yes
4333 MAINCC='$(CXX)';;
4334 *) with_cxx_main=yes
4335 MAINCC=$withval
4336 if test -z "$CXX"
4337 then
4338 CXX=$withval
4339 fi;;
4340 esac
4341else
4342
4343 with_cxx_main=no
4344 MAINCC='$(CC)'
4345
Martin v. Löwiseba40652007-08-30 20:10:57 +00004346fi
4347
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004348{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4349$as_echo "$with_cxx_main" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004350
4351preset_cxx="$CXX"
4352if test -z "$CXX"
4353then
4354 case "$CC" in
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004355 gcc) if test -n "$ac_tool_prefix"; then
4356 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4357set dummy ${ac_tool_prefix}g++; ac_word=$2
4358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4359$as_echo_n "checking for $ac_word... " >&6; }
4360if ${ac_cv_path_CXX+:} false; then :
4361 $as_echo_n "(cached) " >&6
4362else
4363 case $CXX in
4364 [\\/]* | ?:[\\/]*)
4365 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4366 ;;
4367 *)
4368 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4369for as_dir in notfound
4370do
4371 IFS=$as_save_IFS
4372 test -z "$as_dir" && as_dir=.
4373 for ac_exec_ext in '' $ac_executable_extensions; do
4374 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4375 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4376 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4377 break 2
4378 fi
4379done
4380 done
4381IFS=$as_save_IFS
4382
4383 ;;
4384esac
4385fi
4386CXX=$ac_cv_path_CXX
4387if test -n "$CXX"; then
4388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4389$as_echo "$CXX" >&6; }
4390else
4391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4392$as_echo "no" >&6; }
4393fi
4394
4395
4396fi
4397if test -z "$ac_cv_path_CXX"; then
4398 ac_pt_CXX=$CXX
4399 # Extract the first word of "g++", so it can be a program name with args.
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004400set dummy g++; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4402$as_echo_n "checking for $ac_word... " >&6; }
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004403if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004404 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004405else
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004406 case $ac_pt_CXX in
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004407 [\\/]* | ?:[\\/]*)
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004408 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 +00004409 ;;
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=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004416 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004417 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004418 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004419 $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 +00004420 break 2
4421 fi
4422done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004423 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004424IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004425
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004426 ;;
4427esac
4428fi
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004429ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4430if test -n "$ac_pt_CXX"; then
4431 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4432$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004433else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4435$as_echo "no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004436fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004437
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004438 if test "x$ac_pt_CXX" = x; then
4439 CXX="g++"
4440 else
4441 case $cross_compiling:$ac_tool_warned in
4442yes:)
4443{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4444$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4445ac_tool_warned=yes ;;
4446esac
4447 CXX=$ac_pt_CXX
4448 fi
4449else
4450 CXX="$ac_cv_path_CXX"
4451fi
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004452 ;;
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004453 cc) if test -n "$ac_tool_prefix"; then
4454 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4455set dummy ${ac_tool_prefix}c++; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4457$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004458if ${ac_cv_path_CXX+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004459 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004460else
4461 case $CXX in
4462 [\\/]* | ?:[\\/]*)
4463 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4464 ;;
4465 *)
4466 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4467for as_dir in notfound
4468do
4469 IFS=$as_save_IFS
4470 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004471 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004472 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004473 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004474 $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 +00004475 break 2
4476 fi
4477done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004478 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004479IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004480
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004481 ;;
4482esac
4483fi
4484CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00004485if test -n "$CXX"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004486 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4487$as_echo "$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004488else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4490$as_echo "no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004491fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004492
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004493
4494fi
4495if test -z "$ac_cv_path_CXX"; then
4496 ac_pt_CXX=$CXX
4497 # Extract the first word of "c++", so it can be a program name with args.
4498set dummy c++; ac_word=$2
4499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4500$as_echo_n "checking for $ac_word... " >&6; }
4501if ${ac_cv_path_ac_pt_CXX+:} false; then :
4502 $as_echo_n "(cached) " >&6
4503else
4504 case $ac_pt_CXX in
4505 [\\/]* | ?:[\\/]*)
4506 ac_cv_path_ac_pt_CXX="$ac_pt_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=.
4514 for ac_exec_ext in '' $ac_executable_extensions; do
4515 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4516 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4517 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4518 break 2
4519 fi
4520done
4521 done
4522IFS=$as_save_IFS
4523
4524 ;;
4525esac
4526fi
4527ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4528if test -n "$ac_pt_CXX"; then
4529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4530$as_echo "$ac_pt_CXX" >&6; }
4531else
4532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4533$as_echo "no" >&6; }
4534fi
4535
4536 if test "x$ac_pt_CXX" = x; then
4537 CXX="c++"
4538 else
4539 case $cross_compiling:$ac_tool_warned in
4540yes:)
4541{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4542$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4543ac_tool_warned=yes ;;
4544esac
4545 CXX=$ac_pt_CXX
4546 fi
4547else
4548 CXX="$ac_cv_path_CXX"
4549fi
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004550 ;;
4551 esac
4552 if test "$CXX" = "notfound"
4553 then
4554 CXX=""
4555 fi
4556fi
4557if test -z "$CXX"
4558then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004559 if test -n "$ac_tool_prefix"; then
4560 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4561 do
4562 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4563set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4565$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004566if ${ac_cv_prog_CXX+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004567 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004568else
4569 if test -n "$CXX"; then
4570 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4571else
4572as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4573for as_dir in $PATH
4574do
4575 IFS=$as_save_IFS
4576 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004577 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004578 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004579 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004580 $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 +00004581 break 2
4582 fi
4583done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004584 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004585IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004586
4587fi
4588fi
4589CXX=$ac_cv_prog_CXX
4590if test -n "$CXX"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004591 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4592$as_echo "$CXX" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004593else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4595$as_echo "no" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004596fi
4597
Martin v. Löwiseba40652007-08-30 20:10:57 +00004598
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004599 test -n "$CXX" && break
4600 done
4601fi
4602if test -z "$CXX"; then
4603 ac_ct_CXX=$CXX
4604 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4605do
4606 # Extract the first word of "$ac_prog", so it can be a program name with args.
4607set dummy $ac_prog; ac_word=$2
4608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4609$as_echo_n "checking for $ac_word... " >&6; }
4610if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4611 $as_echo_n "(cached) " >&6
4612else
4613 if test -n "$ac_ct_CXX"; then
4614 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4615else
4616as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4617for as_dir in $PATH
4618do
4619 IFS=$as_save_IFS
4620 test -z "$as_dir" && as_dir=.
4621 for ac_exec_ext in '' $ac_executable_extensions; do
4622 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4623 ac_cv_prog_ac_ct_CXX="$ac_prog"
4624 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4625 break 2
4626 fi
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004627done
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004628 done
4629IFS=$as_save_IFS
4630
4631fi
4632fi
4633ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4634if test -n "$ac_ct_CXX"; then
4635 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4636$as_echo "$ac_ct_CXX" >&6; }
4637else
4638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4639$as_echo "no" >&6; }
4640fi
4641
4642
4643 test -n "$ac_ct_CXX" && break
4644done
4645
4646 if test "x$ac_ct_CXX" = x; then
4647 CXX="notfound"
4648 else
4649 case $cross_compiling:$ac_tool_warned in
4650yes:)
4651{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4652$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4653ac_tool_warned=yes ;;
4654esac
4655 CXX=$ac_ct_CXX
4656 fi
4657fi
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004658
4659 if test "$CXX" = "notfound"
4660 then
4661 CXX=""
4662 fi
4663fi
4664if test "$preset_cxx" != "$CXX"
4665then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004666 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004667
4668 By default, distutils will build C++ extension modules with \"$CXX\".
4669 If this is not intended, then set CXX on the configure command line.
4670 " >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004671$as_echo "$as_me: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004672
4673 By default, distutils will build C++ extension modules with \"$CXX\".
4674 If this is not intended, then set CXX on the configure command line.
4675 " >&2;}
4676fi
4677
doko@python.org4e63fbe2013-01-25 13:08:27 +01004678MULTIARCH=$($CC --print-multiarch 2>/dev/null)
4679
4680
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004681
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004682# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004683
4684ac_ext=c
4685ac_cpp='$CPP $CPPFLAGS'
4686ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4687ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4688ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4690$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004691# On Suns, sometimes $CPP names a directory.
4692if test -n "$CPP" && test -d "$CPP"; then
4693 CPP=
4694fi
4695if test -z "$CPP"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +01004696 if ${ac_cv_prog_CPP+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004697 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004698else
Martin v. Löwis11437992002-04-12 09:54:03 +00004699 # Double quotes because CPP needs to be expanded
4700 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4701 do
4702 ac_preproc_ok=false
4703for ac_c_preproc_warn_flag in '' yes
4704do
4705 # Use a header file that comes with gcc, so configuring glibc
4706 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004707 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4708 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004709 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004710 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004711 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004712/* end confdefs.h. */
4713#ifdef __STDC__
4714# include <limits.h>
4715#else
4716# include <assert.h>
4717#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004718 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004719_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004720if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004721
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004722else
Martin v. Löwis11437992002-04-12 09:54:03 +00004723 # Broken: fails on valid input.
4724continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004725fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004726rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004727
Martin v. Löwiseba40652007-08-30 20:10:57 +00004728 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004729 # can be detected and how.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004730 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004731/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004732#include <ac_nonexistent.h>
4733_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004734if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004735 # Broken: success on invalid input.
4736continue
4737else
Martin v. Löwis11437992002-04-12 09:54:03 +00004738 # Passes both tests.
4739ac_preproc_ok=:
4740break
4741fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004742rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004743
4744done
4745# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004746rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004747if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004748 break
4749fi
4750
4751 done
4752 ac_cv_prog_CPP=$CPP
4753
4754fi
4755 CPP=$ac_cv_prog_CPP
4756else
4757 ac_cv_prog_CPP=$CPP
4758fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004759{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4760$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004761ac_preproc_ok=false
4762for ac_c_preproc_warn_flag in '' yes
4763do
4764 # Use a header file that comes with gcc, so configuring glibc
4765 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004766 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4767 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004768 # On the NeXT, cc -E runs the code through the compiler's parser,
4769 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004770 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004771/* end confdefs.h. */
4772#ifdef __STDC__
4773# include <limits.h>
4774#else
4775# include <assert.h>
4776#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004777 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004778_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004779if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004780
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004781else
Martin v. Löwis11437992002-04-12 09:54:03 +00004782 # Broken: fails on valid input.
4783continue
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
Martin v. Löwiseba40652007-08-30 20:10:57 +00004787 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004788 # can be detected and how.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004789 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004790/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004791#include <ac_nonexistent.h>
4792_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004793if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004794 # Broken: success on invalid input.
4795continue
4796else
Martin v. Löwis11437992002-04-12 09:54:03 +00004797 # Passes both tests.
4798ac_preproc_ok=:
4799break
4800fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004801rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004802
4803done
4804# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004805rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004806if $ac_preproc_ok; then :
4807
Martin v. Löwis11437992002-04-12 09:54:03 +00004808else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004809 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4810$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004811as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
Matthias Klose3cef2a92012-03-14 23:39:33 +01004812See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004813fi
4814
4815ac_ext=c
4816ac_cpp='$CPP $CPPFLAGS'
4817ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4818ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4819ac_compiler_gnu=$ac_cv_c_compiler_gnu
4820
4821
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4823$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004824if ${ac_cv_path_GREP+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004825 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004826else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004827 if test -z "$GREP"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004828 ac_path_GREP_found=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004829 # Loop through the user's path and test for each of PROGNAME-LIST
4830 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00004831for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4832do
4833 IFS=$as_save_IFS
4834 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004835 for ac_prog in grep ggrep; do
4836 for ac_exec_ext in '' $ac_executable_extensions; do
4837 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004838 as_fn_executable_p "$ac_path_GREP" || continue
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004839# Check for GNU ac_path_GREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004840 # Check for GNU $ac_path_GREP
4841case `"$ac_path_GREP" --version 2>&1` in
4842*GNU*)
4843 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4844*)
4845 ac_count=0
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004846 $as_echo_n 0123456789 >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004847 while :
4848 do
4849 cat "conftest.in" "conftest.in" >"conftest.tmp"
4850 mv "conftest.tmp" "conftest.in"
4851 cp "conftest.in" "conftest.nl"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004852 $as_echo 'GREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004853 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4854 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004855 as_fn_arith $ac_count + 1 && ac_count=$as_val
Martin v. Löwiseba40652007-08-30 20:10:57 +00004856 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4857 # Best one so far, save it but keep looking for a better one
4858 ac_cv_path_GREP="$ac_path_GREP"
4859 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00004860 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004861 # 10*(2^10) chars as input seems more than enough
4862 test $ac_count -gt 10 && break
4863 done
4864 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4865esac
4866
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004867 $ac_path_GREP_found && break 3
4868 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004869 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004870 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004871IFS=$as_save_IFS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004872 if test -z "$ac_cv_path_GREP"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004873 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 +00004874 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004875else
4876 ac_cv_path_GREP=$GREP
4877fi
4878
Martin v. Löwiseba40652007-08-30 20:10:57 +00004879fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004880{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4881$as_echo "$ac_cv_path_GREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00004882 GREP="$ac_cv_path_GREP"
4883
4884
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4886$as_echo_n "checking for egrep... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004887if ${ac_cv_path_EGREP+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004888 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +00004889else
4890 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4891 then ac_cv_path_EGREP="$GREP -E"
4892 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004893 if test -z "$EGREP"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004894 ac_path_EGREP_found=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004895 # Loop through the user's path and test for each of PROGNAME-LIST
4896 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00004897for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4898do
4899 IFS=$as_save_IFS
4900 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004901 for ac_prog in egrep; do
4902 for ac_exec_ext in '' $ac_executable_extensions; do
4903 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004904 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004905# Check for GNU ac_path_EGREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004906 # Check for GNU $ac_path_EGREP
4907case `"$ac_path_EGREP" --version 2>&1` in
4908*GNU*)
4909 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4910*)
4911 ac_count=0
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004912 $as_echo_n 0123456789 >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004913 while :
4914 do
4915 cat "conftest.in" "conftest.in" >"conftest.tmp"
4916 mv "conftest.tmp" "conftest.in"
4917 cp "conftest.in" "conftest.nl"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004918 $as_echo 'EGREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004919 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4920 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004921 as_fn_arith $ac_count + 1 && ac_count=$as_val
Martin v. Löwiseba40652007-08-30 20:10:57 +00004922 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4923 # Best one so far, save it but keep looking for a better one
4924 ac_cv_path_EGREP="$ac_path_EGREP"
4925 ac_path_EGREP_max=$ac_count
4926 fi
4927 # 10*(2^10) chars as input seems more than enough
4928 test $ac_count -gt 10 && break
4929 done
4930 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4931esac
4932
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004933 $ac_path_EGREP_found && break 3
4934 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004935 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004936 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004937IFS=$as_save_IFS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004938 if test -z "$ac_cv_path_EGREP"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004939 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 +00004940 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004941else
4942 ac_cv_path_EGREP=$EGREP
4943fi
4944
Martin v. Löwiseba40652007-08-30 20:10:57 +00004945 fi
4946fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004947{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4948$as_echo "$ac_cv_path_EGREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00004949 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00004950
4951
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4953$as_echo_n "checking for ANSI C header files... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004954if ${ac_cv_header_stdc+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004955 $as_echo_n "(cached) " >&6
4956else
4957 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00004958/* end confdefs.h. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004959#include <stdlib.h>
4960#include <stdarg.h>
4961#include <string.h>
4962#include <float.h>
4963
4964int
4965main ()
4966{
4967
4968 ;
4969 return 0;
4970}
4971_ACEOF
4972if ac_fn_c_try_compile "$LINENO"; then :
4973 ac_cv_header_stdc=yes
4974else
4975 ac_cv_header_stdc=no
4976fi
4977rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4978
4979if test $ac_cv_header_stdc = yes; then
4980 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4981 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4982/* end confdefs.h. */
4983#include <string.h>
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00004984
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00004985_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004986if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004987 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004988
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004989else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004990 ac_cv_header_stdc=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004991fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00004992rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004993
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004994fi
4995
4996if test $ac_cv_header_stdc = yes; then
4997 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4998 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4999/* end confdefs.h. */
5000#include <stdlib.h>
5001
5002_ACEOF
5003if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5004 $EGREP "free" >/dev/null 2>&1; then :
5005
5006else
5007 ac_cv_header_stdc=no
5008fi
5009rm -f conftest*
5010
5011fi
5012
5013if test $ac_cv_header_stdc = yes; then
5014 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5015 if test "$cross_compiling" = yes; then :
5016 :
5017else
5018 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5019/* end confdefs.h. */
5020#include <ctype.h>
5021#include <stdlib.h>
5022#if ((' ' & 0x0FF) == 0x020)
5023# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5024# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5025#else
5026# define ISLOWER(c) \
5027 (('a' <= (c) && (c) <= 'i') \
5028 || ('j' <= (c) && (c) <= 'r') \
5029 || ('s' <= (c) && (c) <= 'z'))
5030# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5031#endif
5032
5033#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5034int
5035main ()
5036{
5037 int i;
5038 for (i = 0; i < 256; i++)
5039 if (XOR (islower (i), ISLOWER (i))
5040 || toupper (i) != TOUPPER (i))
5041 return 2;
5042 return 0;
5043}
5044_ACEOF
5045if ac_fn_c_try_run "$LINENO"; then :
5046
5047else
5048 ac_cv_header_stdc=no
5049fi
5050rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5051 conftest.$ac_objext conftest.beam conftest.$ac_ext
5052fi
5053
5054fi
5055fi
5056{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5057$as_echo "$ac_cv_header_stdc" >&6; }
5058if test $ac_cv_header_stdc = yes; then
5059
5060$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5061
5062fi
5063
5064# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5065for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5066 inttypes.h stdint.h unistd.h
5067do :
5068 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5069ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5070"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00005071if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005072 cat >>confdefs.h <<_ACEOF
5073#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5074_ACEOF
5075
5076fi
5077
5078done
5079
5080
5081
5082 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 +01005083if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005084 MINIX=yes
5085else
5086 MINIX=
5087fi
5088
5089
5090 if test "$MINIX" = yes; then
5091
5092$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5093
5094
5095$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5096
5097
5098$as_echo "#define _MINIX 1" >>confdefs.h
5099
5100 fi
5101
5102
5103 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5104$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005105if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005106 $as_echo_n "(cached) " >&6
5107else
5108 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5109/* end confdefs.h. */
5110
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005111# define __EXTENSIONS__ 1
5112 $ac_includes_default
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005113int
5114main ()
5115{
5116
5117 ;
5118 return 0;
5119}
5120_ACEOF
5121if ac_fn_c_try_compile "$LINENO"; then :
5122 ac_cv_safe_to_define___extensions__=yes
5123else
5124 ac_cv_safe_to_define___extensions__=no
5125fi
5126rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5127fi
5128{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5129$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5130 test $ac_cv_safe_to_define___extensions__ = yes &&
5131 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5132
5133 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5134
5135 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5136
5137 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5138
5139 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5140
5141
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005142
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005143# Check for unsupported systems
5144case $ac_sys_system/$ac_sys_release in
5145atheos*|Linux*/1*)
5146 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5147 echo See README for details.
5148 exit 1;;
5149esac
5150
5151
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5153$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005154
5155# Check whether --with-suffix was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005156if test "${with_suffix+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005157 withval=$with_suffix;
5158 case $withval in
5159 no) EXEEXT=;;
5160 yes) EXEEXT=.exe;;
5161 *) EXEEXT=$withval;;
5162 esac
5163fi
5164
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005165{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5166$as_echo "$EXEEXT" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005167
5168# Test whether we're running on a non-case-sensitive system, in which
5169# case we give a warning if no ext is given
5170
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5172$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005173if test ! -d CaseSensitiveTestDir; then
5174mkdir CaseSensitiveTestDir
5175fi
5176
5177if test -d casesensitivetestdir
5178then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5180$as_echo "yes" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005181 BUILDEXEEXT=.exe
5182else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5184$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005185 BUILDEXEEXT=$EXEEXT
5186fi
5187rmdir CaseSensitiveTestDir
5188
5189case $MACHDEP in
5190bsdos*)
5191 case $CC in
5192 gcc) CC="$CC -D_HAVE_BSDI";;
5193 esac;;
5194esac
5195
5196case $ac_sys_system in
5197hp*|HP*)
5198 case $CC in
5199 cc|*/cc) CC="$CC -Ae";;
5200 esac;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005201SunOS*)
5202 # Some functions have a prototype only with that define, e.g. confstr
5203
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005204$as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005205
5206 ;;
5207esac
5208
5209
5210
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5212$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005213if test -z "$LIBRARY"
5214then
5215 LIBRARY='libpython$(VERSION).a'
5216fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005217{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5218$as_echo "$LIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005219
5220# LDLIBRARY is the name of the library to link against (as opposed to the
5221# name of the library into which to insert object files). BLDLIBRARY is also
5222# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5223# is blank as the main program is not linked directly against LDLIBRARY.
5224# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5225# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5226# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5227# DLLLIBRARY is the shared (i.e., DLL) library.
5228#
5229# RUNSHARED is used to run shared python without installed libraries
5230#
5231# INSTSONAME is the name of the shared library that will be use to install
5232# on the system - some systems like version suffix, others don't
5233
5234
5235
5236
5237
5238
5239LDLIBRARY="$LIBRARY"
5240BLDLIBRARY='$(LDLIBRARY)'
5241INSTSONAME='$(LDLIBRARY)'
5242DLLLIBRARY=''
5243LDLIBRARYDIR=''
5244RUNSHARED=''
5245
5246# LINKCC is the command that links the python executable -- default is $(CC).
5247# If CXX is set, and if it is needed to link a main function that was
5248# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5249# python might then depend on the C++ runtime
5250# This is altered for AIX in order to build the export list before
5251# linking.
5252
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5254$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005255if test -z "$LINKCC"
5256then
5257 LINKCC='$(PURIFY) $(MAINCC)'
5258 case $ac_sys_system in
5259 AIX*)
5260 exp_extra="\"\""
5261 if test $ac_sys_release -ge 5 -o \
5262 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5263 exp_extra="."
5264 fi
5265 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005266 QNX*)
5267 # qcc must be used because the other compilers do not
5268 # support -N.
5269 LINKCC=qcc;;
5270 esac
5271fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005272{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5273$as_echo "$LINKCC" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005274
5275# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5276# make sure we default having it set to "no": this is used by
5277# distutils.unixccompiler to know if it should add --enable-new-dtags
5278# to linker command lines, and failing to detect GNU ld simply results
5279# in the same bahaviour as before.
5280
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5282$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005283ac_prog=ld
5284if test "$GCC" = yes; then
5285 ac_prog=`$CC -print-prog-name=ld`
5286fi
5287case `"$ac_prog" -V 2>&1 < /dev/null` in
5288 *GNU*)
5289 GNULD=yes;;
5290 *)
5291 GNULD=no;;
5292esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005293{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5294$as_echo "$GNULD" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005295
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005296{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5297$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005298# Check whether --enable-shared was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005299if test "${enable_shared+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005300 enableval=$enable_shared;
5301fi
5302
5303
5304if test -z "$enable_shared"
5305then
5306 case $ac_sys_system in
5307 CYGWIN* | atheos*)
5308 enable_shared="yes";;
5309 *)
5310 enable_shared="no";;
5311 esac
5312fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005313{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5314$as_echo "$enable_shared" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005315
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5317$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005318# Check whether --enable-profiling was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005319if test "${enable_profiling+set}" = set; then :
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005320 enableval=$enable_profiling;
5321fi
5322
5323if test "x$enable_profiling" = xyes; then
5324 ac_save_cc="$CC"
Benjamin Petersonb9be7bb2013-03-26 08:55:37 -04005325 CC="$CC -pg"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005326 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005327/* end confdefs.h. */
5328int main() { return 0; }
5329_ACEOF
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005330if ac_fn_c_try_link "$LINENO"; then :
5331
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005332else
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005333 enable_profiling=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005334fi
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005335rm -f core conftest.err conftest.$ac_objext \
5336 conftest$ac_exeext conftest.$ac_ext
5337 CC="$ac_save_cc"
5338else
5339 enable_profiling=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005340fi
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005341{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5342$as_echo "$enable_profiling" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005343
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005344if test "x$enable_profiling" = xyes; then
5345 BASECFLAGS="-pg $BASECFLAGS"
5346 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005347fi
5348
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5350$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005351
5352# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5353# library that we build, but we do not want to link against it (we
5354# will find it with a -framework option). For this reason there is an
5355# extra variable BLDLIBRARY against which Python and the extension
5356# modules are linked, BLDLIBRARY. This is normally the same as
5357# LDLIBRARY, but empty for MacOSX framework builds.
5358if test "$enable_framework"
5359then
5360 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005361 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005362 BLDLIBRARY=''
5363else
5364 BLDLIBRARY='$(LDLIBRARY)'
5365fi
5366
5367# Other platforms follow
5368if test $enable_shared = "yes"; then
5369
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005370$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005371
5372 case $ac_sys_system in
5373 BeOS*)
5374 LDLIBRARY='libpython$(VERSION).so'
5375 ;;
5376 CYGWIN*)
5377 LDLIBRARY='libpython$(VERSION).dll.a'
5378 DLLLIBRARY='libpython$(VERSION).dll'
5379 ;;
5380 SunOS*)
5381 LDLIBRARY='libpython$(VERSION).so'
5382 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005383 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005384 INSTSONAME="$LDLIBRARY".$SOVERSION
5385 ;;
Charles-François Natali3de8c732011-07-24 22:33:35 +02005386 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005387 LDLIBRARY='libpython$(VERSION).so'
5388 BLDLIBRARY='-L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005389 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005390 case $ac_sys_system in
5391 FreeBSD*)
5392 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
5393 ;;
5394 esac
5395 INSTSONAME="$LDLIBRARY".$SOVERSION
5396 ;;
5397 hp*|HP*)
5398 case `uname -m` in
5399 ia64)
5400 LDLIBRARY='libpython$(VERSION).so'
5401 ;;
5402 *)
5403 LDLIBRARY='libpython$(VERSION).sl'
5404 ;;
5405 esac
5406 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005407 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005408 ;;
5409 OSF*)
5410 LDLIBRARY='libpython$(VERSION).so'
5411 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005412 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005413 ;;
5414 atheos*)
5415 LDLIBRARY='libpython$(VERSION).so'
5416 BLDLIBRARY='-L. -lpython$(VERSION)'
5417 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
5418 ;;
5419 Darwin*)
5420 LDLIBRARY='libpython$(VERSION).dylib'
5421 BLDLIBRARY='-L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005422 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005423 ;;
Antoine Pitrouaabdceb2010-09-10 20:03:17 +00005424 AIX*)
5425 LDLIBRARY='libpython$(VERSION).so'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005426 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrouaabdceb2010-09-10 20:03:17 +00005427 ;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005428
5429 esac
5430else # shared is disabled
5431 case $ac_sys_system in
5432 CYGWIN*)
5433 BLDLIBRARY='$(LIBRARY)'
5434 LDLIBRARY='libpython$(VERSION).dll.a'
5435 ;;
5436 esac
5437fi
5438
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005439if test "$cross_compiling" = yes; then
5440 RUNSHARED=
5441fi
5442
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005443{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5444$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005445
5446if test -n "$ac_tool_prefix"; then
5447 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5448set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5450$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005451if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005452 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005453else
5454 if test -n "$RANLIB"; then
5455 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5456else
5457as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5458for as_dir in $PATH
5459do
5460 IFS=$as_save_IFS
5461 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005462 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005463 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005464 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005465 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005466 break 2
5467 fi
5468done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005469 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005470IFS=$as_save_IFS
5471
5472fi
5473fi
5474RANLIB=$ac_cv_prog_RANLIB
5475if test -n "$RANLIB"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5477$as_echo "$RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005478else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5480$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005481fi
5482
5483
5484fi
5485if test -z "$ac_cv_prog_RANLIB"; then
5486 ac_ct_RANLIB=$RANLIB
5487 # Extract the first word of "ranlib", so it can be a program name with args.
5488set dummy ranlib; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5490$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005491if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005492 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005493else
5494 if test -n "$ac_ct_RANLIB"; then
5495 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5496else
5497as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5498for as_dir in $PATH
5499do
5500 IFS=$as_save_IFS
5501 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005502 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005503 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005504 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005505 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005506 break 2
5507 fi
5508done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005509 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005510IFS=$as_save_IFS
5511
5512fi
5513fi
5514ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5515if test -n "$ac_ct_RANLIB"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5517$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005518else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005519 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5520$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005521fi
5522
5523 if test "x$ac_ct_RANLIB" = x; then
5524 RANLIB=":"
5525 else
5526 case $cross_compiling:$ac_tool_warned in
5527yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005528{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5529$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005530ac_tool_warned=yes ;;
5531esac
5532 RANLIB=$ac_ct_RANLIB
5533 fi
5534else
5535 RANLIB="$ac_cv_prog_RANLIB"
5536fi
5537
5538
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005539if test -n "$ac_tool_prefix"; then
5540 for ac_prog in ar aal
5541 do
5542 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5543set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5545$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005546if ${ac_cv_prog_AR+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005547 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005548else
5549 if test -n "$AR"; then
5550 ac_cv_prog_AR="$AR" # Let the user override the test.
5551else
5552as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5553for as_dir in $PATH
5554do
5555 IFS=$as_save_IFS
5556 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005557 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005558 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005559 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005560 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005561 break 2
5562 fi
5563done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005564 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005565IFS=$as_save_IFS
5566
5567fi
5568fi
5569AR=$ac_cv_prog_AR
5570if test -n "$AR"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5572$as_echo "$AR" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005573else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5575$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005576fi
5577
5578
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005579 test -n "$AR" && break
5580 done
5581fi
5582if test -z "$AR"; then
5583 ac_ct_AR=$AR
5584 for ac_prog in ar aal
5585do
5586 # Extract the first word of "$ac_prog", so it can be a program name with args.
5587set dummy $ac_prog; ac_word=$2
5588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5589$as_echo_n "checking for $ac_word... " >&6; }
5590if ${ac_cv_prog_ac_ct_AR+:} false; then :
5591 $as_echo_n "(cached) " >&6
5592else
5593 if test -n "$ac_ct_AR"; then
5594 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5595else
5596as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5597for as_dir in $PATH
5598do
5599 IFS=$as_save_IFS
5600 test -z "$as_dir" && as_dir=.
5601 for ac_exec_ext in '' $ac_executable_extensions; do
5602 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5603 ac_cv_prog_ac_ct_AR="$ac_prog"
5604 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5605 break 2
5606 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005607done
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005608 done
5609IFS=$as_save_IFS
5610
5611fi
5612fi
5613ac_ct_AR=$ac_cv_prog_ac_ct_AR
5614if test -n "$ac_ct_AR"; then
5615 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5616$as_echo "$ac_ct_AR" >&6; }
5617else
5618 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5619$as_echo "no" >&6; }
5620fi
5621
5622
5623 test -n "$ac_ct_AR" && break
5624done
5625
5626 if test "x$ac_ct_AR" = x; then
5627 AR="ar"
5628 else
5629 case $cross_compiling:$ac_tool_warned in
5630yes:)
5631{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5632$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5633ac_tool_warned=yes ;;
5634esac
5635 AR=$ac_ct_AR
5636 fi
5637fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005638
5639
5640# tweak ARFLAGS only if the user didn't set it on the command line
5641
5642if test -z "$ARFLAGS"
5643then
5644 ARFLAGS="rc"
5645fi
5646
5647
5648# Extract the first word of "svnversion", so it can be a program name with args.
5649set dummy svnversion; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5651$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005652if ${ac_cv_prog_SVNVERSION+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005653 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005654else
5655 if test -n "$SVNVERSION"; then
5656 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
5657else
5658as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5659for as_dir in $PATH
5660do
5661 IFS=$as_save_IFS
5662 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005663 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005664 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005665 ac_cv_prog_SVNVERSION="found"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005666 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005667 break 2
5668 fi
5669done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005670 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005671IFS=$as_save_IFS
5672
5673 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
5674fi
5675fi
5676SVNVERSION=$ac_cv_prog_SVNVERSION
5677if test -n "$SVNVERSION"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SVNVERSION" >&5
5679$as_echo "$SVNVERSION" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005680else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5682$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005683fi
5684
5685
5686if test $SVNVERSION = found
5687then
5688 SVNVERSION="svnversion \$(srcdir)"
5689else
5690 SVNVERSION="echo Unversioned directory"
5691fi
5692
Trent Nelsond86ceec2012-10-16 09:42:45 -04005693
Trent Nelsonabf20512012-10-17 04:32:49 -04005694if test "$abs_srcdir" != "$abs_builddir"; then
Trent Nelsond86ceec2012-10-16 09:42:45 -04005695 # If we're building out-of-tree make sure Include (in the current dir)
5696 # gets picked up before its $srcdir counterpart in order for Python-ast.h
5697 # and graminit.h to get picked up from the correct directory.
5698 # (A side effect of this is that these resources will automatically be
5699 # regenerated when building out-of-tree, regardless of whether or not
5700 # the $srcdir counterpart is up-to-date. This is an acceptable trade
5701 # off.)
5702 BASECPPFLAGS="-IInclude"
5703else
5704 BASECPPFLAGS=""
5705fi
5706
Georg Brandl3a5508e2011-03-06 10:42:21 +01005707
5708
5709
5710# Extract the first word of "hg", so it can be a program name with args.
5711set dummy hg; ac_word=$2
5712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5713$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005714if ${ac_cv_prog_HAS_HG+:} false; then :
Georg Brandl3a5508e2011-03-06 10:42:21 +01005715 $as_echo_n "(cached) " >&6
5716else
5717 if test -n "$HAS_HG"; then
5718 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
5719else
5720as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5721for as_dir in $PATH
5722do
5723 IFS=$as_save_IFS
5724 test -z "$as_dir" && as_dir=.
5725 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005726 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Georg Brandl3a5508e2011-03-06 10:42:21 +01005727 ac_cv_prog_HAS_HG="found"
5728 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5729 break 2
5730 fi
5731done
5732 done
5733IFS=$as_save_IFS
5734
5735 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
5736fi
5737fi
5738HAS_HG=$ac_cv_prog_HAS_HG
5739if test -n "$HAS_HG"; then
5740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
5741$as_echo "$HAS_HG" >&6; }
5742else
5743 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5744$as_echo "no" >&6; }
5745fi
5746
5747
5748if test $HAS_HG = found
5749then
5750 HGVERSION="hg id -i \$(srcdir)"
5751 HGTAG="hg id -t \$(srcdir)"
5752 HGBRANCH="hg id -b \$(srcdir)"
5753else
5754 HGVERSION=""
5755 HGTAG=""
5756 HGBRANCH=""
5757fi
5758
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005759case $MACHDEP in
5760bsdos*|hp*|HP*)
5761 # install -d does not work on BSDI or HP-UX
5762 if test -z "$INSTALL"
5763 then
5764 INSTALL="${srcdir}/install-sh -c"
5765 fi
5766esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005767# Find a good install program. We prefer a C program (faster),
5768# so one script is as good as another. But avoid the broken or
5769# incompatible versions:
5770# SysV /etc/install, /usr/sbin/install
5771# SunOS /usr/etc/install
5772# IRIX /sbin/install
5773# AIX /bin/install
5774# AmigaOS /C/install, which installs bootblocks on floppy discs
5775# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5776# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5777# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5778# OS/2's system install, which has a completely different semantic
5779# ./install, which can be erroneously created by make from ./install.sh.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005780# Reject install programs that cannot install multiple files.
5781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5782$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005783if test -z "$INSTALL"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +01005784if ${ac_cv_path_install+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005785 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005786else
5787 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5788for as_dir in $PATH
5789do
5790 IFS=$as_save_IFS
5791 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005792 # Account for people who put trailing slashes in PATH elements.
5793case $as_dir/ in #((
5794 ./ | .// | /[cC]/* | \
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005795 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005796 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005797 /usr/ucb/* ) ;;
5798 *)
5799 # OSF1 and SCO ODT 3.0 have their own names for install.
5800 # Don't use installbsd from OSF since it installs stuff as root
5801 # by default.
5802 for ac_prog in ginstall scoinst install; do
5803 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005804 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005805 if test $ac_prog = install &&
5806 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5807 # AIX install. It has an incompatible calling convention.
5808 :
5809 elif test $ac_prog = install &&
5810 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5811 # program-specific install script used by HP pwplus--don't use.
5812 :
5813 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005814 rm -rf conftest.one conftest.two conftest.dir
5815 echo one > conftest.one
5816 echo two > conftest.two
5817 mkdir conftest.dir
5818 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5819 test -s conftest.one && test -s conftest.two &&
5820 test -s conftest.dir/conftest.one &&
5821 test -s conftest.dir/conftest.two
5822 then
5823 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5824 break 3
5825 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005826 fi
5827 fi
5828 done
5829 done
5830 ;;
5831esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005832
5833 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005834IFS=$as_save_IFS
5835
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005836rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005837
5838fi
5839 if test "${ac_cv_path_install+set}" = set; then
5840 INSTALL=$ac_cv_path_install
5841 else
5842 # As a last resort, use the slow shell script. Don't cache a
5843 # value for INSTALL within a source directory, because that will
5844 # break other packages using the cache if that directory is
5845 # removed, or if the value is a relative name.
5846 INSTALL=$ac_install_sh
5847 fi
5848fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005849{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5850$as_echo "$INSTALL" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005851
5852# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5853# It thinks the first close brace ends the variable substitution.
5854test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5855
5856test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5857
5858test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5859
Trent Nelsonf6407a12012-08-30 14:56:13 +00005860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
5861$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
5862if test -z "$MKDIR_P"; then
5863 if ${ac_cv_path_mkdir+:} false; then :
5864 $as_echo_n "(cached) " >&6
5865else
5866 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5867for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
5868do
5869 IFS=$as_save_IFS
5870 test -z "$as_dir" && as_dir=.
5871 for ac_prog in mkdir gmkdir; do
5872 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005873 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Trent Nelsonf6407a12012-08-30 14:56:13 +00005874 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
5875 'mkdir (GNU coreutils) '* | \
5876 'mkdir (coreutils) '* | \
5877 'mkdir (fileutils) '4.1*)
5878 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
5879 break 3;;
5880 esac
5881 done
5882 done
5883 done
5884IFS=$as_save_IFS
5885
5886fi
5887
5888 test -d ./--version && rmdir ./--version
5889 if test "${ac_cv_path_mkdir+set}" = set; then
5890 MKDIR_P="$ac_cv_path_mkdir -p"
5891 else
5892 # As a last resort, use the slow shell script. Don't cache a
5893 # value for MKDIR_P within a source directory, because that will
5894 # break other packages using the cache if that directory is
5895 # removed, or if the value is a relative name.
5896 MKDIR_P="$ac_install_sh -d"
5897 fi
5898fi
5899{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
5900$as_echo "$MKDIR_P" >&6; }
5901
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005902
5903# Not every filesystem supports hard links
5904
5905if test -z "$LN" ; then
5906 case $ac_sys_system in
5907 BeOS*) LN="ln -s";;
5908 CYGWIN*) LN="ln -s";;
5909 atheos*) LN="ln -s";;
5910 *) LN=ln;;
5911 esac
5912fi
5913
5914# Check for --with-pydebug
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
5916$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005917
5918# Check whether --with-pydebug was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005919if test "${with_pydebug+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005920 withval=$with_pydebug;
5921if test "$withval" != no
5922then
5923
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005924$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005925
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5927$as_echo "yes" >&6; };
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005928 Py_DEBUG='true'
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005929else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5930$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005931fi
5932else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5934$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005935fi
5936
5937
5938# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5939# merged with this chunk of code?
5940
5941# Optimizer/debugger flags
5942# ------------------------
5943# (The following bit of code is complicated enough - please keep things
5944# indented properly. Just pretend you're editing Python code. ;-)
5945
5946# There are two parallel sets of case statements below, one that checks to
5947# see if OPT was set and one that does BASECFLAGS setting based upon
5948# compiler and platform. BASECFLAGS tweaks need to be made even if the
5949# user set OPT.
5950
5951# tweak OPT based on compiler and platform, only if the user didn't set
5952# it on the command line
5953
Benjamin Petersond4b721b2010-03-23 20:58:37 +00005954if test "${OPT-unset}" = "unset"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005955then
5956 case $GCC in
5957 yes)
5958 if test "$CC" != 'g++' ; then
5959 STRICT_PROTO="-Wstrict-prototypes"
5960 fi
5961 # For gcc 4.x we need to use -fwrapv so lets check if its supported
5962 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
5963 WRAP="-fwrapv"
5964 fi
Stefan Krah503e5e12011-09-14 15:19:42 +02005965
5966 # Clang also needs -fwrapv
Stefan Krah2bc1e8f2011-12-08 22:26:06 +01005967 case $CC in
5968 *clang*) WRAP="-fwrapv"
5969 ;;
5970 esac
Stefan Krah503e5e12011-09-14 15:19:42 +02005971
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005972 case $ac_cv_prog_cc_g in
5973 yes)
5974 if test "$Py_DEBUG" = 'true' ; then
5975 # Optimization messes up debuggers, so turn it off for
5976 # debug builds.
Mark Dickinsond2f3e3f2010-05-05 22:23:58 +00005977 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005978 else
5979 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
5980 fi
5981 ;;
5982 *)
5983 OPT="-O3 -Wall $STRICT_PROTO"
5984 ;;
5985 esac
5986 case $ac_sys_system in
5987 SCO_SV*) OPT="$OPT -m486 -DSCO5"
5988 ;;
5989 esac
5990 ;;
5991
5992 *)
5993 OPT="-O"
5994 ;;
5995 esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005996fi
5997
5998
5999
6000# The -arch flags for universal builds on OSX
6001UNIVERSAL_ARCH_FLAGS=
6002
6003
6004# tweak BASECFLAGS based on compiler and platform
6005case $GCC in
6006yes)
6007 # Python violates C99 rules, by casting between incompatible
6008 # pointer types. GCC may generate bad code as a result of that,
6009 # so use -fno-strict-aliasing if supported.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006010 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -fno-strict-aliasing" >&5
6011$as_echo_n "checking whether $CC accepts -fno-strict-aliasing... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006012 ac_save_cc="$CC"
6013 CC="$CC -fno-strict-aliasing"
Matthias Klose3cef2a92012-03-14 23:39:33 +01006014 if ${ac_cv_no_strict_aliasing_ok+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006015 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00006016else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006017 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006018/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00006019
6020int
6021main ()
6022{
Mark Dickinson5e13e292010-05-11 08:55:06 +00006023
Gregory P. Smith373469a2009-11-01 21:03:38 +00006024 ;
6025 return 0;
6026}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006027_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006028if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006029 ac_cv_no_strict_aliasing_ok=yes
6030else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006031 ac_cv_no_strict_aliasing_ok=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006032fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00006033rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00006034fi
6035
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006036 CC="$ac_save_cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing_ok" >&5
6038$as_echo "$ac_cv_no_strict_aliasing_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006039 if test $ac_cv_no_strict_aliasing_ok = yes
6040 then
6041 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6042 fi
6043
6044 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
6045 # support. Without this, treatment of subnormals doesn't follow
6046 # the standard.
doko@python.orgd65e2ba2013-01-31 23:52:03 +01006047 case $host in
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006048 alpha*)
6049 BASECFLAGS="$BASECFLAGS -mieee"
6050 ;;
6051 esac
6052
6053 case $ac_sys_system in
6054 SCO_SV*)
6055 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
6056 ;;
6057 # is there any other compiler on Darwin besides gcc?
6058 Darwin*)
6059 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
6060 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006061 if test "${CC}" = gcc
6062 then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006063 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
6064$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006065 case "${UNIVERSALSDK}" in
6066 */MacOSX10.4u.sdk)
6067 # Build using 10.4 SDK, force usage of gcc when the
6068 # compiler is gcc, otherwise the user will get very
6069 # confusing error messages when building on OSX 10.6
6070 CC=gcc-4.0
6071 CPP=cpp-4.0
6072 ;;
6073 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
6075$as_echo "$CC" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006076 fi
6077
6078 # Calculate the right deployment target for this build.
6079 #
Ned Deilyc40b9032014-06-25 13:48:46 -07006080 cur_target_major=`sw_vers -productVersion | \
6081 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
6082 cur_target_minor=`sw_vers -productVersion | \
6083 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
6084 cur_target="${cur_target_major}.${cur_target_minor}"
6085 if test ${cur_target_major} -eq 10 && \
6086 test ${cur_target_minor} -ge 3
6087 then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006088 cur_target=10.3
Ronald Oussoren25967582009-09-06 10:00:26 +00006089 if test ${enable_universalsdk}; then
6090 if test "${UNIVERSAL_ARCHS}" = "all"; then
6091 # Ensure that the default platform for a
6092 # 4-way universal build is OSX 10.5,
6093 # that's the first OS release where
6094 # 4-way builds make sense.
6095 cur_target='10.5'
Ronald Oussoren23d92532009-09-07 06:12:00 +00006096
6097 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
6098 cur_target='10.5'
6099
6100 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
6101 cur_target='10.5'
6102
6103 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
6104 cur_target='10.5'
Ronald Oussoren25967582009-09-06 10:00:26 +00006105 fi
6106 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00006107 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren25967582009-09-06 10:00:26 +00006108 # On Intel macs default to a deployment
6109 # target of 10.4, that's the first OSX
6110 # release with Intel support.
6111 cur_target="10.4"
6112 fi
6113 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006114 fi
6115 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
6116
6117 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
6118 # environment with a value that is the same as what we'll use
6119 # in the Makefile to ensure that we'll get the same compiler
6120 # environment during configure and build time.
6121 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
6122 export MACOSX_DEPLOYMENT_TARGET
6123 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
6124
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006125 if test "${enable_universalsdk}"; then
6126 UNIVERSAL_ARCH_FLAGS=""
6127 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
6128 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
6129 ARCH_RUN_32BIT=""
Ronald Oussoren75912852010-04-08 08:13:31 +00006130 LIPO_32BIT_FLAGS=""
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006131
6132 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
6133 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
6134 LIPO_32BIT_FLAGS=""
6135 ARCH_RUN_32BIT="true"
6136
6137 elif test "$UNIVERSAL_ARCHS" = "all" ; then
6138 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
6139 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren92397ce2010-01-17 19:32:00 +00006140 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006141
6142 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
6143 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
6144 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren92397ce2010-01-17 19:32:00 +00006145 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006146
6147 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
6148 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
6149 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren9922f172010-02-11 13:19:34 +00006150 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006151
6152 else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006153 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 +00006154
6155 fi
6156
6157
Ronald Oussoren974eb5e2010-04-18 17:59:37 +00006158 CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
6159 if test "${UNIVERSALSDK}" != "/"
6160 then
6161 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
6162 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
6163 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006164 fi
6165
6166 fi
6167
6168
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006169 ;;
6170 OSF*)
6171 BASECFLAGS="$BASECFLAGS -mieee"
6172 ;;
6173 esac
6174 ;;
6175
6176*)
6177 case $ac_sys_system in
6178 OpenUNIX*|UnixWare*)
6179 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
6180 ;;
6181 OSF*)
6182 BASECFLAGS="$BASECFLAGS -ieee -std"
6183 ;;
6184 SCO_SV*)
6185 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
6186 ;;
6187 esac
6188 ;;
6189esac
6190
6191if test "$Py_DEBUG" = 'true'; then
6192 :
6193else
6194 OPT="-DNDEBUG $OPT"
6195fi
6196
6197if test "$ac_arch_flags"
6198then
6199 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
6200fi
6201
6202# disable check for icc since it seems to pass, but generates a warning
6203if test "$CC" = icc
6204then
6205 ac_cv_opt_olimit_ok=no
6206fi
6207
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -OPT:Olimit=0" >&5
6209$as_echo_n "checking whether $CC accepts -OPT:Olimit=0... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006210if ${ac_cv_opt_olimit_ok+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006211 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006212else
6213 ac_save_cc="$CC"
6214CC="$CC -OPT:Olimit=0"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006215cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006216/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00006217
6218int
6219main ()
6220{
Mark Dickinson5e13e292010-05-11 08:55:06 +00006221
Gregory P. Smith373469a2009-11-01 21:03:38 +00006222 ;
6223 return 0;
6224}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006225_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006226if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006227 ac_cv_opt_olimit_ok=yes
6228else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006229 ac_cv_opt_olimit_ok=no
Matthias Klosec511b472010-05-08 11:01:39 +00006230
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006231fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00006232rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006233CC="$ac_save_cc"
6234fi
6235
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006236{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_opt_olimit_ok" >&5
6237$as_echo "$ac_cv_opt_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006238if test $ac_cv_opt_olimit_ok = yes; then
6239 case $ac_sys_system in
6240 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
6241 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
6242 # environment?
6243 Darwin*)
6244 ;;
Trent Nelson34562e12012-10-17 18:01:12 -04006245 # XXX thankfully this useless troublemaker of a flag has been
6246 # eradicated in the 3.x line. For now, make sure it isn't picked
6247 # up by any of our other platforms that use CC.
6248 AIX*|SunOS*|HP-UX*|IRIX*)
6249 ;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006250 *)
6251 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
6252 ;;
6253 esac
6254else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006255 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Olimit 1500" >&5
6256$as_echo_n "checking whether $CC accepts -Olimit 1500... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006257 if ${ac_cv_olimit_ok+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006258 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006259else
6260 ac_save_cc="$CC"
6261 CC="$CC -Olimit 1500"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006262 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006263/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00006264
6265int
6266main ()
6267{
Mark Dickinson5e13e292010-05-11 08:55:06 +00006268
Gregory P. Smith373469a2009-11-01 21:03:38 +00006269 ;
6270 return 0;
6271}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006272_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006273if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006274 ac_cv_olimit_ok=yes
6275else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006276 ac_cv_olimit_ok=no
Matthias Klosec511b472010-05-08 11:01:39 +00006277
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006278fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00006279rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006280 CC="$ac_save_cc"
6281fi
6282
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006283 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_olimit_ok" >&5
6284$as_echo "$ac_cv_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006285 if test $ac_cv_olimit_ok = yes; then
Stefan Krah67473262012-11-29 00:17:05 +01006286 case $ac_sys_system in
6287 # Issue #16534: On HP-UX ac_cv_olimit_ok=yes is a false positive.
6288 HP-UX*)
6289 ;;
6290 *)
6291 BASECFLAGS="$BASECFLAGS -Olimit 1500"
6292 ;;
6293 esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006294 fi
6295fi
6296
6297# Check whether GCC supports PyArg_ParseTuple format
6298if test "$GCC" = "yes"
6299then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006300 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
6301$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006302 save_CFLAGS=$CFLAGS
Benjamin Petersonc8759662013-05-11 13:00:05 -05006303 CFLAGS="$CFLAGS -Werror -Wformat"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006304 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006305/* end confdefs.h. */
6306
6307 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006308int
6309main ()
6310{
6311
6312 ;
6313 return 0;
6314}
Matthias Klosec511b472010-05-08 11:01:39 +00006315
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006316_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006317if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006318
Matthias Klosec511b472010-05-08 11:01:39 +00006319
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006320$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006321
Matthias Klosec511b472010-05-08 11:01:39 +00006322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006323$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00006324
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006325else
Matthias Klosec511b472010-05-08 11:01:39 +00006326
6327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006328$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006329
6330fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006331rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6332 CFLAGS=$save_CFLAGS
6333fi
6334
Brett Cannon4ff151a2015-09-18 15:09:42 -07006335
6336# Enable PGO flags.
6337# Extract the first word of "llvm-profdata", so it can be a program name with args.
6338set dummy llvm-profdata; ac_word=$2
6339{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6340$as_echo_n "checking for $ac_word... " >&6; }
6341if ${ac_cv_prog_LLVM_PROF_FOUND+:} false; then :
6342 $as_echo_n "(cached) " >&6
6343else
6344 if test -n "$LLVM_PROF_FOUND"; then
6345 ac_cv_prog_LLVM_PROF_FOUND="$LLVM_PROF_FOUND" # Let the user override the test.
6346else
6347as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6348for as_dir in $PATH
6349do
6350 IFS=$as_save_IFS
6351 test -z "$as_dir" && as_dir=.
6352 for ac_exec_ext in '' $ac_executable_extensions; do
6353 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6354 ac_cv_prog_LLVM_PROF_FOUND="found"
6355 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6356 break 2
6357 fi
6358done
6359 done
6360IFS=$as_save_IFS
6361
6362 test -z "$ac_cv_prog_LLVM_PROF_FOUND" && ac_cv_prog_LLVM_PROF_FOUND="not-found"
6363fi
6364fi
6365LLVM_PROF_FOUND=$ac_cv_prog_LLVM_PROF_FOUND
6366if test -n "$LLVM_PROF_FOUND"; then
6367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROF_FOUND" >&5
6368$as_echo "$LLVM_PROF_FOUND" >&6; }
6369else
6370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6371$as_echo "no" >&6; }
6372fi
6373
6374
6375LLVM_PROF_ERR=no
6376case $CC in
6377 *clang*)
6378 # Any changes made here should be reflected in the GCC+Darwin case below
6379 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6380 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
6381 LLVM_PROF_MERGER="llvm-profdata merge -output=code.profclangd *.profclangr"
6382 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6383 if test $LLVM_PROF_FOUND = not-found
6384 then
6385 LLVM_PROF_ERR=yes
6386 fi
6387 ;;
6388 *gcc*)
6389 case $ac_sys_system in
6390 Darwin*)
6391 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6392 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
6393 LLVM_PROF_MERGER="llvm-profdata merge -output=code.profclangd *.profclangr"
6394 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6395 if test $LLVM_PROF_FOUND = not-found
6396 then
6397 LLVM_PROF_ERR=yes
6398 fi
6399 ;;
6400 *)
6401 PGO_PROF_GEN_FLAG="-fprofile-generate"
6402 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6403 LLVM_PROF_MERGER="true"
6404 LLVM_PROF_FILE=""
6405 ;;
6406 esac
6407 ;;
6408esac
6409
6410
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006411# On some compilers, pthreads are available without further options
6412# (e.g. MacOS X). On some of these systems, the compiler will not
6413# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
6414# So we have to see first whether pthreads are available without
6415# options before we can check whether -Kpthread improves anything.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
6417$as_echo_n "checking whether pthreads are available without options... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006418if ${ac_cv_pthread_is_default+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006419 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006420else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006421 if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006422 ac_cv_pthread_is_default=no
6423else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006424 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006425/* end confdefs.h. */
6426
Stefan Krahae66ca62012-11-22 22:36:57 +01006427#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006428#include <pthread.h>
6429
6430void* routine(void* p){return NULL;}
6431
6432int main(){
6433 pthread_t p;
6434 if(pthread_create(&p,NULL,routine,NULL)!=0)
6435 return 1;
6436 (void)pthread_detach(p);
6437 return 0;
6438}
6439
6440_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006441if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006442
6443 ac_cv_pthread_is_default=yes
6444 ac_cv_kthread=no
6445 ac_cv_pthread=no
6446
6447else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006448 ac_cv_pthread_is_default=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006449fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006450rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6451 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006452fi
6453
6454
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006455fi
6456
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006457{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
6458$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006459
6460
6461if test $ac_cv_pthread_is_default = yes
6462then
6463 ac_cv_kpthread=no
6464else
6465# -Kpthread, if available, provides the right #defines
6466# and linker options to make pthread_create available
6467# Some compilers won't report that they do not support -Kpthread,
6468# so we need to run a program to see whether it really made the
6469# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
6471$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006472if ${ac_cv_kpthread+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006473 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006474else
6475 ac_save_cc="$CC"
6476CC="$CC -Kpthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006477if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006478 ac_cv_kpthread=no
6479else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006480 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006481/* end confdefs.h. */
6482
Stefan Krahae66ca62012-11-22 22:36:57 +01006483#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006484#include <pthread.h>
6485
6486void* routine(void* p){return NULL;}
6487
6488int main(){
6489 pthread_t p;
6490 if(pthread_create(&p,NULL,routine,NULL)!=0)
6491 return 1;
6492 (void)pthread_detach(p);
6493 return 0;
6494}
6495
6496_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006497if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006498 ac_cv_kpthread=yes
6499else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006500 ac_cv_kpthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006501fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006502rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6503 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006504fi
6505
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006506CC="$ac_save_cc"
6507fi
6508
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006509{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
6510$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006511fi
6512
6513if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
6514then
6515# -Kthread, if available, provides the right #defines
6516# and linker options to make pthread_create available
6517# Some compilers won't report that they do not support -Kthread,
6518# so we need to run a program to see whether it really made the
6519# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
6521$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006522if ${ac_cv_kthread+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006523 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006524else
6525 ac_save_cc="$CC"
6526CC="$CC -Kthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006527if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006528 ac_cv_kthread=no
6529else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006530 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006531/* end confdefs.h. */
6532
Stefan Krahae66ca62012-11-22 22:36:57 +01006533#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006534#include <pthread.h>
6535
6536void* routine(void* p){return NULL;}
6537
6538int main(){
6539 pthread_t p;
6540 if(pthread_create(&p,NULL,routine,NULL)!=0)
6541 return 1;
6542 (void)pthread_detach(p);
6543 return 0;
6544}
6545
6546_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006547if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006548 ac_cv_kthread=yes
6549else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006550 ac_cv_kthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006551fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006552rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6553 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006554fi
6555
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006556CC="$ac_save_cc"
6557fi
6558
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006559{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
6560$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006561fi
6562
6563if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
6564then
6565# -pthread, if available, provides the right #defines
6566# and linker options to make pthread_create available
6567# Some compilers won't report that they do not support -pthread,
6568# so we need to run a program to see whether it really made the
6569# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
6571$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.orgfa3f9a32013-01-25 15:32:31 +01006572if ${ac_cv_pthread+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006573 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006574else
6575 ac_save_cc="$CC"
6576CC="$CC -pthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006577if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006578 ac_cv_pthread=no
6579else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006580 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006581/* end confdefs.h. */
6582
Stefan Krahae66ca62012-11-22 22:36:57 +01006583#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006584#include <pthread.h>
6585
6586void* routine(void* p){return NULL;}
6587
6588int main(){
6589 pthread_t p;
6590 if(pthread_create(&p,NULL,routine,NULL)!=0)
6591 return 1;
6592 (void)pthread_detach(p);
6593 return 0;
6594}
6595
6596_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006597if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006598 ac_cv_pthread=yes
6599else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006600 ac_cv_pthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006601fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006602rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6603 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006604fi
6605
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006606CC="$ac_save_cc"
6607fi
6608
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006609{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
6610$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006611fi
6612
6613# If we have set a CC compiler flag for thread support then
6614# check if it works for CXX, too.
6615ac_cv_cxx_thread=no
6616if test ! -z "$CXX"
6617then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
6619$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006620ac_save_cxx="$CXX"
6621
6622if test "$ac_cv_kpthread" = "yes"
6623then
6624 CXX="$CXX -Kpthread"
6625 ac_cv_cxx_thread=yes
6626elif test "$ac_cv_kthread" = "yes"
6627then
6628 CXX="$CXX -Kthread"
6629 ac_cv_cxx_thread=yes
6630elif test "$ac_cv_pthread" = "yes"
6631then
6632 CXX="$CXX -pthread"
6633 ac_cv_cxx_thread=yes
6634fi
6635
6636if test $ac_cv_cxx_thread = yes
6637then
6638 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
6639 $CXX -c conftest.$ac_ext 2>&5
6640 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
6641 && test -s conftest$ac_exeext && ./conftest$ac_exeext
6642 then
6643 ac_cv_cxx_thread=yes
6644 else
6645 ac_cv_cxx_thread=no
6646 fi
6647 rm -fr conftest*
6648fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006649{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
6650$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006651fi
6652CXX="$ac_save_cxx"
6653
6654
6655# checks for header files
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6657$as_echo_n "checking for ANSI C header files... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006658if ${ac_cv_header_stdc+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006659 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006660else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006661 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006662/* end confdefs.h. */
6663#include <stdlib.h>
6664#include <stdarg.h>
6665#include <string.h>
6666#include <float.h>
6667
6668int
6669main ()
6670{
6671
6672 ;
6673 return 0;
6674}
6675_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006676if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006677 ac_cv_header_stdc=yes
6678else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006679 ac_cv_header_stdc=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006680fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006681rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6682
6683if test $ac_cv_header_stdc = yes; then
6684 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006685 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006686/* end confdefs.h. */
6687#include <string.h>
6688
6689_ACEOF
6690if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006691 $EGREP "memchr" >/dev/null 2>&1; then :
6692
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006693else
6694 ac_cv_header_stdc=no
6695fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006696rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006697
6698fi
6699
6700if test $ac_cv_header_stdc = yes; then
6701 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006702 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006703/* end confdefs.h. */
6704#include <stdlib.h>
6705
6706_ACEOF
6707if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006708 $EGREP "free" >/dev/null 2>&1; then :
6709
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006710else
6711 ac_cv_header_stdc=no
6712fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006713rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006714
6715fi
6716
6717if test $ac_cv_header_stdc = yes; then
6718 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006719 if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006720 :
6721else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006722 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006723/* end confdefs.h. */
6724#include <ctype.h>
6725#include <stdlib.h>
6726#if ((' ' & 0x0FF) == 0x020)
6727# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6728# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6729#else
6730# define ISLOWER(c) \
6731 (('a' <= (c) && (c) <= 'i') \
6732 || ('j' <= (c) && (c) <= 'r') \
6733 || ('s' <= (c) && (c) <= 'z'))
6734# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6735#endif
6736
6737#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6738int
6739main ()
6740{
6741 int i;
6742 for (i = 0; i < 256; i++)
6743 if (XOR (islower (i), ISLOWER (i))
6744 || toupper (i) != TOUPPER (i))
6745 return 2;
6746 return 0;
6747}
6748_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006749if ac_fn_c_try_run "$LINENO"; then :
6750
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006751else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006752 ac_cv_header_stdc=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006753fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006754rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6755 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006756fi
6757
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006758fi
6759fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006760{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6761$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006762if test $ac_cv_header_stdc = yes; then
6763
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006764$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006765
6766fi
6767
doko@ubuntu.comf27ec3e2014-04-17 20:11:19 +02006768for ac_header in asm/types.h conio.h direct.h dlfcn.h errno.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00006769fcntl.h grp.h \
doko@ubuntu.comf27ec3e2014-04-17 20:11:19 +02006770ieeefp.h io.h langinfo.h libintl.h poll.h process.h pthread.h \
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00006771shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006772unistd.h utime.h \
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00006773sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
6774sys/lock.h sys/mkdev.h sys/modem.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00006775sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
Martin v. Löwis8c255e42008-05-23 15:06:50 +00006776sys/termio.h sys/time.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00006777sys/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 +00006778sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimes3aa138f2013-06-18 13:25:24 +02006779bluetooth/bluetooth.h linux/tipc.h spawn.h util.h alloca.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006780do :
6781 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6782ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006783if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006784 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006785#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006786_ACEOF
6787
6788fi
6789
Guido van Rossum627b2d71993-12-24 10:39:16 +00006790done
6791
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006792ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006793for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006794 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6796$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006797if eval \${$as_ac_Header+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006798 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006799else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006800 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006801/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006802#include <sys/types.h>
6803#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006804
Martin v. Löwis11437992002-04-12 09:54:03 +00006805int
6806main ()
6807{
6808if ((DIR *) 0)
6809return 0;
6810 ;
6811 return 0;
6812}
6813_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006814if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006815 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006816else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006817 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006818fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006819rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006820fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006821eval ac_res=\$$as_ac_Header
6822 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6823$as_echo "$ac_res" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006824if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006825 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006826#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006827_ACEOF
6828
6829ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006830fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006831
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006832done
6833# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6834if test $ac_header_dirent = dirent.h; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006835 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6836$as_echo_n "checking for library containing opendir... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006837if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006838 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006839else
Martin v. Löwis11437992002-04-12 09:54:03 +00006840 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006841cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006842/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006843
Martin v. Löwiseba40652007-08-30 20:10:57 +00006844/* Override any GCC internal prototype to avoid an error.
6845 Use char because int might match the return type of a GCC
6846 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006847#ifdef __cplusplus
6848extern "C"
6849#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006850char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006851int
6852main ()
6853{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006854return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006855 ;
6856 return 0;
6857}
6858_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006859for ac_lib in '' dir; do
6860 if test -z "$ac_lib"; then
6861 ac_res="none required"
6862 else
6863 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00006864 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00006865 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006866 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006867 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00006868fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006869rm -f core conftest.err conftest.$ac_objext \
6870 conftest$ac_exeext
Matthias Klose3cef2a92012-03-14 23:39:33 +01006871 if ${ac_cv_search_opendir+:} false; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006872 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00006873fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006874done
Matthias Klose3cef2a92012-03-14 23:39:33 +01006875if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006876
Martin v. Löwiseba40652007-08-30 20:10:57 +00006877else
6878 ac_cv_search_opendir=no
6879fi
6880rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006881LIBS=$ac_func_search_save_LIBS
6882fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006883{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6884$as_echo "$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006885ac_res=$ac_cv_search_opendir
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006886if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006887 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006888
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006889fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006890
Michael W. Hudson54241132001-12-07 15:38:26 +00006891else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006892 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6893$as_echo_n "checking for library containing opendir... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006894if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006895 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006896else
6897 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006898cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006899/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006900
Martin v. Löwiseba40652007-08-30 20:10:57 +00006901/* Override any GCC internal prototype to avoid an error.
6902 Use char because int might match the return type of a GCC
6903 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006904#ifdef __cplusplus
6905extern "C"
6906#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006907char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006908int
6909main ()
6910{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006911return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006912 ;
6913 return 0;
6914}
6915_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006916for ac_lib in '' x; do
6917 if test -z "$ac_lib"; then
6918 ac_res="none required"
6919 else
6920 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00006921 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00006922 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006923 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006924 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00006925fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006926rm -f core conftest.err conftest.$ac_objext \
6927 conftest$ac_exeext
Matthias Klose3cef2a92012-03-14 23:39:33 +01006928 if ${ac_cv_search_opendir+:} false; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006929 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00006930fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006931done
Matthias Klose3cef2a92012-03-14 23:39:33 +01006932if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006933
Martin v. Löwiseba40652007-08-30 20:10:57 +00006934else
6935 ac_cv_search_opendir=no
6936fi
6937rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006938LIBS=$ac_func_search_save_LIBS
6939fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006940{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6941$as_echo "$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006942ac_res=$ac_cv_search_opendir
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006943if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006944 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006945
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006946fi
6947
6948fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006949
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
6951$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006952if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006953 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006954else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006955 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006956/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006957#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006958int
6959main ()
6960{
6961return makedev(0, 0);
6962 ;
6963 return 0;
6964}
6965_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006966if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006967 ac_cv_header_sys_types_h_makedev=yes
6968else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006969 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006970fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006971rm -f core conftest.err conftest.$ac_objext \
6972 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006973
6974fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006975{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
6976$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006977
6978if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006979ac_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 +01006980if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006981
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006982$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006983
6984fi
6985
6986
6987
6988 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006989 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 +01006990if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006991
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006992$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006993
6994fi
6995
6996
6997 fi
6998fi
6999
Michael W. Hudson54241132001-12-07 15:38:26 +00007000
Martin v. Löwis11017b12006-01-14 18:12:57 +00007001# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00007002for ac_header in linux/netlink.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007003do :
7004 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 +00007005#ifdef HAVE_ASM_TYPES_H
7006#include <asm/types.h>
7007#endif
7008#ifdef HAVE_SYS_SOCKET_H
7009#include <sys/socket.h>
7010#endif
7011
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007012"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007013if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00007014 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007015#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007016_ACEOF
7017
7018fi
7019
7020done
7021
7022
Guido van Rossum627b2d71993-12-24 10:39:16 +00007023# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00007024was_it_defined=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
7026$as_echo_n "checking for clock_t in time.h... " >&6; }
7027cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007028/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007029#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007030
7031_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007032if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007033 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00007034 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007035else
Martin v. Löwis11437992002-04-12 09:54:03 +00007036
7037
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007038$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00007039
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007040
Guido van Rossum627b2d71993-12-24 10:39:16 +00007041fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00007042rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007043
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007044{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
7045$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00007046
Neal Norwitz11690112002-07-30 01:08:28 +00007047# Check whether using makedev requires defining _OSF_SOURCE
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
7049$as_echo_n "checking for makedev... " >&6; }
7050cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007051/* end confdefs.h. */
Jesus Cea616de772010-04-28 10:32:30 +00007052
7053#if defined(MAJOR_IN_MKDEV)
7054#include <sys/mkdev.h>
7055#elif defined(MAJOR_IN_SYSMACROS)
7056#include <sys/sysmacros.h>
7057#else
Neal Norwitz6eb37f02003-02-23 23:28:15 +00007058#include <sys/types.h>
Jesus Cea616de772010-04-28 10:32:30 +00007059#endif
Neal Norwitz11690112002-07-30 01:08:28 +00007060int
7061main ()
7062{
7063 makedev(0, 0)
7064 ;
7065 return 0;
7066}
7067_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007068if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007069 ac_cv_has_makedev=yes
7070else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007071 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007072fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007073rm -f core conftest.err conftest.$ac_objext \
7074 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00007075if test "$ac_cv_has_makedev" = "no"; then
7076 # we didn't link, try if _OSF_SOURCE will allow us to link
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007077 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007078/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00007079
Neal Norwitz6eb37f02003-02-23 23:28:15 +00007080#define _OSF_SOURCE 1
7081#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00007082
Neal Norwitz11690112002-07-30 01:08:28 +00007083int
7084main ()
7085{
7086 makedev(0, 0)
7087 ;
7088 return 0;
7089}
7090_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007091if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007092 ac_cv_has_makedev=yes
7093else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007094 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007095fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007096rm -f core conftest.err conftest.$ac_objext \
7097 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00007098 if test "$ac_cv_has_makedev" = "yes"; then
7099
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007100$as_echo "#define _OSF_SOURCE 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007101
7102 fi
7103fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007104{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
7105$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007106if test "$ac_cv_has_makedev" = "yes"; then
7107
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007108$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007109
7110fi
7111
Martin v. Löwis399a6892002-10-04 10:22:02 +00007112# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
7113# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
7114# defined, but the compiler does not support pragma redefine_extname,
7115# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
7116# structures (such as rlimit64) without declaring them. As a
7117# work-around, disable LFS on such configurations
7118
7119use_lfs=yes
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
7121$as_echo_n "checking Solaris LFS bug... " >&6; }
7122cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007123/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00007124
7125#define _LARGEFILE_SOURCE 1
7126#define _FILE_OFFSET_BITS 64
7127#include <sys/resource.h>
7128
Martin v. Löwis399a6892002-10-04 10:22:02 +00007129int
7130main ()
7131{
7132struct rlimit foo;
7133 ;
7134 return 0;
7135}
7136_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007137if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00007138 sol_lfs_bug=no
7139else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007140 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00007141fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007142rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007143{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
7144$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00007145if test "$sol_lfs_bug" = "yes"; then
7146 use_lfs=no
7147fi
7148
7149if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00007150# Two defines needed to enable largefile support on various platforms
7151# These may affect some typedefs
Georg Brandl94800df2011-02-25 11:09:02 +00007152case $ac_sys_system/$ac_sys_release in
7153AIX*)
7154
7155$as_echo "#define _LARGE_FILES 1" >>confdefs.h
7156
7157 ;;
7158esac
Guido van Rossum810cc512001-09-09 23:51:39 +00007159
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007160$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007161
7162
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007163$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00007164
Martin v. Löwis399a6892002-10-04 10:22:02 +00007165fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007166
Guido van Rossum84e7b241996-08-19 21:59:00 +00007167# Add some code to confdefs.h so that the test for off_t works on SCO
7168cat >> confdefs.h <<\EOF
7169#if defined(SCO_DS)
7170#undef _OFF_T
7171#endif
7172EOF
7173
Guido van Rossumef2255b2000-03-10 22:30:29 +00007174# Type availability checks
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007175ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007176if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007177
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007178else
Martin v. Löwis11437992002-04-12 09:54:03 +00007179
7180cat >>confdefs.h <<_ACEOF
7181#define mode_t int
7182_ACEOF
7183
7184fi
7185
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007186ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007187if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007188
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007189else
Martin v. Löwis11437992002-04-12 09:54:03 +00007190
7191cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007192#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00007193_ACEOF
7194
7195fi
7196
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007197ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007198if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007199
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007200else
Martin v. Löwis11437992002-04-12 09:54:03 +00007201
7202cat >>confdefs.h <<_ACEOF
7203#define pid_t int
7204_ACEOF
7205
7206fi
7207
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007208
Martin v. Löwis11437992002-04-12 09:54:03 +00007209cat >>confdefs.h <<_ACEOF
Matthias Klosecbf54b12010-05-08 11:04:18 +00007210#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00007211_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007212
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007213ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007214if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007215
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007216else
Martin v. Löwis11437992002-04-12 09:54:03 +00007217
7218cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007219#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007220_ACEOF
7221
7222fi
7223
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
7225$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007226if ${ac_cv_type_uid_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007227 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007228else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007229 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007230/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007231#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007232
7233_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007234if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007235 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007236 ac_cv_type_uid_t=yes
7237else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007238 ac_cv_type_uid_t=no
7239fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00007240rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007241
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007242fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007243{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
7244$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007245if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007246
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007247$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007248
7249
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007250$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007251
7252fi
7253
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007254
7255# There are two separate checks for each of the exact-width integer types we
7256# need. First we check whether the type is available using the usual
7257# AC_CHECK_TYPE macro with the default includes (which includes <inttypes.h>
7258# and <stdint.h> where available). We then also use the special type checks of
7259# the form AC_TYPE_UINT32_T, which in the case that uint32_t is not available
7260# directly, #define's uint32_t to be a suitable type.
7261
7262ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
7263if test "x$ac_cv_type_uint32_t" = xyes; then :
7264
7265$as_echo "#define HAVE_UINT32_T 1" >>confdefs.h
7266
7267fi
7268
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007269ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
7270case $ac_cv_c_uint32_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007271 no|yes) ;; #(
7272 *)
7273
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007274$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007275
7276
7277cat >>confdefs.h <<_ACEOF
7278#define uint32_t $ac_cv_c_uint32_t
7279_ACEOF
7280;;
7281 esac
7282
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007283
7284ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
7285if test "x$ac_cv_type_uint64_t" = xyes; then :
7286
7287$as_echo "#define HAVE_UINT64_T 1" >>confdefs.h
7288
7289fi
7290
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007291ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
7292case $ac_cv_c_uint64_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007293 no|yes) ;; #(
7294 *)
7295
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007296$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007297
7298
7299cat >>confdefs.h <<_ACEOF
7300#define uint64_t $ac_cv_c_uint64_t
7301_ACEOF
7302;;
7303 esac
7304
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007305
7306ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
7307if test "x$ac_cv_type_int32_t" = xyes; then :
7308
7309$as_echo "#define HAVE_INT32_T 1" >>confdefs.h
7310
7311fi
7312
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007313ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
7314case $ac_cv_c_int32_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007315 no|yes) ;; #(
7316 *)
7317
7318cat >>confdefs.h <<_ACEOF
7319#define int32_t $ac_cv_c_int32_t
7320_ACEOF
7321;;
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007322esac
7323
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007324
7325ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
7326if test "x$ac_cv_type_int64_t" = xyes; then :
7327
7328$as_echo "#define HAVE_INT64_T 1" >>confdefs.h
7329
7330fi
7331
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007332ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
7333case $ac_cv_c_int64_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007334 no|yes) ;; #(
7335 *)
7336
7337cat >>confdefs.h <<_ACEOF
7338#define int64_t $ac_cv_c_int64_t
7339_ACEOF
7340;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007341esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00007342
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007343
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007344ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007345if test "x$ac_cv_type_ssize_t" = xyes; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007346
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007347$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00007348
7349fi
7350
Jack Jansendd19cf82001-12-06 22:36:17 +00007351
Michael W. Hudson54241132001-12-07 15:38:26 +00007352# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007353# ANSI C requires sizeof(char) == 1, so no need to check it
Martin v. Löwiseba40652007-08-30 20:10:57 +00007354# The cast to long int works around a bug in the HP C Compiler
7355# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7356# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7357# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
7359$as_echo_n "checking size of int... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007360if ${ac_cv_sizeof_int+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007361 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007362else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007363 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 +00007364
Martin v. Löwis11437992002-04-12 09:54:03 +00007365else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007366 if test "$ac_cv_type_int" = yes; then
7367 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7368$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007369as_fn_error 77 "cannot compute sizeof (int)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007370See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007371 else
7372 ac_cv_sizeof_int=0
7373 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007374fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007375
Martin v. Löwis11437992002-04-12 09:54:03 +00007376fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007377{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
7378$as_echo "$ac_cv_sizeof_int" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007379
7380
7381
Martin v. Löwis11437992002-04-12 09:54:03 +00007382cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007383#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007384_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007385
7386
Martin v. Löwiseba40652007-08-30 20:10:57 +00007387# The cast to long int works around a bug in the HP C Compiler
7388# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7389# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7390# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
7392$as_echo_n "checking size of long... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007393if ${ac_cv_sizeof_long+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007394 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007395else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007396 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 +00007397
Martin v. Löwis11437992002-04-12 09:54:03 +00007398else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007399 if test "$ac_cv_type_long" = yes; then
7400 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7401$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007402as_fn_error 77 "cannot compute sizeof (long)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007403See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007404 else
7405 ac_cv_sizeof_long=0
7406 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007407fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007408
Martin v. Löwis11437992002-04-12 09:54:03 +00007409fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007410{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
7411$as_echo "$ac_cv_sizeof_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007412
7413
7414
Martin v. Löwis11437992002-04-12 09:54:03 +00007415cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007416#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007417_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007418
7419
Martin v. Löwiseba40652007-08-30 20:10:57 +00007420# The cast to long int works around a bug in the HP C Compiler
7421# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7422# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7423# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
7425$as_echo_n "checking size of void *... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007426if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007427 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007428else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007429 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 +00007430
Martin v. Löwis11437992002-04-12 09:54:03 +00007431else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007432 if test "$ac_cv_type_void_p" = yes; then
7433 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7434$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007435as_fn_error 77 "cannot compute sizeof (void *)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007436See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007437 else
7438 ac_cv_sizeof_void_p=0
7439 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007440fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007441
Martin v. Löwis11437992002-04-12 09:54:03 +00007442fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007443{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
7444$as_echo "$ac_cv_sizeof_void_p" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007445
7446
7447
Martin v. Löwis11437992002-04-12 09:54:03 +00007448cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007449#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00007450_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007451
7452
Martin v. Löwiseba40652007-08-30 20:10:57 +00007453# The cast to long int works around a bug in the HP C Compiler
7454# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7455# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7456# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
7458$as_echo_n "checking size of short... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007459if ${ac_cv_sizeof_short+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007460 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007461else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007462 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 +00007463
Martin v. Löwis11437992002-04-12 09:54:03 +00007464else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007465 if test "$ac_cv_type_short" = yes; then
7466 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7467$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007468as_fn_error 77 "cannot compute sizeof (short)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007469See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007470 else
7471 ac_cv_sizeof_short=0
7472 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007473fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007474
Martin v. Löwis11437992002-04-12 09:54:03 +00007475fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007476{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
7477$as_echo "$ac_cv_sizeof_short" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007478
7479
7480
Martin v. Löwis11437992002-04-12 09:54:03 +00007481cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007482#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007483_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007484
7485
Martin v. Löwiseba40652007-08-30 20:10:57 +00007486# The cast to long int works around a bug in the HP C Compiler
7487# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7488# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7489# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007490{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
7491$as_echo_n "checking size of float... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007492if ${ac_cv_sizeof_float+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007493 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007494else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007495 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 +00007496
Martin v. Löwis11437992002-04-12 09:54:03 +00007497else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007498 if test "$ac_cv_type_float" = yes; then
7499 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7500$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007501as_fn_error 77 "cannot compute sizeof (float)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007502See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007503 else
7504 ac_cv_sizeof_float=0
7505 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007506fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007507
Martin v. Löwis11437992002-04-12 09:54:03 +00007508fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007509{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
7510$as_echo "$ac_cv_sizeof_float" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007511
7512
7513
Martin v. Löwis11437992002-04-12 09:54:03 +00007514cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007515#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007516_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007517
7518
Martin v. Löwiseba40652007-08-30 20:10:57 +00007519# The cast to long int works around a bug in the HP C Compiler
7520# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7521# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7522# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
7524$as_echo_n "checking size of double... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007525if ${ac_cv_sizeof_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007526 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007527else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007528 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 +00007529
Martin v. Löwis11437992002-04-12 09:54:03 +00007530else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007531 if test "$ac_cv_type_double" = yes; then
7532 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7533$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007534as_fn_error 77 "cannot compute sizeof (double)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007535See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007536 else
7537 ac_cv_sizeof_double=0
7538 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007539fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007540
Martin v. Löwis11437992002-04-12 09:54:03 +00007541fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007542{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
7543$as_echo "$ac_cv_sizeof_double" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007544
7545
7546
Martin v. Löwis11437992002-04-12 09:54:03 +00007547cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007548#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007549_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007550
7551
Martin v. Löwiseba40652007-08-30 20:10:57 +00007552# The cast to long int works around a bug in the HP C Compiler
7553# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7554# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7555# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
7557$as_echo_n "checking size of fpos_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007558if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007559 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007560else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007561 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 +00007562
Martin v. Löwis11437992002-04-12 09:54:03 +00007563else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007564 if test "$ac_cv_type_fpos_t" = yes; then
7565 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7566$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007567as_fn_error 77 "cannot compute sizeof (fpos_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007568See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007569 else
7570 ac_cv_sizeof_fpos_t=0
7571 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007572fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007573
Martin v. Löwis11437992002-04-12 09:54:03 +00007574fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007575{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
7576$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007577
7578
7579
Martin v. Löwis11437992002-04-12 09:54:03 +00007580cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007581#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007582_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007583
Michael W. Hudson54241132001-12-07 15:38:26 +00007584
Martin v. Löwiseba40652007-08-30 20:10:57 +00007585# The cast to long int works around a bug in the HP C Compiler
7586# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7587# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7588# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
7590$as_echo_n "checking size of size_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007591if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007592 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007593else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007594 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 +00007595
Martin v. Löwis18e16552006-02-15 17:27:45 +00007596else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007597 if test "$ac_cv_type_size_t" = yes; then
7598 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7599$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007600as_fn_error 77 "cannot compute sizeof (size_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007601See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007602 else
7603 ac_cv_sizeof_size_t=0
7604 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00007605fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007606
Martin v. Löwis18e16552006-02-15 17:27:45 +00007607fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007608{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
7609$as_echo "$ac_cv_sizeof_size_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007610
7611
7612
Martin v. Löwis18e16552006-02-15 17:27:45 +00007613cat >>confdefs.h <<_ACEOF
7614#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
7615_ACEOF
7616
7617
Christian Heimes951cc0f2008-01-31 23:08:23 +00007618# The cast to long int works around a bug in the HP C Compiler
7619# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7620# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7621# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
7623$as_echo_n "checking size of pid_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007624if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007625 $as_echo_n "(cached) " >&6
Christian Heimes951cc0f2008-01-31 23:08:23 +00007626else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007627 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 +00007628
Christian Heimes951cc0f2008-01-31 23:08:23 +00007629else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007630 if test "$ac_cv_type_pid_t" = yes; then
7631 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7632$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007633as_fn_error 77 "cannot compute sizeof (pid_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007634See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes951cc0f2008-01-31 23:08:23 +00007635 else
7636 ac_cv_sizeof_pid_t=0
7637 fi
7638fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007639
Christian Heimes951cc0f2008-01-31 23:08:23 +00007640fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007641{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
7642$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes951cc0f2008-01-31 23:08:23 +00007643
7644
7645
7646cat >>confdefs.h <<_ACEOF
7647#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
7648_ACEOF
7649
7650
Michael W. Hudson54241132001-12-07 15:38:26 +00007651
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
7653$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007654have_long_long=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007655cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007656/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007657
Martin v. Löwis11437992002-04-12 09:54:03 +00007658int
7659main ()
7660{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007661long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007662 ;
7663 return 0;
7664}
7665_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007666if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007667
7668
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007669$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007670
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007671 have_long_long=yes
7672
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007673fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007674rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007675{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
7676$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007677if test "$have_long_long" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00007678# The cast to long int works around a bug in the HP C Compiler
7679# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7680# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7681# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
7683$as_echo_n "checking size of long long... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007684if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007685 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007686else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007687 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 +00007688
Martin v. Löwis11437992002-04-12 09:54:03 +00007689else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007690 if test "$ac_cv_type_long_long" = yes; then
7691 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7692$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007693as_fn_error 77 "cannot compute sizeof (long long)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007694See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007695 else
7696 ac_cv_sizeof_long_long=0
7697 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007698fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007699
Martin v. Löwis11437992002-04-12 09:54:03 +00007700fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007701{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
7702$as_echo "$ac_cv_sizeof_long_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007703
7704
7705
Martin v. Löwis11437992002-04-12 09:54:03 +00007706cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007707#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007708_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007709
Michael W. Hudson54241132001-12-07 15:38:26 +00007710
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007711fi
7712
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
7714$as_echo_n "checking for long double support... " >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007715have_long_double=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007716cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007717/* end confdefs.h. */
7718
7719int
7720main ()
7721{
Matthias Klosec511b472010-05-08 11:01:39 +00007722long double x; x = (long double)0;
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007723 ;
7724 return 0;
7725}
7726_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007727if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007728
7729
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007730$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007731
7732 have_long_double=yes
7733
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007734fi
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007735rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007736{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
7737$as_echo "$have_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007738if test "$have_long_double" = yes ; then
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007739# The cast to long int works around a bug in the HP C Compiler
7740# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7741# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7742# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
7744$as_echo_n "checking size of long double... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007745if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007746 $as_echo_n "(cached) " >&6
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007747else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007748 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 +00007749
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007750else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007751 if test "$ac_cv_type_long_double" = yes; then
7752 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7753$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007754as_fn_error 77 "cannot compute sizeof (long double)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007755See \`config.log' for more details" "$LINENO" 5; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007756 else
7757 ac_cv_sizeof_long_double=0
7758 fi
7759fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007760
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007761fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007762{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
7763$as_echo "$ac_cv_sizeof_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007764
7765
7766
7767cat >>confdefs.h <<_ACEOF
7768#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
7769_ACEOF
7770
7771
7772fi
7773
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
7775$as_echo_n "checking for _Bool support... " >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007776have_c99_bool=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007777cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007778/* end confdefs.h. */
7779
7780int
7781main ()
7782{
7783_Bool x; x = (_Bool)0;
7784 ;
7785 return 0;
7786}
7787_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007788if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007789
7790
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007791$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007792
7793 have_c99_bool=yes
7794
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007795fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007796rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007797{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7798$as_echo "$have_c99_bool" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007799if test "$have_c99_bool" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00007800# The cast to long int works around a bug in the HP C Compiler
7801# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7802# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7803# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7805$as_echo_n "checking size of _Bool... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007806if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007807 $as_echo_n "(cached) " >&6
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007808else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007809 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 +00007810
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007811else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007812 if test "$ac_cv_type__Bool" = yes; then
7813 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7814$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007815as_fn_error 77 "cannot compute sizeof (_Bool)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007816See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007817 else
7818 ac_cv_sizeof__Bool=0
7819 fi
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007820fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007821
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007822fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007823{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7824$as_echo "$ac_cv_sizeof__Bool" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007825
7826
7827
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007828cat >>confdefs.h <<_ACEOF
7829#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7830_ACEOF
7831
7832
7833fi
7834
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007835ac_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 +00007836 #include <stdint.h>
7837 #endif
Antoine Pitrou7be5a652010-10-10 08:14:41 +00007838 #ifdef HAVE_INTTYPES_H
7839 #include <inttypes.h>
7840 #endif
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007841"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007842if test "x$ac_cv_type_uintptr_t" = xyes; then :
Martin v. Löwisebe26702006-10-02 14:55:51 +00007843
7844cat >>confdefs.h <<_ACEOF
7845#define HAVE_UINTPTR_T 1
7846_ACEOF
7847
Martin v. Löwiseba40652007-08-30 20:10:57 +00007848# The cast to long int works around a bug in the HP C Compiler
7849# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7850# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7851# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7853$as_echo_n "checking size of uintptr_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007854if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007855 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007856else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007857 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 +00007858
Martin v. Löwis11437992002-04-12 09:54:03 +00007859else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007860 if test "$ac_cv_type_uintptr_t" = yes; then
7861 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7862$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007863as_fn_error 77 "cannot compute sizeof (uintptr_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007864See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007865 else
7866 ac_cv_sizeof_uintptr_t=0
7867 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007868fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007869
Martin v. Löwis11437992002-04-12 09:54:03 +00007870fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007871{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7872$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007873
7874
7875
Martin v. Löwis11437992002-04-12 09:54:03 +00007876cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007877#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007878_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007879
Michael W. Hudson54241132001-12-07 15:38:26 +00007880
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007881fi
7882
Martin v. Löwisebe26702006-10-02 14:55:51 +00007883
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007884# The cast to long int works around a bug in the HP C Compiler
7885# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7886# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7887# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
7889$as_echo_n "checking size of off_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007890if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007891 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007892else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007893 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007894#ifdef HAVE_SYS_TYPES_H
7895#include <sys/types.h>
7896#endif
7897
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007898"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007899
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007900else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007901 if test "$ac_cv_type_off_t" = yes; then
7902 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7903$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007904as_fn_error 77 "cannot compute sizeof (off_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007905See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007906 else
7907 ac_cv_sizeof_off_t=0
7908 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007909fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007910
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007911fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007912{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
7913$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007914
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007915
7916
Martin v. Löwis11437992002-04-12 09:54:03 +00007917cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007918#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007919_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007920
Michael W. Hudson54241132001-12-07 15:38:26 +00007921
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007922
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
7924$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson0ef0b912009-12-31 21:11:48 +00007925if test "$have_long_long" = yes
7926then
7927if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007928 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007929
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007930$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007931
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7933$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007934else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7936$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007937fi
Mark Dickinson0ef0b912009-12-31 21:11:48 +00007938else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007939 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7940$as_echo "no" >&6; }
Mark Dickinson0ef0b912009-12-31 21:11:48 +00007941fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007942
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007943# The cast to long int works around a bug in the HP C Compiler
7944# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7945# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7946# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
7948$as_echo_n "checking size of time_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007949if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007950 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007951else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007952 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007953#ifdef HAVE_SYS_TYPES_H
7954#include <sys/types.h>
7955#endif
7956#ifdef HAVE_TIME_H
7957#include <time.h>
7958#endif
7959
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007960"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007961
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007962else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007963 if test "$ac_cv_type_time_t" = yes; then
7964 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7965$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007966as_fn_error 77 "cannot compute sizeof (time_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007967See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007968 else
7969 ac_cv_sizeof_time_t=0
7970 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007971fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007972
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007973fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007974{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
7975$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007976
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007977
7978
Martin v. Löwis11437992002-04-12 09:54:03 +00007979cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007980#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007981_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007982
Michael W. Hudson54241132001-12-07 15:38:26 +00007983
7984
Trent Mick635f6fb2000-08-23 21:33:05 +00007985# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007986ac_save_cc="$CC"
7987if test "$ac_cv_kpthread" = "yes"
7988then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00007989elif test "$ac_cv_kthread" = "yes"
7990then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00007991elif test "$ac_cv_pthread" = "yes"
7992then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007993fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
7995$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007996have_pthread_t=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007997cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007998/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00007999
8000 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008001int
8002main ()
8003{
Guido van Rossum12580492000-09-24 16:47:19 +00008004pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008005 ;
8006 return 0;
8007}
Matthias Klosec511b472010-05-08 11:01:39 +00008008
Martin v. Löwis11437992002-04-12 09:54:03 +00008009_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008010if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008011 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008012fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008013rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008014{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8015$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008016if test "$have_pthread_t" = yes ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008017 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008018# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8019# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8020# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8022$as_echo_n "checking size of pthread_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008023if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008024 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008025else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008026 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008027#ifdef HAVE_PTHREAD_H
8028#include <pthread.h>
8029#endif
8030
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008031"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008032
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008033else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008034 if test "$ac_cv_type_pthread_t" = yes; then
8035 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8036$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008037as_fn_error 77 "cannot compute sizeof (pthread_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01008038See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008039 else
8040 ac_cv_sizeof_pthread_t=0
8041 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008042fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008043
Trent Mick635f6fb2000-08-23 21:33:05 +00008044fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008045{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8046$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008047
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008048
8049
Martin v. Löwis11437992002-04-12 09:54:03 +00008050cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008051#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008052_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008053
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008054
Trent Mick635f6fb2000-08-23 21:33:05 +00008055fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008056CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008057
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-toolbox-glue" >&5
8059$as_echo_n "checking for --enable-toolbox-glue... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008060# Check whether --enable-toolbox-glue was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008061if test "${enable_toolbox_glue+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008062 enableval=$enable_toolbox_glue;
8063fi
Jack Jansene578a632001-08-15 01:27:14 +00008064
8065
8066if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +00008067then
Jack Jansene578a632001-08-15 01:27:14 +00008068 case $ac_sys_system/$ac_sys_release in
8069 Darwin/*)
8070 enable_toolbox_glue="yes";;
8071 *)
8072 enable_toolbox_glue="no";;
8073 esac
8074fi
8075case "$enable_toolbox_glue" in
8076yes)
Jack Jansene578a632001-08-15 01:27:14 +00008077 extra_machdep_objs="Python/mactoolboxglue.o"
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008078 extra_undefs="-u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +00008079
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008080$as_echo "#define USE_TOOLBOX_OBJECT_GLUE 1" >>confdefs.h
Jack Jansene578a632001-08-15 01:27:14 +00008081
8082 ;;
8083*)
Jack Jansene578a632001-08-15 01:27:14 +00008084 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00008085 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00008086 ;;
8087esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008088{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_toolbox_glue" >&5
8089$as_echo "$enable_toolbox_glue" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008090
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008091
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00008092
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008093case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +00008094 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008095 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8096 ;;
8097 Darwin/*)
8098 OTHER_LIBTOOL_OPT=""
8099 ;;
8100esac
8101
8102
Ronald Oussoren25967582009-09-06 10:00:26 +00008103
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008104case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +00008105 Darwin/[01567]\..*)
Ronald Oussoren988117f2006-04-29 11:31:35 +00008106 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8107 if test "${enable_universalsdk}"; then
8108 :
8109 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00008110 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Ronald Oussoren988117f2006-04-29 11:31:35 +00008111 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008112 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008113 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008114 Darwin/*)
Ronald Oussorena55af9a2010-01-17 16:25:57 +00008115 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008116 if test ${gcc_version} '<' 4.0
8117 then
8118 LIBTOOL_CRUFT="-lcc_dynamic"
8119 else
8120 LIBTOOL_CRUFT=""
8121 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008122 if test "$cross_compiling" = yes; then :
Ronald Oussoren23d92532009-09-07 06:12:00 +00008123 ac_osx_32bit=yes
Ronald Oussoren25967582009-09-06 10:00:26 +00008124else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008125 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren25967582009-09-06 10:00:26 +00008126/* end confdefs.h. */
Ronald Oussoren23d92532009-09-07 06:12:00 +00008127
Ronald Oussoren25967582009-09-06 10:00:26 +00008128 #include <unistd.h>
8129 int main(int argc, char*argv[])
8130 {
8131 if (sizeof(long) == 4) {
8132 return 0;
8133 } else {
8134 return 1;
8135 }
Ronald Oussoren84ddd722009-09-08 07:17:10 +00008136 }
Ronald Oussoren23d92532009-09-07 06:12:00 +00008137
Ronald Oussoren25967582009-09-06 10:00:26 +00008138_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008139if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren25967582009-09-06 10:00:26 +00008140 ac_osx_32bit=yes
8141else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008142 ac_osx_32bit=no
Ronald Oussoren25967582009-09-06 10:00:26 +00008143fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008144rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8145 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren25967582009-09-06 10:00:26 +00008146fi
8147
8148
Ronald Oussoren25967582009-09-06 10:00:26 +00008149 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00008150 case `/usr/bin/arch` in
Ronald Oussoren25967582009-09-06 10:00:26 +00008151 i386)
8152 MACOSX_DEFAULT_ARCH="i386"
8153 ;;
8154 ppc)
8155 MACOSX_DEFAULT_ARCH="ppc"
8156 ;;
8157 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008158 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren25967582009-09-06 10:00:26 +00008159 ;;
8160 esac
8161 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00008162 case `/usr/bin/arch` in
Ronald Oussoren25967582009-09-06 10:00:26 +00008163 i386)
8164 MACOSX_DEFAULT_ARCH="x86_64"
8165 ;;
8166 ppc)
8167 MACOSX_DEFAULT_ARCH="ppc64"
8168 ;;
8169 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008170 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren25967582009-09-06 10:00:26 +00008171 ;;
8172 esac
8173
8174 #ARCH_RUN_32BIT="true"
8175 fi
8176
8177 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00008178 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008179 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008180esac
8181
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
8183$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008184if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008185then
Skip Montanarodecc6a42003-01-01 20:07:49 +00008186 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00008187 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008188 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008189
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008190$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008191
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008192 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8193$as_echo "yes" >&6; }
Ronald Oussoren450d5612009-06-08 21:12:41 +00008194 if test $enable_shared = "yes"
8195 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008196 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 +00008197 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008198else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8200$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008201fi
8202
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
8204$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008205case $ac_sys_system/$ac_sys_release in
8206 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008207
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008208$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008209
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
8211$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008212 ;;
8213 *)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8215$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008216 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008217esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008218
Guido van Rossum0a516c91994-09-12 10:58:40 +00008219# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008220
Michael W. Hudson54241132001-12-07 15:38:26 +00008221
8222
8223
8224
Ronald Oussoren75912852010-04-08 08:13:31 +00008225
Guido van Rossum0a516c91994-09-12 10:58:40 +00008226# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00008227# -- usually .so, .sl on HP-UX, .dll on Cygwin
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
8229$as_echo_n "checking SO... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008230if test -z "$SO"
8231then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008232 case $ac_sys_system in
Neal Norwitz58e28882006-05-19 07:00:58 +00008233 hp*|HP*)
8234 case `uname -m` in
8235 ia64) SO=.so;;
8236 *) SO=.sl;;
8237 esac
8238 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00008239 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00008240 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008241 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +00008242else
8243 # this might also be a termcap variable, see #610332
8244 echo
8245 echo '====================================================================='
8246 echo '+ +'
8247 echo '+ WARNING: You have set SO in your environment. +'
8248 echo '+ Do you really mean to change the extension for shared libraries? +'
8249 echo '+ Continuing in 10 seconds to let you to ponder. +'
8250 echo '+ +'
8251 echo '====================================================================='
8252 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +00008253fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008254{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
8255$as_echo "$SO" >&6; }
Neal Norwitz58e28882006-05-19 07:00:58 +00008256
Ronald Oussoren79f90492009-01-02 10:44:46 +00008257
Neal Norwitz58e28882006-05-19 07:00:58 +00008258cat >>confdefs.h <<_ACEOF
8259#define SHLIB_EXT "$SO"
8260_ACEOF
8261
Guido van Rossum0a516c91994-09-12 10:58:40 +00008262# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00008263# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008264# (Shared libraries in this instance are shared modules to be loaded into
8265# Python, as opposed to building Python itself as a shared library.)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
8267$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008268if test -z "$LDSHARED"
8269then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008270 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008271 AIX*)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008272 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00008273 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008274 ;;
8275 BeOS*)
8276 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +00008277 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008278 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00008279 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00008280 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008281 SunOS/5*)
Ronald Oussoren75912852010-04-08 08:13:31 +00008282 if test "$GCC" = "yes" ; then
8283 LDSHARED='$(CC) -shared'
8284 LDCXXSHARED='$(CXX) -shared'
8285 else
8286 LDSHARED='$(CC) -G'
8287 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a662000-05-26 12:22:54 +00008288 fi ;;
Thomas Hellerdc96a772008-04-04 10:07:55 +00008289 hp*|HP*)
Ronald Oussoren75912852010-04-08 08:13:31 +00008290 if test "$GCC" = "yes" ; then
8291 LDSHARED='$(CC) -shared'
8292 LDCXXSHARED='$(CXX) -shared'
8293 else
8294 LDSHARED='ld -b'
Thomas Hellerdc96a772008-04-04 10:07:55 +00008295 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +00008296 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +00008297 Darwin/1.3*)
Stefan Krah3a3e2032010-11-28 15:30:05 +00008298 LDSHARED='$(CC) -bundle'
8299 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00008300 if test "$enable_framework" ; then
8301 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008302 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8303 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008304 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008305 else
8306 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00008307 LDSHARED="$LDSHARED -undefined suppress"
Ronald Oussoren75912852010-04-08 08:13:31 +00008308 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00008309 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008310 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Stefan Krah3a3e2032010-11-28 15:30:05 +00008311 LDSHARED='$(CC) -bundle'
8312 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00008313 if test "$enable_framework" ; then
8314 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008315 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8316 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008317 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008318 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00008319 # No framework, use the Python app as bundle-loader
8320 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00008321 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008322 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008323 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008324 Darwin/*)
8325 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
8326 # This allows an extension to be used in any Python
Ronald Oussoren38f1b982007-09-02 09:46:07 +00008327
Ned Deilyc40b9032014-06-25 13:48:46 -07008328 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
8329 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
8330 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
8331 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
8332 if test ${dep_target_major} -eq 10 && \
8333 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00008334 then
Ned Deilyc40b9032014-06-25 13:48:46 -07008335 # building for OS X 10.0 through 10.2
Stefan Krah3a3e2032010-11-28 15:30:05 +00008336 LDSHARED='$(CC) -bundle'
8337 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00008338 if test "$enable_framework" ; then
8339 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008340 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8341 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008342 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008343 else
8344 # No framework, use the Python app as bundle-loader
8345 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
8346 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008347 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008348 fi
Ned Deilyc40b9032014-06-25 13:48:46 -07008349 else
8350 # building for OS X 10.3 and later
8351 if test "${enable_universalsdk}"; then
8352 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
8353 fi
8354 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
8355 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
8356 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00008357 fi
8358 ;;
Ronald Oussoren75912852010-04-08 08:13:31 +00008359 Linux*|GNU*|QNX*)
8360 LDSHARED='$(CC) -shared'
8361 LDCXXSHARED='$(CXX) -shared';;
8362 BSD/OS*/4*)
8363 LDSHARED="gcc -shared"
8364 LDCXXSHARED="g++ -shared";;
Martin v. Löwis222c5152006-06-03 07:37:13 +00008365 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00008366 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00008367 then
Stefan Krah3a3e2032010-11-28 15:30:05 +00008368 LDSHARED='$(CC) -shared'
8369 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00008370 else
Stefan Krah3a3e2032010-11-28 15:30:05 +00008371 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00008372 fi;;
Martin v. Löwis222c5152006-06-03 07:37:13 +00008373 OpenBSD*)
8374 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8375 then
Stefan Krah3a3e2032010-11-28 15:30:05 +00008376 LDSHARED='$(CC) -shared $(CCSHARED)'
8377 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Martin v. Löwis222c5152006-06-03 07:37:13 +00008378 else
8379 case `uname -r` in
8380 [01].* | 2.[0-7] | 2.[0-7].*)
8381 LDSHARED="ld -Bshareable ${LDFLAGS}"
8382 ;;
8383 *)
Stefan Krah3a3e2032010-11-28 15:30:05 +00008384 LDSHARED='$(CC) -shared $(CCSHARED)'
8385 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Martin v. Löwis222c5152006-06-03 07:37:13 +00008386 ;;
8387 esac
8388 fi;;
Ronald Oussoren75912852010-04-08 08:13:31 +00008389 NetBSD*|DragonFly*)
Antoine Pitroucb402772011-01-02 20:51:34 +00008390 LDSHARED='$(CC) -shared'
8391 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008392 OpenUNIX*|UnixWare*)
Ronald Oussoren75912852010-04-08 08:13:31 +00008393 if test "$GCC" = "yes" ; then
8394 LDSHARED='$(CC) -shared'
8395 LDCXXSHARED='$(CXX) -shared'
8396 else
8397 LDSHARED='$(CC) -G'
8398 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00008399 fi;;
Ronald Oussoren75912852010-04-08 08:13:31 +00008400 SCO_SV*)
8401 LDSHARED='$(CC) -Wl,-G,-Bexport'
8402 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
8403 CYGWIN*)
8404 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
8405 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
8406 atheos*)
8407 LDSHARED="gcc -shared"
8408 LDCXXSHARED="g++ -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008409 *) LDSHARED="ld";;
8410 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008411fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008412{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
8413$as_echo "$LDSHARED" >&6; }
Ronald Oussoren75912852010-04-08 08:13:31 +00008414LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008415BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00008416# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008417# library (module) -- this is only needed for a few systems
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
8419$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008420if test -z "$CCSHARED"
8421then
Guido van Rossum07397971997-04-29 21:49:50 +00008422 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008423 SunOS*) if test "$GCC" = yes;
Martin v. Löwiseb623572007-03-12 10:50:39 +00008424 then CCSHARED="-fPIC";
8425 elif test `uname -p` = sparc;
8426 then CCSHARED="-xcode=pic32";
8427 else CCSHARED="-Kpic";
8428 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00008429 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00008430 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00008431 else CCSHARED="+z";
8432 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008433 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008434 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008435 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008436 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008437 if test "$GCC" = "yes"
8438 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008439 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008440 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008441 SCO_SV*)
8442 if test "$GCC" = "yes"
8443 then CCSHARED="-fPIC"
8444 else CCSHARED="-Kpic -belf"
8445 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008446 IRIX*/6*) case $CC in
8447 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00008448 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008449 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008450 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008451 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008452fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008453{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
8454$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008455# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008456# the python executable -- this is only needed for a few systems
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
8458$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008459if test -z "$LINKFORSHARED"
8460then
Guido van Rossum07397971997-04-29 21:49:50 +00008461 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008462 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008463 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00008464 LINKFORSHARED="-Wl,-E -Wl,+s";;
8465# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008466 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008467 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008468 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00008469 Darwin/*)
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008470 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
8471 # which is
Jack Jansene578a632001-08-15 01:27:14 +00008472 # not used by the core itself but which needs to be in the core so
8473 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +00008474 # -prebind is no longer used, because it actually seems to give a
8475 # slowdown in stead of a speedup, maybe due to the large number of
8476 # dynamic loads Python does.
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008477
8478 LINKFORSHARED="$extra_undefs"
Jack Jansene578a632001-08-15 01:27:14 +00008479 if test "$enable_framework"
8480 then
Jack Jansenda49e192005-01-07 13:08:22 +00008481 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008482 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008483 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008484 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008485 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00008486 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008487 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00008488 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8489 then
8490 LINKFORSHARED="-Wl,--export-dynamic"
8491 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008492 SunOS/5*) case $CC in
8493 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00008494 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00008495 then
8496 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008497 fi;;
8498 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00008499 CYGWIN*)
8500 if test $enable_shared = "no"
8501 then
8502 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
8503 fi;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00008504 QNX*)
8505 # -Wl,-E causes the symbols to be added to the dynamic
8506 # symbol table so that they can be found when a module
8507 # is loaded. -N 2048K causes the stack size to be set
8508 # to 2048 kilobytes so that the stack doesn't overflow
8509 # when running test_compile.py.
8510 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008511 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008512fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008513{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
8514$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008515
Michael W. Hudson54241132001-12-07 15:38:26 +00008516
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00008517
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
8519$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008520if test ! "$LIBRARY" = "$LDLIBRARY"
8521then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00008522 case $ac_sys_system in
8523 CYGWIN*)
8524 # Cygwin needs CCSHARED when building extension DLLs
8525 # but not when building the interpreter DLL.
8526 CFLAGSFORSHARED='';;
8527 *)
8528 CFLAGSFORSHARED='$(CCSHARED)'
8529 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008530fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008531{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
8532$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008533
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008534# SHLIBS are libraries (except -lc and -lm) to link to the python shared
8535# library (with --enable-shared).
8536# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008537# symbols, this must be set to $(LIBS) (expanded by make). We do this even
8538# if it is not required, since it creates a dependency of the shared library
8539# to LIBS. This, in turn, means that applications linking the shared libpython
8540# don't need to link LIBS explicitly. The default should be only changed
8541# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008542
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
8544$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008545case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008546 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008547 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008548esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008549{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
8550$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008551
8552
Guido van Rossum627b2d71993-12-24 10:39:16 +00008553# checks for libraries
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
8555$as_echo_n "checking for dlopen in -ldl... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008556if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008557 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008558else
Martin v. Löwis11437992002-04-12 09:54:03 +00008559 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008560LIBS="-ldl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008561cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008562/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008563
Martin v. Löwiseba40652007-08-30 20:10:57 +00008564/* Override any GCC internal prototype to avoid an error.
8565 Use char because int might match the return type of a GCC
8566 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008567#ifdef __cplusplus
8568extern "C"
8569#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008570char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008571int
8572main ()
8573{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008574return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008575 ;
8576 return 0;
8577}
8578_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008579if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008580 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008581else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008582 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008583fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008584rm -f core conftest.err conftest.$ac_objext \
8585 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008586LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008587fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008588{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
8589$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008590if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008591 cat >>confdefs.h <<_ACEOF
8592#define HAVE_LIBDL 1
8593_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008594
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008595 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00008596
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008597fi
8598 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
8600$as_echo_n "checking for shl_load in -ldld... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008601if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008602 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008603else
Martin v. Löwis11437992002-04-12 09:54:03 +00008604 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008605LIBS="-ldld $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008606cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008607/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008608
Martin v. Löwiseba40652007-08-30 20:10:57 +00008609/* Override any GCC internal prototype to avoid an error.
8610 Use char because int might match the return type of a GCC
8611 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008612#ifdef __cplusplus
8613extern "C"
8614#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008615char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008616int
8617main ()
8618{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008619return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008620 ;
8621 return 0;
8622}
8623_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008624if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008625 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008626else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008627 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008628fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008629rm -f core conftest.err conftest.$ac_objext \
8630 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008631LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008632fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008633{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
8634$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008635if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008636 cat >>confdefs.h <<_ACEOF
8637#define HAVE_LIBDLD 1
8638_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008639
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008640 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008641
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008642fi
8643 # Dynamic linking for HP-UX
Victor Stinner7c906672015-01-06 13:53:37 +01008644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for RAND_egd in -lcrypto" >&5
8645$as_echo_n "checking for RAND_egd in -lcrypto... " >&6; }
8646if ${ac_cv_lib_crypto_RAND_egd+:} false; then :
8647 $as_echo_n "(cached) " >&6
8648else
8649 ac_check_lib_save_LIBS=$LIBS
8650LIBS="-lcrypto $LIBS"
8651cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8652/* end confdefs.h. */
8653
8654/* Override any GCC internal prototype to avoid an error.
8655 Use char because int might match the return type of a GCC
8656 builtin and then its argument prototype would still apply. */
8657#ifdef __cplusplus
8658extern "C"
8659#endif
8660char RAND_egd ();
8661int
8662main ()
8663{
8664return RAND_egd ();
8665 ;
8666 return 0;
8667}
8668_ACEOF
8669if ac_fn_c_try_link "$LINENO"; then :
8670 ac_cv_lib_crypto_RAND_egd=yes
8671else
8672 ac_cv_lib_crypto_RAND_egd=no
8673fi
8674rm -f core conftest.err conftest.$ac_objext \
8675 conftest$ac_exeext conftest.$ac_ext
8676LIBS=$ac_check_lib_save_LIBS
8677fi
8678{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_RAND_egd" >&5
8679$as_echo "$ac_cv_lib_crypto_RAND_egd" >&6; }
8680if test "x$ac_cv_lib_crypto_RAND_egd" = xyes; then :
8681
8682$as_echo "#define HAVE_RAND_EGD 1" >>confdefs.h
8683
8684fi
8685
Martin v. Löwis519adae2003-09-20 10:47:47 +00008686
Ronald Oussoren79f90492009-01-02 10:44:46 +00008687# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00008688if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008689 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
8690$as_echo_n "checking for library containing sem_init... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008691if ${ac_cv_search_sem_init+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008692 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008693else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008694 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008695cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008696/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008697
Martin v. Löwiseba40652007-08-30 20:10:57 +00008698/* Override any GCC internal prototype to avoid an error.
8699 Use char because int might match the return type of a GCC
8700 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008701#ifdef __cplusplus
8702extern "C"
8703#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008704char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008705int
8706main ()
8707{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008708return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008709 ;
8710 return 0;
8711}
8712_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00008713for ac_lib in '' pthread rt posix4; do
8714 if test -z "$ac_lib"; then
8715 ac_res="none required"
8716 else
8717 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00008718 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00008719 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008720 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008721 ac_cv_search_sem_init=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00008722fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008723rm -f core conftest.err conftest.$ac_objext \
8724 conftest$ac_exeext
Matthias Klose3cef2a92012-03-14 23:39:33 +01008725 if ${ac_cv_search_sem_init+:} false; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008726 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00008727fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008728done
Matthias Klose3cef2a92012-03-14 23:39:33 +01008729if ${ac_cv_search_sem_init+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008730
Martin v. Löwiseba40652007-08-30 20:10:57 +00008731else
8732 ac_cv_search_sem_init=no
8733fi
8734rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008735LIBS=$ac_func_search_save_LIBS
8736fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008737{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
8738$as_echo "$ac_cv_search_sem_init" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008739ac_res=$ac_cv_search_sem_init
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008740if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008741 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008742
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008743fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00008744 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00008745 # posix4 on Solaris 2.6
8746 # pthread (first!) on Linux
8747fi
8748
Martin v. Löwis19d17342003-06-14 21:03:05 +00008749# check if we need libintl for locale functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
8751$as_echo_n "checking for textdomain in -lintl... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008752if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008753 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00008754else
8755 ac_check_lib_save_LIBS=$LIBS
8756LIBS="-lintl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008757cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008758/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008759
Martin v. Löwiseba40652007-08-30 20:10:57 +00008760/* Override any GCC internal prototype to avoid an error.
8761 Use char because int might match the return type of a GCC
8762 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008763#ifdef __cplusplus
8764extern "C"
8765#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00008766char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008767int
8768main ()
8769{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008770return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008771 ;
8772 return 0;
8773}
8774_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008775if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008776 ac_cv_lib_intl_textdomain=yes
8777else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008778 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00008779fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008780rm -f core conftest.err conftest.$ac_objext \
8781 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00008782LIBS=$ac_check_lib_save_LIBS
8783fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008784{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
8785$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008786if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008787
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008788$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00008789
8790fi
8791
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008792
8793# checks for system dependent C++ extensions support
8794case "$ac_sys_system" in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008795 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
8796$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
8797 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008798/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00008799
Georg Brandl94800df2011-02-25 11:09:02 +00008800 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008801int
8802main ()
8803{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008804loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00008805 ;
8806 return 0;
8807}
Matthias Klosec511b472010-05-08 11:01:39 +00008808
Martin v. Löwis11437992002-04-12 09:54:03 +00008809_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008810if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008811
Matthias Klosec511b472010-05-08 11:01:39 +00008812
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008813$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008814
Matthias Klosec511b472010-05-08 11:01:39 +00008815 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008816$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00008817
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008818else
Matthias Klosec511b472010-05-08 11:01:39 +00008819
8820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008821$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00008822
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008823fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008824rm -f core conftest.err conftest.$ac_objext \
8825 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008826 *) ;;
8827esac
8828
Guido van Rossum70c7f481998-03-26 18:44:10 +00008829# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008830# BeOS' sockets are stashed in libnet.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
8832$as_echo_n "checking for t_open in -lnsl... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008833if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008834 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008835else
Martin v. Löwis11437992002-04-12 09:54:03 +00008836 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008837LIBS="-lnsl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008838cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008839/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008840
Martin v. Löwiseba40652007-08-30 20:10:57 +00008841/* Override any GCC internal prototype to avoid an error.
8842 Use char because int might match the return type of a GCC
8843 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008844#ifdef __cplusplus
8845extern "C"
8846#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008847char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008848int
8849main ()
8850{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008851return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008852 ;
8853 return 0;
8854}
8855_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008856if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008857 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008858else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008859 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008860fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008861rm -f core conftest.err conftest.$ac_objext \
8862 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008863LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008864fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008865{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
8866$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008867if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008868 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008869fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00008870 # SVR4
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8872$as_echo_n "checking for socket in -lsocket... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008873if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008874 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008875else
Martin v. Löwis11437992002-04-12 09:54:03 +00008876 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008877LIBS="-lsocket $LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008878cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008879/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008880
Martin v. Löwiseba40652007-08-30 20:10:57 +00008881/* Override any GCC internal prototype to avoid an error.
8882 Use char because int might match the return type of a GCC
8883 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008884#ifdef __cplusplus
8885extern "C"
8886#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008887char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008888int
8889main ()
8890{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008891return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008892 ;
8893 return 0;
8894}
8895_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008896if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008897 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008898else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008899 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008900fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008901rm -f core conftest.err conftest.$ac_objext \
8902 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008903LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008904fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008905{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8906$as_echo "$ac_cv_lib_socket_socket" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008907if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00008908 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00008909fi
8910 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00008911
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +00008912case "$ac_sys_system" in
8913BeOS*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lnet" >&5
8915$as_echo_n "checking for socket in -lnet... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008916if ${ac_cv_lib_net_socket+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008917 $as_echo_n "(cached) " >&6
Guido van Rossumad678af1998-10-02 14:42:15 +00008918else
Martin v. Löwis11437992002-04-12 09:54:03 +00008919 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00008920LIBS="-lnet $LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008921cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008922/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008923
Martin v. Löwiseba40652007-08-30 20:10:57 +00008924/* Override any GCC internal prototype to avoid an error.
8925 Use char because int might match the return type of a GCC
8926 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008927#ifdef __cplusplus
8928extern "C"
8929#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008930char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008931int
8932main ()
8933{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008934return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008935 ;
8936 return 0;
8937}
8938_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008939if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008940 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +00008941else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008942 ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +00008943fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008944rm -f core conftest.err conftest.$ac_objext \
8945 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008946LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00008947fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008948{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_net_socket" >&5
8949$as_echo "$ac_cv_lib_net_socket" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008950if test "x$ac_cv_lib_net_socket" = xyes; then :
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008951 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008952fi
8953 # BeOS
8954;;
8955esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00008956
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
8958$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008959
Martin v. Löwiseba40652007-08-30 20:10:57 +00008960# Check whether --with-libs was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008961if test "${with_libs+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008962 withval=$with_libs;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008963{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8964$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00008965LIBS="$withval $LIBS"
8966
8967else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8969$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008970fi
8971
Guido van Rossum7f43da71994-08-01 12:15:30 +00008972
Benjamin Peterson64e8f6e2014-12-15 00:00:23 -05008973
8974
8975
8976
8977
8978
8979
8980if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
8981 if test -n "$ac_tool_prefix"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008982 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8983set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8985$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008986if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008987 $as_echo_n "(cached) " >&6
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008988else
8989 case $PKG_CONFIG in
8990 [\\/]* | ?:[\\/]*)
8991 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8992 ;;
8993 *)
8994 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8995for as_dir in $PATH
8996do
8997 IFS=$as_save_IFS
8998 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008999 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009000 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009001 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009002 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009003 break 2
9004 fi
9005done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009006 done
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009007IFS=$as_save_IFS
9008
9009 ;;
9010esac
9011fi
9012PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9013if test -n "$PKG_CONFIG"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9015$as_echo "$PKG_CONFIG" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009016else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9018$as_echo "no" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009019fi
9020
9021
9022fi
9023if test -z "$ac_cv_path_PKG_CONFIG"; then
9024 ac_pt_PKG_CONFIG=$PKG_CONFIG
9025 # Extract the first word of "pkg-config", so it can be a program name with args.
9026set dummy pkg-config; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9028$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009029if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009030 $as_echo_n "(cached) " >&6
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009031else
9032 case $ac_pt_PKG_CONFIG in
9033 [\\/]* | ?:[\\/]*)
9034 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9035 ;;
9036 *)
9037 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9038for as_dir in $PATH
9039do
9040 IFS=$as_save_IFS
9041 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009042 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009043 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009044 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009045 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009046 break 2
9047 fi
9048done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009049 done
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009050IFS=$as_save_IFS
9051
9052 ;;
9053esac
9054fi
9055ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9056if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9058$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009059else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9061$as_echo "no" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009062fi
9063
9064 if test "x$ac_pt_PKG_CONFIG" = x; then
9065 PKG_CONFIG=""
9066 else
9067 case $cross_compiling:$ac_tool_warned in
9068yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009069{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9070$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009071ac_tool_warned=yes ;;
9072esac
9073 PKG_CONFIG=$ac_pt_PKG_CONFIG
9074 fi
9075else
9076 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9077fi
9078
Benjamin Peterson64e8f6e2014-12-15 00:00:23 -05009079fi
9080if test -n "$PKG_CONFIG"; then
9081 _pkg_min_version=0.9.0
9082 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
9083$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
9084 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9086$as_echo "yes" >&6; }
9087 else
9088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9089$as_echo "no" >&6; }
9090 PKG_CONFIG=""
9091 fi
9092fi
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009093
9094# Check for use of the system expat library
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
9096$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009097
9098# Check whether --with-system_expat was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009099if test "${with_system_expat+set}" = set; then :
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009100 withval=$with_system_expat;
Benjamin Petersonf2d1b2a2010-10-31 16:53:53 +00009101else
9102 with_system_expat="no"
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009103fi
9104
9105
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009106{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
9107$as_echo "$with_system_expat" >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009108
9109# Check for use of the system libffi library
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
9111$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009112
9113# Check whether --with-system_ffi was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009114if test "${with_system_ffi+set}" = set; then :
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009115 withval=$with_system_ffi;
Benjamin Petersonf2d1b2a2010-10-31 16:53:53 +00009116else
9117 with_system_ffi="no"
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009118fi
9119
9120
9121if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009122 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
9123else
9124 LIBFFI_INCLUDEDIR=""
9125fi
9126
9127
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009128{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
9129$as_echo "$with_system_ffi" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +00009130
Ned Deilya2a9f572013-10-25 00:30:10 -07009131# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
9132
9133
9134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
9135$as_echo_n "checking for --with-tcltk-includes... " >&6; }
9136
9137# Check whether --with-tcltk-includes was given.
9138if test "${with_tcltk_includes+set}" = set; then :
9139 withval=$with_tcltk_includes;
9140else
9141 with_tcltk_includes="default"
9142fi
9143
9144{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
9145$as_echo "$with_tcltk_includes" >&6; }
9146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
9147$as_echo_n "checking for --with-tcltk-libs... " >&6; }
9148
9149# Check whether --with-tcltk-libs was given.
9150if test "${with_tcltk_libs+set}" = set; then :
9151 withval=$with_tcltk_libs;
9152else
9153 with_tcltk_libs="default"
9154fi
9155
9156{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
9157$as_echo "$with_tcltk_libs" >&6; }
9158if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
9159then
9160 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
9161 then
9162 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
9163 fi
9164 TCLTK_INCLUDES=""
9165 TCLTK_LIBS=""
9166else
9167 TCLTK_INCLUDES="$with_tcltk_includes"
9168 TCLTK_LIBS="$with_tcltk_libs"
9169fi
9170
Benjamin Peterson867475c2009-04-29 20:36:25 +00009171# Check for --with-dbmliborder
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
9173$as_echo_n "checking for --with-dbmliborder... " >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +00009174
9175# Check whether --with-dbmliborder was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009176if test "${with_dbmliborder+set}" = set; then :
Benjamin Peterson867475c2009-04-29 20:36:25 +00009177 withval=$with_dbmliborder;
9178if test x$with_dbmliborder = xyes
9179then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009180as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Benjamin Peterson867475c2009-04-29 20:36:25 +00009181else
9182 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
9183 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
9184 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009185 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Benjamin Peterson867475c2009-04-29 20:36:25 +00009186 fi
9187 done
9188fi
9189fi
9190
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009191{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
9192$as_echo "$with_dbmliborder" >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +00009193
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009194# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009195
9196
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
9198$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009199
Martin v. Löwiseba40652007-08-30 20:10:57 +00009200# Check whether --with-signal-module was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009201if test "${with_signal_module+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009202 withval=$with_signal_module;
9203fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009204
9205
9206if test -z "$with_signal_module"
9207then with_signal_module="yes"
9208fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009209{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
9210$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009211
9212if test "${with_signal_module}" = "yes"; then
9213 USE_SIGNAL_MODULE=""
9214 SIGNAL_OBJS=""
9215else
9216 USE_SIGNAL_MODULE="#"
9217 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9218fi
9219
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009220# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009221
Barry Warsawc0d24d82000-06-29 16:12:00 +00009222USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009223
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dec-threads" >&5
9225$as_echo_n "checking for --with-dec-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009226
Guido van Rossumec2f0731997-01-22 20:54:01 +00009227
Martin v. Löwiseba40652007-08-30 20:10:57 +00009228# Check whether --with-dec-threads was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009229if test "${with_dec_threads+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009230 withval=$with_dec_threads;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009231{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9232$as_echo "$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +00009233LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00009234if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00009235 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00009236fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009237else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9239$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009240fi
9241
Martin v. Löwis11437992002-04-12 09:54:03 +00009242
9243# Templates for things AC_DEFINEd more than once.
9244# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009245
9246
Martin v. Löwis11437992002-04-12 09:54:03 +00009247
9248
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
9250$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009251
Martin v. Löwiseba40652007-08-30 20:10:57 +00009252# Check whether --with-threads was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009253if test "${with_threads+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009254 withval=$with_threads;
9255fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009256
9257
Barry Warsawc0d24d82000-06-29 16:12:00 +00009258# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009259
Martin v. Löwiseba40652007-08-30 20:10:57 +00009260# Check whether --with-thread was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009261if test "${with_thread+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009262 withval=$with_thread; with_threads=$with_thread
9263fi
9264
Barry Warsawc0d24d82000-06-29 16:12:00 +00009265
9266if test -z "$with_threads"
9267then with_threads="yes"
9268fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009269{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
9270$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d82000-06-29 16:12:00 +00009271
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009272
Barry Warsawc0d24d82000-06-29 16:12:00 +00009273if test "$with_threads" = "no"
9274then
9275 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009276elif test "$ac_cv_pthread_is_default" = yes
9277then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009278 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009279
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009280 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009281 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009282
9283 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009284 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009285elif test "$ac_cv_kpthread" = "yes"
9286then
9287 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009288 if test "$ac_cv_cxx_thread" = "yes"; then
9289 CXX="$CXX -Kpthread"
9290 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009291 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009292
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009293 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009294 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009295elif test "$ac_cv_kthread" = "yes"
9296then
9297 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009298 if test "$ac_cv_cxx_thread" = "yes"; then
9299 CXX="$CXX -Kthread"
9300 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009301 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009302
9303 posix_threads=yes
9304 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009305elif test "$ac_cv_pthread" = "yes"
9306then
9307 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009308 if test "$ac_cv_cxx_thread" = "yes"; then
9309 CXX="$CXX -pthread"
9310 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009311 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009312
9313 posix_threads=yes
9314 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009315else
9316 if test ! -z "$with_threads" -a -d "$with_threads"
9317 then LDFLAGS="$LDFLAGS -L$with_threads"
9318 fi
9319 if test ! -z "$withval" -a -d "$withval"
9320 then LDFLAGS="$LDFLAGS -L$withval"
9321 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009322
9323 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00009324 # define _POSIX_THREADS in unistd.h. Some apparently don't
9325 # (e.g. gnu pth with pthread emulation)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009326 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
9327$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
9328 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009329/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009330
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009331#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009332#ifdef _POSIX_THREADS
9333yes
9334#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009335
9336_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009337if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009338 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009339 unistd_defines_pthreads=yes
9340else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009341 unistd_defines_pthreads=no
9342fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009343rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009344
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
9346$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009347
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009348 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009349
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009350 ac_fn_c_check_header_mongrel "$LINENO" "cthreads.h" "ac_cv_header_cthreads_h" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01009351if test "x$ac_cv_header_cthreads_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009352 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00009353
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009354 $as_echo "#define C_THREADS 1" >>confdefs.h
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009355
Martin v. Löwis11437992002-04-12 09:54:03 +00009356
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009357$as_echo "#define HURD_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009358
9359 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009360 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009361else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009362
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009363 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 +01009364if test "x$ac_cv_header_mach_cthreads_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009365 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00009366
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009367 $as_echo "#define C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009368
Martin v. Löwis11437992002-04-12 09:54:03 +00009369
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009370$as_echo "#define MACH_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009371
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009372 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009373else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009374
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009375 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pth" >&5
9376$as_echo_n "checking for --with-pth... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009377
Martin v. Löwiseba40652007-08-30 20:10:57 +00009378# Check whether --with-pth was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009379if test "${with_pth+set}" = set; then :
9380 withval=$with_pth; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9381$as_echo "$withval" >&6; }
9382 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009383
9384
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009385$as_echo "#define HAVE_PTH 1" >>confdefs.h
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009386
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009387 LIBS="-lpth $LIBS"
9388 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009389else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9391$as_echo "no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009392
9393 # Just looking for pthread_create in libpthread is not enough:
9394 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
9395 # So we really have to include pthread.h, and then link.
9396 _libs=$LIBS
9397 LIBS="$LIBS -lpthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009398 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
9399$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
9400 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009401/* end confdefs.h. */
Stefan Krahae66ca62012-11-22 22:36:57 +01009402
9403#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009404#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00009405
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009406void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00009407int
9408main ()
9409{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009410
9411pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00009412 ;
9413 return 0;
9414}
9415_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009416if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009417
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9419$as_echo "yes" >&6; }
9420 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00009421
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009422 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009423 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009424else
Martin v. Löwis11437992002-04-12 09:54:03 +00009425
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009426 LIBS=$_libs
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009427 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Matthias Klose3cef2a92012-03-14 23:39:33 +01009428if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009429 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00009430
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009431 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009432 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00009433else
Guido van Rossumad678af1998-10-02 14:42:15 +00009434
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009435 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 +01009436if test "x$ac_cv_header_atheos_threads_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009437 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009438
9439
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009440$as_echo "#define ATHEOS_THREADS 1" >>confdefs.h
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009441
9442 THREADOBJ="Python/thread.o"
9443else
9444
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009445 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 +01009446if test "x$ac_cv_header_kernel_OS_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009447 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009448
9449
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009450$as_echo "#define BEOS_THREADS 1" >>confdefs.h
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009451
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009452 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009453else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009454
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009455 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
9456$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009457if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009458 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009459else
Martin v. Löwis11437992002-04-12 09:54:03 +00009460 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009461LIBS="-lpthreads $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009462cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009463/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009464
Martin v. Löwiseba40652007-08-30 20:10:57 +00009465/* Override any GCC internal prototype to avoid an error.
9466 Use char because int might match the return type of a GCC
9467 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009468#ifdef __cplusplus
9469extern "C"
9470#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009471char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009472int
9473main ()
9474{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009475return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009476 ;
9477 return 0;
9478}
9479_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009480if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009481 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00009482else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009483 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00009484fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009485rm -f core conftest.err conftest.$ac_objext \
9486 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009487LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009488fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009489{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
9490$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009491if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009492 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00009493
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009494 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009495 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009496 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00009497else
Greg Steinadf63d62000-07-05 10:38:09 +00009498
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009499 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
9500$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009501if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009502 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00009503else
Martin v. Löwis11437992002-04-12 09:54:03 +00009504 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009505LIBS="-lc_r $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009506cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009507/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009508
Martin v. Löwiseba40652007-08-30 20:10:57 +00009509/* Override any GCC internal prototype to avoid an error.
9510 Use char because int might match the return type of a GCC
9511 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009512#ifdef __cplusplus
9513extern "C"
9514#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009515char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009516int
9517main ()
9518{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009519return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009520 ;
9521 return 0;
9522}
9523_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009524if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009525 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00009526else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009527 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00009528fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009529rm -f core conftest.err conftest.$ac_objext \
9530 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009531LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00009532fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009533{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
9534$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009535if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009536 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00009537
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009538 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009539 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009540 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009541else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009542
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009543 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
9544$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009545if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009546 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009547else
Martin v. Löwis11437992002-04-12 09:54:03 +00009548 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009549LIBS="-lpthread $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009550cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009551/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009552
Martin v. Löwiseba40652007-08-30 20:10:57 +00009553/* Override any GCC internal prototype to avoid an error.
9554 Use char because int might match the return type of a GCC
9555 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009556#ifdef __cplusplus
9557extern "C"
9558#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009559char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009560int
9561main ()
9562{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009563return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009564 ;
9565 return 0;
9566}
9567_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009568if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009569 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009570else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009571 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009572fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009573rm -f core conftest.err conftest.$ac_objext \
9574 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009575LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009576fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009577{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
9578$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009579if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009580 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009581
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009582 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009583 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009584 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009585else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009586
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009587 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
9588$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009589if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009590 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00009591else
Martin v. Löwis11437992002-04-12 09:54:03 +00009592 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009593LIBS="-lcma $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009594cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009595/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009596
Martin v. Löwiseba40652007-08-30 20:10:57 +00009597/* Override any GCC internal prototype to avoid an error.
9598 Use char because int might match the return type of a GCC
9599 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009600#ifdef __cplusplus
9601extern "C"
9602#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009603char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009604int
9605main ()
9606{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009607return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009608 ;
9609 return 0;
9610}
9611_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009612if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009613 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00009614else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009615 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00009616fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009617rm -f core conftest.err conftest.$ac_objext \
9618 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009619LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009620fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009621{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
9622$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009623if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009624 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00009625
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009626 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009627 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009628 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00009629else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00009630
Martin v. Löwis130fb172001-07-19 11:00:41 +00009631 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00009632fi
9633
Guido van Rossum627b2d71993-12-24 10:39:16 +00009634
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009635fi
9636
Guido van Rossum0be3e491997-05-22 20:33:33 +00009637fi
9638
Guido van Rossum49545951997-12-02 19:28:29 +00009639fi
9640
Guido van Rossumb93a8621998-05-07 13:27:32 +00009641fi
9642
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009643
Michael W. Hudson54241132001-12-07 15:38:26 +00009644fi
9645
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009646
9647fi
9648
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009649fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009650rm -f core conftest.err conftest.$ac_objext \
9651 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009652fi
9653
Martin v. Löwis11437992002-04-12 09:54:03 +00009654fi
9655
9656
9657fi
9658
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009659
Michael W. Hudson54241132001-12-07 15:38:26 +00009660
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009661 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
9662$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009663if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009664 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009665else
Martin v. Löwis11437992002-04-12 09:54:03 +00009666 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009667LIBS="-lmpc $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009668cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009669/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009670
Martin v. Löwiseba40652007-08-30 20:10:57 +00009671/* Override any GCC internal prototype to avoid an error.
9672 Use char because int might match the return type of a GCC
9673 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009674#ifdef __cplusplus
9675extern "C"
9676#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009677char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009678int
9679main ()
9680{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009681return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009682 ;
9683 return 0;
9684}
9685_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009686if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009687 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009688else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009689 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009690fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009691rm -f core conftest.err conftest.$ac_objext \
9692 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009693LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009694fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009695{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
9696$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009697if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009698 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009699
Martin v. Löwis130fb172001-07-19 11:00:41 +00009700 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009701 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009702 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009703fi
9704
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009705
Neal Norwitza978ab02002-11-02 16:58:05 +00009706 if test "$posix_threads" != "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009707 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
9708$as_echo_n "checking for thr_create in -lthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009709if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009710 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009711else
Martin v. Löwis11437992002-04-12 09:54:03 +00009712 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009713LIBS="-lthread $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009714cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009715/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009716
Martin v. Löwiseba40652007-08-30 20:10:57 +00009717/* Override any GCC internal prototype to avoid an error.
9718 Use char because int might match the return type of a GCC
9719 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009720#ifdef __cplusplus
9721extern "C"
9722#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009723char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009724int
9725main ()
9726{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009727return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009728 ;
9729 return 0;
9730}
9731_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009732if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009733 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009734else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009735 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009736fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009737rm -f core conftest.err conftest.$ac_objext \
9738 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009739LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009740fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009741{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
9742$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009743if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009744 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009745
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009746 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009747 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009748 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009749fi
9750
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009751 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009752
Martin v. Löwis130fb172001-07-19 11:00:41 +00009753 if test "$USE_THREAD_MODULE" != "#"
9754 then
9755 # If the above checks didn't disable threads, (at least) OSF1
9756 # needs this '-threads' argument during linking.
9757 case $ac_sys_system in
9758 OSF1) LDLAST=-threads;;
9759 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00009760 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009761fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009762
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009763if test "$posix_threads" = "yes"; then
9764 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009765
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009766$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009767
9768 fi
9769
9770 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
9771 case $ac_sys_system/$ac_sys_release in
Charles-François Natali4929eb92011-07-21 19:41:04 +02009772 SunOS/5.6)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009773$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009774
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009775 ;;
9776 SunOS/5.8)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009777$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009778
9779 ;;
Charles-François Natali4929eb92011-07-21 19:41:04 +02009780 AIX/*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009781$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimescba36bb2008-01-30 22:54:18 +00009782
9783 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009784 esac
9785
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009786 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
9787$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009788 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009789 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009790else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009791 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009792 ac_cv_pthread_system_supported=no
9793else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009794 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009795/* end confdefs.h. */
Stefan Krahae66ca62012-11-22 22:36:57 +01009796
9797 #include <stdio.h>
9798 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009799 void *foo(void *parm) {
9800 return NULL;
9801 }
9802 main() {
9803 pthread_attr_t attr;
9804 pthread_t id;
9805 if (pthread_attr_init(&attr)) exit(-1);
9806 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
9807 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
9808 exit(0);
9809 }
9810_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009811if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009812 ac_cv_pthread_system_supported=yes
9813else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009814 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009815fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009816rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9817 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009818fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009819
Martin v. Löwiseba40652007-08-30 20:10:57 +00009820
Guido van Rossum627b2d71993-12-24 10:39:16 +00009821fi
9822
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009823 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
9824$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009825 if test "$ac_cv_pthread_system_supported" = "yes"; then
9826
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009827$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009828
9829 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009830 for ac_func in pthread_sigmask
9831do :
9832 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Matthias Klose3cef2a92012-03-14 23:39:33 +01009833if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009834 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009835#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009836_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00009837 case $ac_sys_system in
9838 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009839
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009840$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00009841
9842 ;;
9843 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009844fi
9845done
9846
Christian Heimes0d604cf2013-08-21 13:26:05 +02009847 for ac_func in pthread_atfork
9848do :
9849 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
9850if test "x$ac_cv_func_pthread_atfork" = xyes; then :
9851 cat >>confdefs.h <<_ACEOF
9852#define HAVE_PTHREAD_ATFORK 1
9853_ACEOF
9854
9855fi
9856done
9857
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009858fi
9859
9860
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009861# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00009862
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
9864$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009865# Check whether --enable-ipv6 was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009866if test "${enable_ipv6+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009867 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009868 no)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9870$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009871 ipv6=no
9872 ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009873 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9874$as_echo "yes" >&6; }
9875 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009876
9877 ipv6=yes
9878 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009879 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009880else
Martin v. Löwis11437992002-04-12 09:54:03 +00009881
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009882 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009883/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009884 /* AF_INET6 available check */
9885#include <sys/types.h>
9886#include <sys/socket.h>
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009887int
9888main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009889{
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009890int domain = AF_INET6;
9891 ;
9892 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009893}
Martin v. Löwis11437992002-04-12 09:54:03 +00009894_ACEOF
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009895if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +00009896
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9898$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009899 ipv6=yes
Matthias Klosec511b472010-05-08 11:01:39 +00009900
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009901else
Matthias Klosec511b472010-05-08 11:01:39 +00009902
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9904$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009905 ipv6=no
Matthias Klosec511b472010-05-08 11:01:39 +00009906
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009907fi
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009908rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009909
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009910if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009911 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
9912$as_echo_n "checking if RFC2553 API is available... " >&6; }
9913 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009914/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00009915
9916 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009917#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009918int
9919main ()
9920{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009921struct sockaddr_in6 x;
Matthias Klosec511b472010-05-08 11:01:39 +00009922 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00009923 ;
9924 return 0;
9925}
Matthias Klosec511b472010-05-08 11:01:39 +00009926
Martin v. Löwis11437992002-04-12 09:54:03 +00009927_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009928if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +00009929
9930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009931$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00009932 ipv6=yes
9933
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009934else
Matthias Klosec511b472010-05-08 11:01:39 +00009935
9936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009937$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00009938 ipv6=no
9939
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009940fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009941rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009942fi
9943
9944if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009945 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009946
9947fi
9948
Martin v. Löwiseba40652007-08-30 20:10:57 +00009949fi
9950
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009951
9952ipv6type=unknown
9953ipv6lib=none
9954ipv6trylibc=no
9955
9956if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009957 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
9958$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00009959 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
9960 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009961 case $i in
9962 inria)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009963 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009964/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009965
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009966#include <netinet/in.h>
9967#ifdef IPV6_INRIA_VERSION
9968yes
9969#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009970_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009971if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009972 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009973 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009974fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009975rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009976
9977 ;;
9978 kame)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009979 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009980/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009981
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009982#include <netinet/in.h>
9983#ifdef __KAME__
9984yes
9985#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009986_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009987if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009988 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009989 ipv6type=$i;
9990 ipv6lib=inet6
9991 ipv6libdir=/usr/local/v6/lib
9992 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009993fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009994rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009995
9996 ;;
9997 linux-glibc)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009998 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009999/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010000
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010001#include <features.h>
10002#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10003yes
10004#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010005_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010006if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010007 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010008 ipv6type=$i;
10009 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010010fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000010011rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010012
10013 ;;
10014 linux-inet6)
10015 if test -d /usr/inet6; then
10016 ipv6type=$i
10017 ipv6lib=inet6
10018 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010019 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010020 fi
10021 ;;
10022 solaris)
10023 if test -f /etc/netconfig; then
Antoine Pitrou31e85952011-01-03 18:57:14 +000010024 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010025 ipv6type=$i
10026 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010027 fi
10028 fi
10029 ;;
10030 toshiba)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010031 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010032/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010033
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010034#include <sys/param.h>
10035#ifdef _TOSHIBA_INET6
10036yes
10037#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010038_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010039if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010040 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010041 ipv6type=$i;
10042 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010043 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010044fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000010045rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010046
10047 ;;
10048 v6d)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010049 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010050/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010051
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010052#include </usr/local/v6/include/sys/v6config.h>
10053#ifdef __V6D__
10054yes
10055#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010056_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010057if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010058 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010059 ipv6type=$i;
10060 ipv6lib=v6;
10061 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010062 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010063fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000010064rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010065
10066 ;;
10067 zeta)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010068 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010069/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010070
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010071#include <sys/param.h>
10072#ifdef _ZETA_MINAMI_INET6
10073yes
10074#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010075_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010076if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010077 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010078 ipv6type=$i;
10079 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010080 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010081fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000010082rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010083
10084 ;;
10085 esac
10086 if test "$ipv6type" != "unknown"; then
10087 break
10088 fi
10089 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10091$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010092fi
10093
10094if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10095 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10096 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10097 echo "using lib$ipv6lib"
10098 else
10099 if test $ipv6trylibc = "yes"; then
10100 echo "using libc"
10101 else
10102 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10103 echo "You need to fetch lib$ipv6lib.a from appropriate"
10104 echo 'ipv6 kit and compile beforehand.'
10105 exit 1
10106 fi
10107 fi
10108fi
10109
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
10111$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
10112cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010113/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +000010114
10115 #include <Carbon/Carbon.h>
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010116int
10117main ()
10118{
10119FSIORefNum fRef = 0
10120 ;
10121 return 0;
10122}
Mark Dickinson0712b562010-05-08 19:13:21 +000010123
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010124_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010125if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +000010126
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010127
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010128$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010129
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10131$as_echo "yes" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010132
Mark Dickinson0712b562010-05-08 19:13:21 +000010133else
10134
10135 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10136$as_echo "no" >&6; }
10137
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010138fi
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010139rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10140
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010141# Check for --with-doc-strings
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10143$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010144
Martin v. Löwiseba40652007-08-30 20:10:57 +000010145# Check whether --with-doc-strings was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010146if test "${with_doc_strings+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000010147 withval=$with_doc_strings;
10148fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010149
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010150
10151if test -z "$with_doc_strings"
10152then with_doc_strings="yes"
10153fi
10154if test "$with_doc_strings" != "no"
10155then
10156
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010157$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010158
10159fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010160{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10161$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010162
Neil Schemenauera35c6882001-02-27 04:45:05 +000010163# Check for Python-specific malloc support
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
10165$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010166
Martin v. Löwiseba40652007-08-30 20:10:57 +000010167# Check whether --with-tsc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010168if test "${with_tsc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000010169 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010170if test "$withval" != no
10171then
10172
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010173$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010174
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10176$as_echo "yes" >&6; }
10177else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10178$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010179fi
10180else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010181 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10182$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010183fi
10184
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010185
10186# Check for Python-specific malloc support
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10188$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010189
Martin v. Löwiseba40652007-08-30 20:10:57 +000010190# Check whether --with-pymalloc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010191if test "${with_pymalloc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000010192 withval=$with_pymalloc;
10193fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010194
Neil Schemenauera35c6882001-02-27 04:45:05 +000010195
Neil Schemenauer16c22972002-03-22 15:34:49 +000010196if test -z "$with_pymalloc"
10197then with_pymalloc="yes"
10198fi
10199if test "$with_pymalloc" != "no"
10200then
Martin v. Löwis11437992002-04-12 09:54:03 +000010201
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010202$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000010203
10204fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010205{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
10206$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000010207
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010208# Check for Valgrind support
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
10210$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010211
10212# Check whether --with-valgrind was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010213if test "${with_valgrind+set}" = set; then :
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010214 withval=$with_valgrind;
10215else
10216 with_valgrind=no
10217fi
10218
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010219{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
10220$as_echo "$with_valgrind" >&6; }
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010221if test "$with_valgrind" != no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010222 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 +010010223if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010224
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010225$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010226
10227else
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010228 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010229
10230fi
10231
10232
10233fi
10234
Barry Warsawef82cd72000-06-30 16:21:01 +000010235# Check for --with-wctype-functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-wctype-functions" >&5
10237$as_echo_n "checking for --with-wctype-functions... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010238
Martin v. Löwiseba40652007-08-30 20:10:57 +000010239# Check whether --with-wctype-functions was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010240if test "${with_wctype_functions+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000010241 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000010242if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000010243then
10244
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010245$as_echo "#define WANT_WCTYPE_FUNCTIONS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010246
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10248$as_echo "yes" >&6; }
10249else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10250$as_echo "no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000010251fi
10252else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010253 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10254$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010255fi
10256
Barry Warsawef82cd72000-06-30 16:21:01 +000010257
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010258# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000010259
Guido van Rossum98935bf2001-09-05 19:13:16 +000010260DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000010261
Guido van Rossume97ee181999-12-20 21:27:22 +000010262# the dlopen() function means we might want to use dynload_shlib.o. some
10263# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000010264for ac_func in dlopen
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010265do :
10266 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010267if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010268 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010269#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010270_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000010271
Guido van Rossume97ee181999-12-20 21:27:22 +000010272fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010273done
Guido van Rossume97ee181999-12-20 21:27:22 +000010274
Michael W. Hudson54241132001-12-07 15:38:26 +000010275
Guido van Rossume97ee181999-12-20 21:27:22 +000010276# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
10277# loading of modules.
10278
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
10280$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010281if test -z "$DYNLOADFILE"
10282then
10283 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000010284 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
10285 if test "$ac_cv_func_dlopen" = yes
10286 then DYNLOADFILE="dynload_shlib.o"
10287 else DYNLOADFILE="dynload_aix.o"
10288 fi
10289 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000010290 BeOS*) DYNLOADFILE="dynload_beos.o";;
10291 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Anthony Baxter82201742006-04-09 15:07:40 +000010292 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
10293 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010294 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000010295 *)
10296 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
10297 # out any dynamic loading
10298 if test "$ac_cv_func_dlopen" = yes
10299 then DYNLOADFILE="dynload_shlib.o"
10300 else DYNLOADFILE="dynload_stub.o"
10301 fi
10302 ;;
10303 esac
10304fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010305{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
10306$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010307if test "$DYNLOADFILE" != "dynload_stub.o"
10308then
Martin v. Löwis11437992002-04-12 09:54:03 +000010309
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010310$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000010311
10312fi
10313
Neil Schemenauer4e425612001-06-19 15:44:15 +000010314# MACHDEP_OBJS can be set to platform-specific object files needed by Python
10315
Michael W. Hudson54241132001-12-07 15:38:26 +000010316
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
10318$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010319if test -z "$MACHDEP_OBJS"
10320then
Jack Jansene578a632001-08-15 01:27:14 +000010321 MACHDEP_OBJS=$extra_machdep_objs
10322else
10323 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000010324fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010325{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
10326$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010327
Guido van Rossum627b2d71993-12-24 10:39:16 +000010328# checks for library functions
Martin v. Löwisaef18b12008-03-24 13:31:16 +000010329for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
10330 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
doko@ubuntu.coma50b0de2015-04-13 21:55:59 +020010331 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
10332 getentropy \
Martin v. Löwis50ea4562009-11-27 13:56:01 +000010333 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Benjamin Petersond16e01c2014-02-04 10:20:26 -050010334 initgroups kill killpg lchmod lchown lstat mkfifo mknod mktime mmap \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000010335 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000010336 putenv readlink realpath \
Jesse Noller355b1262009-04-02 00:03:28 +000010337 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
10338 setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000010339 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Martin v. Löwis50ea4562009-11-27 13:56:01 +000010340 setlocale setregid setreuid setresuid setresgid \
10341 setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +000010342 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000010343 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Neal Norwitz05a45592006-03-20 06:30:08 +000010344 truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010345do :
10346 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10347ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010348if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010349 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010350#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010351_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010352
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010353fi
10354done
10355
Michael W. Hudson54241132001-12-07 15:38:26 +000010356
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010357# For some functions, having a definition is not sufficient, since
10358# we want to take their address.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
10360$as_echo_n "checking for chroot... " >&6; }
10361cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010362/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010363#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010364int
10365main ()
10366{
10367void *x=chroot
10368 ;
10369 return 0;
10370}
10371_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010372if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010373
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010374$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010375
Matthias Klosec511b472010-05-08 11:01:39 +000010376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010377$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010378else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10380$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010381
10382fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010383rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
10385$as_echo_n "checking for link... " >&6; }
10386cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010387/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010388#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010389int
10390main ()
10391{
10392void *x=link
10393 ;
10394 return 0;
10395}
10396_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010397if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010398
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010399$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010400
Matthias Klosec511b472010-05-08 11:01:39 +000010401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010402$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010403else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10405$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010406
10407fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010408rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
10410$as_echo_n "checking for symlink... " >&6; }
10411cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010412/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010413#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010414int
10415main ()
10416{
10417void *x=symlink
10418 ;
10419 return 0;
10420}
10421_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010422if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010423
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010424$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010425
Matthias Klosec511b472010-05-08 11:01:39 +000010426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010427$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010428else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10430$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010431
10432fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010433rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
10435$as_echo_n "checking for fchdir... " >&6; }
10436cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010437/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010438#include <unistd.h>
10439int
10440main ()
10441{
10442void *x=fchdir
10443 ;
10444 return 0;
10445}
10446_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010447if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010448
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010449$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010450
Matthias Klosec511b472010-05-08 11:01:39 +000010451 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010452$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010453else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010454 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10455$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010456
10457fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010458rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
10460$as_echo_n "checking for fsync... " >&6; }
10461cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010462/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010463#include <unistd.h>
10464int
10465main ()
10466{
10467void *x=fsync
10468 ;
10469 return 0;
10470}
10471_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010472if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010473
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010474$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010475
Matthias Klosec511b472010-05-08 11:01:39 +000010476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010477$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010478else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10480$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010481
10482fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010483rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010484{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
10485$as_echo_n "checking for fdatasync... " >&6; }
10486cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010487/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010488#include <unistd.h>
10489int
10490main ()
10491{
10492void *x=fdatasync
10493 ;
10494 return 0;
10495}
10496_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010497if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010498
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010499$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010500
Matthias Klosec511b472010-05-08 11:01:39 +000010501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010502$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010503else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10505$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010506
10507fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010508rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
10510$as_echo_n "checking for epoll... " >&6; }
10511cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010512/* end confdefs.h. */
10513#include <sys/epoll.h>
10514int
10515main ()
10516{
10517void *x=epoll_create
10518 ;
10519 return 0;
10520}
10521_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010522if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010523
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010524$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010525
Matthias Klosec511b472010-05-08 11:01:39 +000010526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010527$as_echo "yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010528else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10530$as_echo "no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010531
10532fi
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010533rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
10535$as_echo_n "checking for kqueue... " >&6; }
10536cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010537/* end confdefs.h. */
10538
10539#include <sys/types.h>
10540#include <sys/event.h>
10541
10542int
10543main ()
10544{
10545int x=kqueue()
10546 ;
10547 return 0;
10548}
10549_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010550if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010551
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010552$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010553
Matthias Klosec511b472010-05-08 11:01:39 +000010554 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010555$as_echo "yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010556else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10558$as_echo "no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010559
10560fi
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010561rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010562# On some systems (eg. FreeBSD 5), we would find a definition of the
10563# functions ctermid_r, setgroups in the library, but no prototype
10564# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
10565# address to avoid compiler warnings and potential miscompilations
10566# because of the missing prototypes.
10567
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
10569$as_echo_n "checking for ctermid_r... " >&6; }
10570cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010571/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010572
Martin v. Löwisd5843682002-11-21 20:41:28 +000010573#include <stdio.h>
10574
Martin v. Löwisd5843682002-11-21 20:41:28 +000010575int
10576main ()
10577{
10578void* p = ctermid_r
10579 ;
10580 return 0;
10581}
10582_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010583if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010584
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010585$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010586
Matthias Klosec511b472010-05-08 11:01:39 +000010587 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010588$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010589else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010590 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10591$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010592
10593fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010594rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10595
Antoine Pitroub170f172010-09-10 18:47:36 +000010596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
10597$as_echo_n "checking for flock declaration... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010598if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010599 $as_echo_n "(cached) " >&6
10600else
10601 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010602/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010603#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010604int
10605main ()
10606{
10607void* p = flock
Antoine Pitroub170f172010-09-10 18:47:36 +000010608
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010609 ;
10610 return 0;
10611}
10612_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010613if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010614 ac_cv_flock_decl=yes
10615else
10616 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010617
10618fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010619rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitrou85729812010-09-07 14:55:24 +000010620
Antoine Pitroub170f172010-09-10 18:47:36 +000010621fi
10622{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
10623$as_echo "$ac_cv_flock_decl" >&6; }
10624if test "x${ac_cv_flock_decl}" = xyes; then
10625 for ac_func in flock
10626do :
10627 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010628if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010629 cat >>confdefs.h <<_ACEOF
10630#define HAVE_FLOCK 1
Antoine Pitrou85729812010-09-07 14:55:24 +000010631_ACEOF
Antoine Pitroub170f172010-09-10 18:47:36 +000010632
Antoine Pitrou85729812010-09-07 14:55:24 +000010633else
Antoine Pitroub170f172010-09-10 18:47:36 +000010634 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitrou85729812010-09-07 14:55:24 +000010635$as_echo_n "checking for flock in -lbsd... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010636if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitrou85729812010-09-07 14:55:24 +000010637 $as_echo_n "(cached) " >&6
10638else
10639 ac_check_lib_save_LIBS=$LIBS
10640LIBS="-lbsd $LIBS"
10641cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10642/* end confdefs.h. */
10643
10644/* Override any GCC internal prototype to avoid an error.
10645 Use char because int might match the return type of a GCC
10646 builtin and then its argument prototype would still apply. */
10647#ifdef __cplusplus
10648extern "C"
10649#endif
10650char flock ();
10651int
10652main ()
10653{
10654return flock ();
10655 ;
10656 return 0;
10657}
10658_ACEOF
10659if ac_fn_c_try_link "$LINENO"; then :
10660 ac_cv_lib_bsd_flock=yes
10661else
10662 ac_cv_lib_bsd_flock=no
10663fi
10664rm -f core conftest.err conftest.$ac_objext \
10665 conftest$ac_exeext conftest.$ac_ext
10666LIBS=$ac_check_lib_save_LIBS
10667fi
10668{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
10669$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010670if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010671 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitrou85729812010-09-07 14:55:24 +000010672
10673
10674$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
10675
10676
10677fi
10678
10679
10680fi
Antoine Pitroub170f172010-09-10 18:47:36 +000010681done
10682
Antoine Pitrou85729812010-09-07 14:55:24 +000010683fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010684
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
10686$as_echo_n "checking for getpagesize... " >&6; }
10687cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010688/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010689
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010690#include <unistd.h>
10691
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010692int
10693main ()
10694{
10695void* p = getpagesize
10696 ;
10697 return 0;
10698}
10699_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010700if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010701
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010702$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010703
Matthias Klosec511b472010-05-08 11:01:39 +000010704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010705$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010706else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10708$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010709
10710fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010711rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010712
Charles-François Natali93a11752011-11-27 13:01:35 +010010713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
10714$as_echo_n "checking for broken unsetenv... " >&6; }
10715cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10716/* end confdefs.h. */
10717
10718#include <stdlib.h>
10719
10720int
10721main ()
10722{
10723int res = unsetenv("DUMMY")
10724 ;
10725 return 0;
10726}
10727_ACEOF
10728if ac_fn_c_try_compile "$LINENO"; then :
10729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10730$as_echo "no" >&6; }
10731else
10732
10733$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
10734
10735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10736$as_echo "yes" >&6; }
10737
10738fi
10739rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10740
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010741for ac_prog in true
10742do
10743 # Extract the first word of "$ac_prog", so it can be a program name with args.
10744set dummy $ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10746$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010747if ${ac_cv_prog_TRUE+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010748 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010749else
10750 if test -n "$TRUE"; then
10751 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
10752else
10753as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10754for as_dir in $PATH
10755do
10756 IFS=$as_save_IFS
10757 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010758 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +010010759 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010760 ac_cv_prog_TRUE="$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010761 $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 +000010762 break 2
10763 fi
10764done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010765 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000010766IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010767
10768fi
10769fi
10770TRUE=$ac_cv_prog_TRUE
10771if test -n "$TRUE"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
10773$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010774else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10776$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010777fi
10778
Martin v. Löwiseba40652007-08-30 20:10:57 +000010779
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010780 test -n "$TRUE" && break
10781done
10782test -n "$TRUE" || TRUE="/bin/true"
10783
10784
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
10786$as_echo_n "checking for inet_aton in -lc... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010787if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010788 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010789else
10790 ac_check_lib_save_LIBS=$LIBS
10791LIBS="-lc $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010792cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010793/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010794
Martin v. Löwiseba40652007-08-30 20:10:57 +000010795/* Override any GCC internal prototype to avoid an error.
10796 Use char because int might match the return type of a GCC
10797 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010798#ifdef __cplusplus
10799extern "C"
10800#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010801char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010802int
10803main ()
10804{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010805return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010806 ;
10807 return 0;
10808}
10809_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010810if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010811 ac_cv_lib_c_inet_aton=yes
10812else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010813 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010814fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010815rm -f core conftest.err conftest.$ac_objext \
10816 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010817LIBS=$ac_check_lib_save_LIBS
10818fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010819{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
10820$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010821if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010822 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010823else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010824 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
10825$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010826if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010827 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010828else
10829 ac_check_lib_save_LIBS=$LIBS
10830LIBS="-lresolv $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010831cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010832/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010833
Martin v. Löwiseba40652007-08-30 20:10:57 +000010834/* Override any GCC internal prototype to avoid an error.
10835 Use char because int might match the return type of a GCC
10836 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010837#ifdef __cplusplus
10838extern "C"
10839#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010840char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010841int
10842main ()
10843{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010844return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010845 ;
10846 return 0;
10847}
10848_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010849if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010850 ac_cv_lib_resolv_inet_aton=yes
10851else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010852 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010853fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010854rm -f core conftest.err conftest.$ac_objext \
10855 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010856LIBS=$ac_check_lib_save_LIBS
10857fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010858{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
10859$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010860if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010861 cat >>confdefs.h <<_ACEOF
10862#define HAVE_LIBRESOLV 1
10863_ACEOF
10864
10865 LIBS="-lresolv $LIBS"
10866
10867fi
10868
10869
10870fi
10871
10872
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010873# On Tru64, chflags seems to be present, but calling it will
10874# exit Python
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
10876$as_echo_n "checking for chflags... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010877if ${ac_cv_have_chflags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010878 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010879else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010880 if test "$cross_compiling" = yes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010881 ac_cv_have_chflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010882else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010883 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010884/* end confdefs.h. */
Ned Deily43e10542011-06-27 23:41:53 -070010885
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010886#include <sys/stat.h>
10887#include <unistd.h>
10888int main(int argc, char*argv[])
10889{
10890 if(chflags(argv[0], 0) != 0)
10891 return 1;
10892 return 0;
10893}
Ned Deily43e10542011-06-27 23:41:53 -070010894
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010895_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010896if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010897 ac_cv_have_chflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010898else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010899 ac_cv_have_chflags=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010900fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010901rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10902 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000010903fi
10904
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010905
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010906fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010907{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
10908$as_echo "$ac_cv_have_chflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000010909if test "$ac_cv_have_chflags" = cross ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010910 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010911if test "x$ac_cv_func_chflags" = xyes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010912 ac_cv_have_chflags="yes"
10913else
10914 ac_cv_have_chflags="no"
10915fi
10916
10917fi
10918if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010919
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010920$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010921
10922fi
10923
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
10925$as_echo_n "checking for lchflags... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010926if ${ac_cv_have_lchflags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010927 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010928else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010929 if test "$cross_compiling" = yes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010930 ac_cv_have_lchflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010931else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010932 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010933/* end confdefs.h. */
Ned Deily43e10542011-06-27 23:41:53 -070010934
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010935#include <sys/stat.h>
10936#include <unistd.h>
10937int main(int argc, char*argv[])
10938{
10939 if(lchflags(argv[0], 0) != 0)
10940 return 1;
10941 return 0;
10942}
Ned Deily43e10542011-06-27 23:41:53 -070010943
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010944_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010945if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010946 ac_cv_have_lchflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010947else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010948 ac_cv_have_lchflags=no
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010949fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010950rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10951 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010952fi
10953
10954
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010955fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010956{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
10957$as_echo "$ac_cv_have_lchflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000010958if test "$ac_cv_have_lchflags" = cross ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010959 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010960if test "x$ac_cv_func_lchflags" = xyes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010961 ac_cv_have_lchflags="yes"
10962else
10963 ac_cv_have_lchflags="no"
10964fi
10965
10966fi
10967if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010968
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010969$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010970
10971fi
10972
Ronald Oussorenf8752642006-07-06 10:13:35 +000010973case $ac_sys_system/$ac_sys_release in
10974Darwin/*)
10975 _CUR_CFLAGS="${CFLAGS}"
10976 _CUR_LDFLAGS="${LDFLAGS}"
10977 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
10978 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
10979 ;;
10980esac
10981
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
10983$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010984if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010985 $as_echo_n "(cached) " >&6
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010986else
10987 ac_check_lib_save_LIBS=$LIBS
10988LIBS="-lz $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010989cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010990/* end confdefs.h. */
10991
Martin v. Löwiseba40652007-08-30 20:10:57 +000010992/* Override any GCC internal prototype to avoid an error.
10993 Use char because int might match the return type of a GCC
10994 builtin and then its argument prototype would still apply. */
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010995#ifdef __cplusplus
10996extern "C"
10997#endif
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010998char inflateCopy ();
10999int
11000main ()
11001{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011002return inflateCopy ();
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011003 ;
11004 return 0;
11005}
11006_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011007if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011008 ac_cv_lib_z_inflateCopy=yes
11009else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011010 ac_cv_lib_z_inflateCopy=no
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011011fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011012rm -f core conftest.err conftest.$ac_objext \
11013 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011014LIBS=$ac_check_lib_save_LIBS
11015fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011016{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
11017$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011018if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011019
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011020$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011021
11022fi
11023
11024
Ronald Oussorenf8752642006-07-06 10:13:35 +000011025case $ac_sys_system/$ac_sys_release in
11026Darwin/*)
11027 CFLAGS="${_CUR_CFLAGS}"
11028 LDFLAGS="${_CUR_LDFLAGS}"
11029 ;;
11030esac
11031
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
11033$as_echo_n "checking for hstrerror... " >&6; }
11034cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011035/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011036
Martin v. Löwise9416172003-05-03 10:12:45 +000011037#include <netdb.h>
11038
Martin v. Löwise9416172003-05-03 10:12:45 +000011039int
11040main ()
11041{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011042void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011043 ;
11044 return 0;
11045}
11046_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011047if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011048
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011049$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011050
Matthias Klosec511b472010-05-08 11:01:39 +000011051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011052$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011053else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11055$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011056
11057fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011058rm -f core conftest.err conftest.$ac_objext \
11059 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011060
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
11062$as_echo_n "checking for inet_aton... " >&6; }
11063cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011064/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011065
Martin v. Löwis86d66262006-02-17 08:40:11 +000011066#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011067#include <sys/socket.h>
11068#include <netinet/in.h>
11069#include <arpa/inet.h>
11070
Martin v. Löwise9416172003-05-03 10:12:45 +000011071int
11072main ()
11073{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011074void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011075 ;
11076 return 0;
11077}
11078_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011079if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011080
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011081$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011082
Matthias Klosec511b472010-05-08 11:01:39 +000011083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011084$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011085else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11087$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011088
11089fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011090rm -f core conftest.err conftest.$ac_objext \
11091 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011092
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
11094$as_echo_n "checking for inet_pton... " >&6; }
11095cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011096/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011097
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011098#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011099#include <sys/socket.h>
11100#include <netinet/in.h>
11101#include <arpa/inet.h>
11102
Martin v. Löwise9416172003-05-03 10:12:45 +000011103int
11104main ()
11105{
11106void* p = inet_pton
11107 ;
11108 return 0;
11109}
11110_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011111if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011112
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011113$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011114
Matthias Klosec511b472010-05-08 11:01:39 +000011115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011116$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011117else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11119$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011120
11121fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011122rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000011123
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011124# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
11126$as_echo_n "checking for setgroups... " >&6; }
11127cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011128/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011129
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011130#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011131#ifdef HAVE_GRP_H
11132#include <grp.h>
11133#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000011134
Martin v. Löwisd5843682002-11-21 20:41:28 +000011135int
11136main ()
11137{
11138void* p = setgroups
11139 ;
11140 return 0;
11141}
11142_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011143if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011144
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011145$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011146
Matthias Klosec511b472010-05-08 11:01:39 +000011147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011148$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011149else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11151$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011152
11153fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011154rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000011155
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011156# check for openpty and forkpty
11157
11158for ac_func in openpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011159do :
11160 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011161if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011162 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011163#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011164_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011165
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011166else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011167 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
11168$as_echo_n "checking for openpty in -lutil... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011169if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011170 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011171else
Martin v. Löwis11437992002-04-12 09:54:03 +000011172 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011173LIBS="-lutil $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011174cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011175/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011176
Martin v. Löwiseba40652007-08-30 20:10:57 +000011177/* Override any GCC internal prototype to avoid an error.
11178 Use char because int might match the return type of a GCC
11179 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011180#ifdef __cplusplus
11181extern "C"
11182#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011183char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011184int
11185main ()
11186{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011187return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011188 ;
11189 return 0;
11190}
11191_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011192if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011193 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011194else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011195 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011196fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011197rm -f core conftest.err conftest.$ac_objext \
11198 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011199LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011200fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011201{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
11202$as_echo "$ac_cv_lib_util_openpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011203if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011204 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011205 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011206else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011207 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
11208$as_echo_n "checking for openpty in -lbsd... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011209if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011210 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011211else
11212 ac_check_lib_save_LIBS=$LIBS
11213LIBS="-lbsd $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011214cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011215/* end confdefs.h. */
11216
Martin v. Löwiseba40652007-08-30 20:10:57 +000011217/* Override any GCC internal prototype to avoid an error.
11218 Use char because int might match the return type of a GCC
11219 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011220#ifdef __cplusplus
11221extern "C"
11222#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011223char openpty ();
11224int
11225main ()
11226{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011227return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011228 ;
11229 return 0;
11230}
11231_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011232if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011233 ac_cv_lib_bsd_openpty=yes
11234else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011235 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011236fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011237rm -f core conftest.err conftest.$ac_objext \
11238 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011239LIBS=$ac_check_lib_save_LIBS
11240fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011241{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
11242$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011243if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011244 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011245 LIBS="$LIBS -lbsd"
11246fi
11247
11248
11249fi
11250
Fred Drake8cef4cf2000-06-28 16:40:38 +000011251
11252fi
11253done
11254
11255for ac_func in forkpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011256do :
11257 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011258if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011259 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011260#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011261_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011262
Fred Drake8cef4cf2000-06-28 16:40:38 +000011263else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011264 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
11265$as_echo_n "checking for forkpty in -lutil... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011266if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011267 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011268else
Martin v. Löwis11437992002-04-12 09:54:03 +000011269 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011270LIBS="-lutil $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011271cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011272/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011273
Martin v. Löwiseba40652007-08-30 20:10:57 +000011274/* Override any GCC internal prototype to avoid an error.
11275 Use char because int might match the return type of a GCC
11276 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011277#ifdef __cplusplus
11278extern "C"
11279#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011280char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011281int
11282main ()
11283{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011284return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011285 ;
11286 return 0;
11287}
11288_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011289if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011290 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011291else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011292 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011293fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011294rm -f core conftest.err conftest.$ac_objext \
11295 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011296LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011297fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011298{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
11299$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011300if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011301 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011302 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011303else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011304 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
11305$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011306if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011307 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011308else
11309 ac_check_lib_save_LIBS=$LIBS
11310LIBS="-lbsd $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011311cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011312/* end confdefs.h. */
11313
Martin v. Löwiseba40652007-08-30 20:10:57 +000011314/* Override any GCC internal prototype to avoid an error.
11315 Use char because int might match the return type of a GCC
11316 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011317#ifdef __cplusplus
11318extern "C"
11319#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011320char forkpty ();
11321int
11322main ()
11323{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011324return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011325 ;
11326 return 0;
11327}
11328_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011329if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011330 ac_cv_lib_bsd_forkpty=yes
11331else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011332 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011333fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011334rm -f core conftest.err conftest.$ac_objext \
11335 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011336LIBS=$ac_check_lib_save_LIBS
11337fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011338{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
11339$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011340if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011341 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011342 LIBS="$LIBS -lbsd"
11343fi
11344
11345
11346fi
11347
Fred Drake8cef4cf2000-06-28 16:40:38 +000011348
11349fi
11350done
11351
Jack Jansendd19cf82001-12-06 22:36:17 +000011352
Brett Cannonaa5778d2008-03-18 04:09:00 +000011353# Stuff for expat.
Brett Cannonaa5778d2008-03-18 04:09:00 +000011354for ac_func in memmove
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011355do :
11356 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011357if test "x$ac_cv_func_memmove" = xyes; then :
Brett Cannonaa5778d2008-03-18 04:09:00 +000011358 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011359#define HAVE_MEMMOVE 1
Brett Cannonaa5778d2008-03-18 04:09:00 +000011360_ACEOF
11361
11362fi
11363done
11364
11365
Michael W. Hudson54241132001-12-07 15:38:26 +000011366# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000011367for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011368do :
11369 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11370ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011371if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011372 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011373#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011374_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000011375
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011376fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000011377done
11378
Michael W. Hudson54241132001-12-07 15:38:26 +000011379
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011380ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011381if test "x$ac_cv_func_dup2" = xyes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011382 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000011383
Martin v. Löwis1142de32002-03-29 16:28:31 +000011384else
Martin v. Löwiseba40652007-08-30 20:10:57 +000011385 case " $LIBOBJS " in
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011386 *" dup2.$ac_objext "* ) ;;
11387 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Martin v. Löwiseba40652007-08-30 20:10:57 +000011388 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011389esac
11390
Martin v. Löwis1142de32002-03-29 16:28:31 +000011391fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011392
11393ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011394if test "x$ac_cv_func_getcwd" = xyes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011395 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
11396
11397else
11398 case " $LIBOBJS " in
11399 *" getcwd.$ac_objext "* ) ;;
11400 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
11401 ;;
11402esac
11403
11404fi
11405
11406ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011407if test "x$ac_cv_func_strdup" = xyes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011408 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
11409
11410else
11411 case " $LIBOBJS " in
11412 *" strdup.$ac_objext "* ) ;;
11413 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
11414 ;;
11415esac
11416
11417fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000011418
11419
11420for ac_func in getpgrp
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011421do :
11422 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011423if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011424 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011425#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011426_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011427 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011428/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011429#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011430int
11431main ()
11432{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011433getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011434 ;
11435 return 0;
11436}
11437_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011438if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011439
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011440$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011441
Guido van Rossum627b2d71993-12-24 10:39:16 +000011442fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011443rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011444
Guido van Rossum627b2d71993-12-24 10:39:16 +000011445fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011446done
Guido van Rossum627b2d71993-12-24 10:39:16 +000011447
Jack Jansen150753c2003-03-29 22:07:47 +000011448for ac_func in setpgrp
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011449do :
11450 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011451if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000011452 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011453#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000011454_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011455 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011456/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000011457#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000011458int
11459main ()
11460{
11461setpgrp(0,0);
11462 ;
11463 return 0;
11464}
11465_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011466if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011467
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011468$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011469
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011470fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011471rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000011472
11473fi
11474done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011475
Thomas Wouters3a584202000-08-05 23:28:51 +000011476for ac_func in gettimeofday
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011477do :
11478 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011479if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011480 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011481#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011482_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011483 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011484/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011485#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011486int
11487main ()
11488{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011489gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011490 ;
11491 return 0;
11492}
11493_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011494if ac_fn_c_try_compile "$LINENO"; then :
11495
Guido van Rossum627b2d71993-12-24 10:39:16 +000011496else
Skip Montanaro6dead952003-09-25 14:50:04 +000011497
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011498$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011499
Martin v. Löwis11437992002-04-12 09:54:03 +000011500
Guido van Rossum627b2d71993-12-24 10:39:16 +000011501fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011502rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011503
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011504fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011505done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011506
Michael W. Hudson54241132001-12-07 15:38:26 +000011507
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
11509$as_echo_n "checking for major... " >&6; }
11510cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011511/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011512
Neal Norwitz6eb37f02003-02-23 23:28:15 +000011513#if defined(MAJOR_IN_MKDEV)
11514#include <sys/mkdev.h>
11515#elif defined(MAJOR_IN_SYSMACROS)
11516#include <sys/sysmacros.h>
11517#else
11518#include <sys/types.h>
11519#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011520
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011521int
11522main ()
11523{
11524
11525 makedev(major(0),minor(0));
11526
11527 ;
11528 return 0;
11529}
11530_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011531if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011532
11533
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011534$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011535
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11537$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011538
11539else
Skip Montanaro6dead952003-09-25 14:50:04 +000011540
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11542$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011543
11544fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011545rm -f core conftest.err conftest.$ac_objext \
11546 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011547
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011548# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000011549# for [no]getaddrinfo in netdb.h.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
11551$as_echo_n "checking for getaddrinfo... " >&6; }
11552cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011553/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011554
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011555#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011556#include <sys/socket.h>
11557#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011558#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011559
Martin v. Löwis11437992002-04-12 09:54:03 +000011560int
11561main ()
11562{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011563getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000011564 ;
11565 return 0;
11566}
11567_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011568if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011569 have_getaddrinfo=yes
11570else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011571 have_getaddrinfo=no
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011572fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011573rm -f core conftest.err conftest.$ac_objext \
11574 conftest$ac_exeext conftest.$ac_ext
11575{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
11576$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011577if test $have_getaddrinfo = yes
11578then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011579 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
11580$as_echo_n "checking getaddrinfo bug... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011581 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011582 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011583else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011584 if test "$cross_compiling" = yes; then :
doko@python.orgd65e2ba2013-01-31 23:52:03 +010011585
11586if test "${enable_ipv6+set}" = set; then
11587 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
11588else
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011589 ac_cv_buggy_getaddrinfo=yes
doko@python.orgd65e2ba2013-01-31 23:52:03 +010011590fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011591else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011592 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011593/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011594
Stefan Krah0afe4e42012-11-22 23:56:51 +010011595#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011596#include <sys/types.h>
11597#include <netdb.h>
11598#include <string.h>
11599#include <sys/socket.h>
11600#include <netinet/in.h>
11601
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011602int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011603{
11604 int passive, gaierr, inet4 = 0, inet6 = 0;
11605 struct addrinfo hints, *ai, *aitop;
11606 char straddr[INET6_ADDRSTRLEN], strport[16];
11607
11608 for (passive = 0; passive <= 1; passive++) {
11609 memset(&hints, 0, sizeof(hints));
11610 hints.ai_family = AF_UNSPEC;
11611 hints.ai_flags = passive ? AI_PASSIVE : 0;
11612 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000011613 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011614 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
11615 (void)gai_strerror(gaierr);
11616 goto bad;
11617 }
11618 for (ai = aitop; ai; ai = ai->ai_next) {
11619 if (ai->ai_addr == NULL ||
11620 ai->ai_addrlen == 0 ||
11621 getnameinfo(ai->ai_addr, ai->ai_addrlen,
11622 straddr, sizeof(straddr), strport, sizeof(strport),
11623 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
11624 goto bad;
11625 }
11626 switch (ai->ai_family) {
11627 case AF_INET:
11628 if (strcmp(strport, "54321") != 0) {
11629 goto bad;
11630 }
11631 if (passive) {
11632 if (strcmp(straddr, "0.0.0.0") != 0) {
11633 goto bad;
11634 }
11635 } else {
11636 if (strcmp(straddr, "127.0.0.1") != 0) {
11637 goto bad;
11638 }
11639 }
11640 inet4++;
11641 break;
11642 case AF_INET6:
11643 if (strcmp(strport, "54321") != 0) {
11644 goto bad;
11645 }
11646 if (passive) {
11647 if (strcmp(straddr, "::") != 0) {
11648 goto bad;
11649 }
11650 } else {
11651 if (strcmp(straddr, "::1") != 0) {
11652 goto bad;
11653 }
11654 }
11655 inet6++;
11656 break;
11657 case AF_UNSPEC:
11658 goto bad;
11659 break;
11660 default:
11661 /* another family support? */
11662 break;
11663 }
11664 }
11665 }
11666
11667 if (!(inet4 == 0 || inet4 == 2))
11668 goto bad;
11669 if (!(inet6 == 0 || inet6 == 2))
11670 goto bad;
11671
11672 if (aitop)
11673 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011674 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011675
11676 bad:
11677 if (aitop)
11678 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011679 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011680}
11681
Martin v. Löwis11437992002-04-12 09:54:03 +000011682_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011683if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011684 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011685else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011686 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011687fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011688rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11689 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011690fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011691
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011692fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011693
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011694fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011695
Benjamin Peterson75fed812010-11-01 01:47:19 +000011696{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
11697$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
11698
Mark Dickinson0ef0b912009-12-31 21:11:48 +000011699if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011700then
11701 if test $ipv6 = yes
11702 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011703 echo 'Fatal: You must get working getaddrinfo() function.'
11704 echo ' or you can specify "--disable-ipv6"'.
11705 exit 1
11706 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011707else
Martin v. Löwis11437992002-04-12 09:54:03 +000011708
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011709$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011710
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011711fi
Benjamin Peterson75fed812010-11-01 01:47:19 +000011712
Jack Jansen9a66b6d2001-08-08 13:56:14 +000011713for ac_func in getnameinfo
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011714do :
11715 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011716if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011717 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011718#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011719_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011720
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011721fi
11722done
11723
Michael W. Hudson54241132001-12-07 15:38:26 +000011724
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011725# checks for structures
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011726{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
11727$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011728if ${ac_cv_header_time+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011729 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011730else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011731 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011732/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011733#include <sys/types.h>
11734#include <sys/time.h>
11735#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011736
Martin v. Löwis11437992002-04-12 09:54:03 +000011737int
11738main ()
11739{
11740if ((struct tm *) 0)
11741return 0;
11742 ;
11743 return 0;
11744}
11745_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011746if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011747 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011748else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011749 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011750fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011751rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011752fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011753{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
11754$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011755if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011756
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011757$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011758
11759fi
11760
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
11762$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011763if ${ac_cv_struct_tm+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011764 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011765else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011766 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011767/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011768#include <sys/types.h>
11769#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011770
Martin v. Löwis11437992002-04-12 09:54:03 +000011771int
11772main ()
11773{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011774struct tm tm;
11775 int *p = &tm.tm_sec;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011776 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000011777 ;
11778 return 0;
11779}
11780_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011781if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011782 ac_cv_struct_tm=time.h
11783else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011784 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011785fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011786rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011787fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011788{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
11789$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011790if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011791
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011792$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011793
11794fi
11795
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011796ac_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 +000011797#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000011798
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011799"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011800if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011801
11802cat >>confdefs.h <<_ACEOF
11803#define HAVE_STRUCT_TM_TM_ZONE 1
11804_ACEOF
11805
11806
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011807fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011808
Martin v. Löwis11437992002-04-12 09:54:03 +000011809if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
11810
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011811$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011812
11813else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011814 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
11815"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011816if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011817 ac_have_decl=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000011818else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011819 ac_have_decl=0
Martin v. Löwiseba40652007-08-30 20:10:57 +000011820fi
11821
Martin v. Löwiseba40652007-08-30 20:10:57 +000011822cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011823#define HAVE_DECL_TZNAME $ac_have_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +000011824_ACEOF
11825
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011826 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
11827$as_echo_n "checking for tzname... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011828if ${ac_cv_var_tzname+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011829 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000011830else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011831 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011832/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011833#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000011834#if !HAVE_DECL_TZNAME
11835extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000011836#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011837
Martin v. Löwis11437992002-04-12 09:54:03 +000011838int
11839main ()
11840{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011841return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000011842 ;
11843 return 0;
11844}
11845_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011846if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011847 ac_cv_var_tzname=yes
11848else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011849 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011850fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011851rm -f core conftest.err conftest.$ac_objext \
11852 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000011853fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011854{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
11855$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011856 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011857
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011858$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011859
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011860 fi
11861fi
11862
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011863ac_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 +010011864if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011865
11866cat >>confdefs.h <<_ACEOF
11867#define HAVE_STRUCT_STAT_ST_RDEV 1
11868_ACEOF
11869
11870
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011871fi
11872
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011873ac_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 +010011874if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011875
Martin v. Löwis11437992002-04-12 09:54:03 +000011876cat >>confdefs.h <<_ACEOF
11877#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
11878_ACEOF
11879
11880
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011881fi
11882
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011883ac_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 +010011884if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000011885
11886cat >>confdefs.h <<_ACEOF
11887#define HAVE_STRUCT_STAT_ST_FLAGS 1
11888_ACEOF
11889
11890
11891fi
11892
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011893ac_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 +010011894if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011895
11896cat >>confdefs.h <<_ACEOF
11897#define HAVE_STRUCT_STAT_ST_GEN 1
11898_ACEOF
11899
11900
11901fi
11902
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011903ac_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 +010011904if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011905
11906cat >>confdefs.h <<_ACEOF
11907#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
11908_ACEOF
11909
11910
11911fi
11912
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011913ac_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 +010011914if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011915
Martin v. Löwis11437992002-04-12 09:54:03 +000011916cat >>confdefs.h <<_ACEOF
11917#define HAVE_STRUCT_STAT_ST_BLOCKS 1
11918_ACEOF
11919
11920
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011921$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011922
11923else
Martin v. Löwiseba40652007-08-30 20:10:57 +000011924 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000011925 *" fileblocks.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011926 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
11927 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011928esac
11929
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011930fi
11931
Michael W. Hudson54241132001-12-07 15:38:26 +000011932
Martin v. Löwis11437992002-04-12 09:54:03 +000011933
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
11935$as_echo_n "checking for time.h that defines altzone... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011936if ${ac_cv_header_time_altzone+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011937 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011938else
Matthias Klosec511b472010-05-08 11:01:39 +000011939
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011940 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011941/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011942#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011943int
11944main ()
11945{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011946return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000011947 ;
11948 return 0;
11949}
11950_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011951if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011952 ac_cv_header_time_altzone=yes
11953else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011954 ac_cv_header_time_altzone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011955fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011956rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosec511b472010-05-08 11:01:39 +000011957
Martin v. Löwiseba40652007-08-30 20:10:57 +000011958fi
11959
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011960{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
11961$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011962if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011963
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011964$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011965
11966fi
11967
Guido van Rossumda88dad1995-01-26 00:46:29 +000011968was_it_defined=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
11970$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
11971cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011972/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011973
11974#include <sys/types.h>
11975#include <sys/select.h>
11976#include <sys/time.h>
11977
Martin v. Löwis11437992002-04-12 09:54:03 +000011978int
11979main ()
11980{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011981;
Martin v. Löwis11437992002-04-12 09:54:03 +000011982 ;
11983 return 0;
11984}
11985_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011986if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011987
11988
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011989$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011990
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011991 was_it_defined=yes
11992
Martin v. Löwiseba40652007-08-30 20:10:57 +000011993fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011994rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011995{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
11996$as_echo "$was_it_defined" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011997
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
11999$as_echo_n "checking for addrinfo... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012000if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012001 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012002else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012003 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012004/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +000012005#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012006int
12007main ()
12008{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012009struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000012010 ;
12011 return 0;
12012}
12013_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012014if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012015 ac_cv_struct_addrinfo=yes
12016else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012017 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012018fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012019rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12020fi
12021
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012022{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
12023$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012024if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012025
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012026$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012027
12028fi
12029
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
12031$as_echo_n "checking for sockaddr_storage... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012032if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012033 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012034else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012035 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012036/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012037
12038# include <sys/types.h>
12039# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012040int
12041main ()
12042{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012043struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000012044 ;
12045 return 0;
12046}
12047_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012048if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012049 ac_cv_struct_sockaddr_storage=yes
12050else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012051 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012052fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012053rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12054fi
12055
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012056{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
12057$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012058if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012059
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012060$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012061
12062fi
12063
Guido van Rossum627b2d71993-12-24 10:39:16 +000012064# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000012065
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
12067$as_echo_n "checking whether char is unsigned... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012068if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012069 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000012070else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012071 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012072/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012073$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012074int
12075main ()
12076{
12077static int test_array [1 - 2 * !(((char) -1) < 0)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012078test_array [0] = 0;
12079return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012080
12081 ;
12082 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000012083}
Martin v. Löwis11437992002-04-12 09:54:03 +000012084_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012085if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012086 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012087else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012088 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012089fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012090rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012091fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012092{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
12093$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012094if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012095 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012096
12097fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000012098
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12100$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012101if ${ac_cv_c_const+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012102 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012103else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012104 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012105/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012106
Martin v. Löwis11437992002-04-12 09:54:03 +000012107int
12108main ()
12109{
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012110
Martin v. Löwis11437992002-04-12 09:54:03 +000012111#ifndef __cplusplus
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012112 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012113 typedef int charset[2];
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012114 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000012115 /* SunOS 4.1.1 cc rejects this. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000012116 char const *const *pcpcc;
12117 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000012118 /* NEC SVR4.0.2 mips cc rejects this. */
12119 struct point {int x, y;};
12120 static struct point const zero = {0,0};
12121 /* AIX XL C 1.02.0.0 rejects this.
12122 It does not let you subtract one const X* pointer from another in
12123 an arm of an if-expression whose if-part is not a constant
12124 expression */
12125 const char *g = "string";
Martin v. Löwiseba40652007-08-30 20:10:57 +000012126 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012127 /* HPUX 7.0 cc rejects these. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000012128 ++pcpcc;
12129 ppc = (char**) pcpcc;
12130 pcpcc = (char const *const *) ppc;
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012131 { /* SCO 3.2v4 cc rejects this sort of thing. */
12132 char tx;
12133 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000012134 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012135
Martin v. Löwis11437992002-04-12 09:54:03 +000012136 *t++ = 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012137 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012138 }
12139 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12140 int x[] = {25, 17};
12141 const int *foo = &x[0];
12142 ++foo;
12143 }
12144 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12145 typedef const int *iptr;
12146 iptr p = 0;
12147 ++p;
12148 }
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012149 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000012150 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012151 struct s { int j; const int *ap[3]; } bx;
12152 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000012153 }
12154 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12155 const int foo = 10;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012156 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012157 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012158 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000012159#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000012160
Martin v. Löwis11437992002-04-12 09:54:03 +000012161 ;
12162 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012163}
Martin v. Löwis11437992002-04-12 09:54:03 +000012164_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012165if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012166 ac_cv_c_const=yes
12167else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012168 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012169fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012170rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012171fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012172{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12173$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012174if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012175
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012176$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012177
12178fi
12179
Michael W. Hudson54241132001-12-07 15:38:26 +000012180
Guido van Rossumda88dad1995-01-26 00:46:29 +000012181works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
12183$as_echo_n "checking for working volatile... " >&6; }
12184cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012185/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012186
Martin v. Löwis11437992002-04-12 09:54:03 +000012187int
12188main ()
12189{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012190volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012191 ;
12192 return 0;
12193}
12194_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012195if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012196 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012197else
Skip Montanaro6dead952003-09-25 14:50:04 +000012198
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012199$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012200
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012201
Guido van Rossum627b2d71993-12-24 10:39:16 +000012202fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012203rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012204{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12205$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012206
Guido van Rossumda88dad1995-01-26 00:46:29 +000012207works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
12209$as_echo_n "checking for working signed char... " >&6; }
12210cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012211/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012212
Martin v. Löwis11437992002-04-12 09:54:03 +000012213int
12214main ()
12215{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012216signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000012217 ;
12218 return 0;
12219}
12220_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012221if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012222 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012223else
Skip Montanaro6dead952003-09-25 14:50:04 +000012224
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012225$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000012226
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012227
Guido van Rossum7f43da71994-08-01 12:15:30 +000012228fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012229rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012230{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12231$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012232
Guido van Rossumda88dad1995-01-26 00:46:29 +000012233have_prototypes=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012234{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
12235$as_echo_n "checking for prototypes... " >&6; }
12236cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012237/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012238int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012239int
12240main ()
12241{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012242return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000012243 ;
12244 return 0;
12245}
12246_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012247if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012248
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012249$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012250
Matthias Klosec511b472010-05-08 11:01:39 +000012251 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012252fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012253rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012254{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
12255$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012256
Guido van Rossumda88dad1995-01-26 00:46:29 +000012257works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
12259$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
12260cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012261/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012262
12263#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000012264int foo(int x, ...) {
12265 va_list va;
12266 va_start(va, x);
12267 va_arg(va, int);
12268 va_arg(va, char *);
12269 va_arg(va, double);
12270 return 0;
12271}
Guido van Rossum7f43da71994-08-01 12:15:30 +000012272
Martin v. Löwis11437992002-04-12 09:54:03 +000012273int
12274main ()
12275{
Guido van Rossum90eea071996-08-30 20:58:57 +000012276return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000012277 ;
12278 return 0;
12279}
12280_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012281if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012282
12283
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012284$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012285
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012286 works=yes
12287
Guido van Rossum627b2d71993-12-24 10:39:16 +000012288fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012289rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012290{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12291$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012292
Martin v. Löwisd6320502004-08-12 13:45:08 +000012293# check for socketpair
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
12295$as_echo_n "checking for socketpair... " >&6; }
12296cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012297/* end confdefs.h. */
12298
12299#include <sys/types.h>
12300#include <sys/socket.h>
12301
12302int
12303main ()
12304{
12305void *x=socketpair
12306 ;
12307 return 0;
12308}
12309_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012310if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000012311
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012312$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000012313
Matthias Klosec511b472010-05-08 11:01:39 +000012314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012315$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012316else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012317 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12318$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012319
12320fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012321rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012322
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012323# check if sockaddr has sa_len member
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
12325$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
12326cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012327/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012328#include <sys/types.h>
12329#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012330int
12331main ()
12332{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012333struct sockaddr x;
12334x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012335 ;
12336 return 0;
12337}
12338_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012339if ac_fn_c_try_compile "$LINENO"; then :
12340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12341$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012342
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012343$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012344
12345else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12347$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000012348
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012349fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012350rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012351
Guido van Rossumda88dad1995-01-26 00:46:29 +000012352va_list_is_array=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
12354$as_echo_n "checking whether va_list is an array... " >&6; }
12355cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012356/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012357
12358#ifdef HAVE_STDARG_PROTOTYPES
12359#include <stdarg.h>
12360#else
12361#include <varargs.h>
12362#endif
12363
Martin v. Löwis11437992002-04-12 09:54:03 +000012364int
12365main ()
12366{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012367va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000012368 ;
12369 return 0;
12370}
12371_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012372if ac_fn_c_try_compile "$LINENO"; then :
12373
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012374else
Skip Montanaro6dead952003-09-25 14:50:04 +000012375
Martin v. Löwis11437992002-04-12 09:54:03 +000012376
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012377$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012378
Guido van Rossumda88dad1995-01-26 00:46:29 +000012379 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012380
Guido van Rossum76be6ed1995-01-02 18:33:54 +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: $va_list_is_array" >&5
12384$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012385
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012386# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000012387
12388
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012389ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012390if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012391
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012392 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000012393
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012394 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
12395$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012396 OLD_CFLAGS=$CFLAGS
12397 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012398 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012399/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012400
12401# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012402
Martin v. Löwis11437992002-04-12 09:54:03 +000012403int
12404main ()
12405{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012406
12407 char *name;
12408 struct hostent *he, *res;
12409 char buffer[2048];
12410 int buflen = 2048;
12411 int h_errnop;
12412
12413 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012414
12415 ;
12416 return 0;
12417}
12418_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012419if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012420
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012421 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012422
Martin v. Löwis11437992002-04-12 09:54:03 +000012423
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012424$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012425
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12427$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012428
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012429else
Skip Montanaro6dead952003-09-25 14:50:04 +000012430
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012431 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12432$as_echo "no" >&6; }
12433 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
12434$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
12435 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012436/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012437
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012438# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012439
Martin v. Löwis11437992002-04-12 09:54:03 +000012440int
12441main ()
12442{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012443
12444 char *name;
12445 struct hostent *he;
Matthias Klosec511b472010-05-08 11:01:39 +000012446 char buffer[2048];
12447 int buflen = 2048;
12448 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012449
Matthias Klosec511b472010-05-08 11:01:39 +000012450 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012451
12452 ;
12453 return 0;
12454}
12455_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012456if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012457
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012458 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012459
Martin v. Löwis11437992002-04-12 09:54:03 +000012460
Matthias Klosec511b472010-05-08 11:01:39 +000012461$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012462
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012463 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12464$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012465
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012466else
Skip Montanaro6dead952003-09-25 14:50:04 +000012467
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12469$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000012470 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
12471$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
12472 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12473/* end confdefs.h. */
12474
12475# include <netdb.h>
12476
12477int
12478main ()
12479{
12480
12481 char *name;
12482 struct hostent *he;
12483 struct hostent_data data;
12484
12485 (void) gethostbyname_r(name, he, &data);
12486
12487 ;
12488 return 0;
12489}
12490_ACEOF
12491if ac_fn_c_try_compile "$LINENO"; then :
12492
12493 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
12494
12495
12496$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
12497
12498 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12499$as_echo "yes" >&6; }
12500
12501else
12502
12503 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12504$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012505
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012506fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012507rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012508
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012509fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012510rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012511
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012512fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012513rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012514 CFLAGS=$OLD_CFLAGS
12515
12516else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012517
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012518 for ac_func in gethostbyname
12519do :
12520 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012521if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012522 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012523#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012524_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012525
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012526fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012527done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012528
Michael W. Hudson54241132001-12-07 15:38:26 +000012529
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012530fi
12531
Michael W. Hudson54241132001-12-07 15:38:26 +000012532
12533
12534
12535
12536
12537
Guido van Rossum627b2d71993-12-24 10:39:16 +000012538# checks for system services
12539# (none yet)
12540
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012541# Linux requires this for correct f.p. operations
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012542ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012543if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012544
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012545else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012546 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
12547$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012548if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012549 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012550else
Martin v. Löwis11437992002-04-12 09:54:03 +000012551 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012552LIBS="-lieee $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012553cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012554/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012555
Martin v. Löwiseba40652007-08-30 20:10:57 +000012556/* Override any GCC internal prototype to avoid an error.
12557 Use char because int might match the return type of a GCC
12558 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012559#ifdef __cplusplus
12560extern "C"
12561#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012562char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012563int
12564main ()
12565{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012566return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012567 ;
12568 return 0;
12569}
12570_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012571if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012572 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012573else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012574 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012575fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012576rm -f core conftest.err conftest.$ac_objext \
12577 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012578LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012579fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012580{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
12581$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012582if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012583 cat >>confdefs.h <<_ACEOF
12584#define HAVE_LIBIEEE 1
12585_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012586
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012587 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012588
Guido van Rossum627b2d71993-12-24 10:39:16 +000012589fi
12590
Michael W. Hudson54241132001-12-07 15:38:26 +000012591
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012592fi
12593
Michael W. Hudson54241132001-12-07 15:38:26 +000012594
Guido van Rossum7f253911997-05-09 02:42:48 +000012595# Check for --with-fpectl
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
12597$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012598
Martin v. Löwiseba40652007-08-30 20:10:57 +000012599# Check whether --with-fpectl was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012600if test "${with_fpectl+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000012601 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000012602if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000012603then
12604
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012605$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012606
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12608$as_echo "yes" >&6; }
12609else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12610$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012611fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000012612else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12614$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012615fi
12616
Guido van Rossum7f253911997-05-09 02:42:48 +000012617
Guido van Rossum7f43da71994-08-01 12:15:30 +000012618# check for --with-libm=...
12619
Guido van Rossum563e7081996-09-10 18:20:48 +000012620case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000012621Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012622BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000012623*) LIBM=-lm
12624esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
12626$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012627
Martin v. Löwiseba40652007-08-30 20:10:57 +000012628# Check whether --with-libm was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012629if test "${with_libm+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000012630 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000012631if test "$withval" = no
12632then LIBM=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012633 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
12634$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012635elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012636then LIBM=$withval
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
12638$as_echo "set LIBM=\"$withval\"" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012639else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012640fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012641else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
12643$as_echo "default LIBM=\"$LIBM\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012644fi
12645
Guido van Rossum7f43da71994-08-01 12:15:30 +000012646
12647# check for --with-libc=...
12648
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
12650$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012651
Martin v. Löwiseba40652007-08-30 20:10:57 +000012652# Check whether --with-libc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012653if test "${with_libc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000012654 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000012655if test "$withval" = no
12656then LIBC=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
12658$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012659elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012660then LIBC=$withval
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
12662$as_echo "set LIBC=\"$withval\"" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012663else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012664fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012665else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012666 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
12667$as_echo "default LIBC=\"$LIBC\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012668fi
12669
Guido van Rossum7f43da71994-08-01 12:15:30 +000012670
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012671# **************************************************
12672# * Check for various properties of floating point *
12673# **************************************************
Mark Dickinson265d7382008-04-21 22:32:24 +000012674
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
12676$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012677if ${ac_cv_little_endian_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012678 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012679else
12680
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012681if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012682 ac_cv_little_endian_double=no
12683else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012684 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012685/* end confdefs.h. */
12686
12687#include <string.h>
12688int main() {
12689 double x = 9006104071832581.0;
12690 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
12691 return 0;
12692 else
12693 return 1;
12694}
12695
12696_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012697if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012698 ac_cv_little_endian_double=yes
12699else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012700 ac_cv_little_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012701fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012702rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12703 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012704fi
12705
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012706fi
12707
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012708{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
12709$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012710if test "$ac_cv_little_endian_double" = yes
12711then
12712
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012713$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012714
12715fi
12716
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
12718$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012719if ${ac_cv_big_endian_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012720 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012721else
12722
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012723if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012724 ac_cv_big_endian_double=no
12725else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012726 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012727/* end confdefs.h. */
12728
12729#include <string.h>
12730int main() {
12731 double x = 9006104071832581.0;
12732 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
12733 return 0;
12734 else
12735 return 1;
12736}
12737
12738_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012739if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012740 ac_cv_big_endian_double=yes
12741else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012742 ac_cv_big_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012743fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012744rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12745 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012746fi
12747
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012748fi
12749
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012750{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
12751$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012752if test "$ac_cv_big_endian_double" = yes
12753then
12754
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012755$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012756
12757fi
12758
12759# Some ARM platforms use a mixed-endian representation for doubles.
12760# While Python doesn't currently have full support for these platforms
12761# (see e.g., issue 1762561), we can at least make sure that float <-> string
12762# conversions work.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
12764$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012765if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012766 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012767else
12768
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012769if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012770 ac_cv_mixed_endian_double=no
12771else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012772 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012773/* end confdefs.h. */
12774
12775#include <string.h>
12776int main() {
12777 double x = 9006104071832581.0;
12778 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
12779 return 0;
12780 else
12781 return 1;
12782}
12783
12784_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012785if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012786 ac_cv_mixed_endian_double=yes
12787else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012788 ac_cv_mixed_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012789fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012790rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12791 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012792fi
12793
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012794fi
12795
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012796{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
12797$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012798if test "$ac_cv_mixed_endian_double" = yes
12799then
12800
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012801$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012802
12803fi
12804
12805# The short float repr introduced in Python 3.1 requires the
12806# correctly-rounded string <-> double conversion functions from
12807# Python/dtoa.c, which in turn require that the FPU uses 53-bit
12808# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsona548dee2009-11-15 13:12:43 +000012809# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012810# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsona548dee2009-11-15 13:12:43 +000012811
12812# This inline assembler syntax may also work for suncc and icc,
12813# so we try it on all platforms.
12814
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
12816$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
12817cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012818/* end confdefs.h. */
12819
12820int
12821main ()
12822{
12823
Mark Dickinsona548dee2009-11-15 13:12:43 +000012824 unsigned short cw;
12825 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
12826 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012827
12828 ;
12829 return 0;
12830}
12831_ACEOF
Stefan Krah99e36b92015-07-03 15:30:54 +020012832if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012833 have_gcc_asm_for_x87=yes
12834else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012835 have_gcc_asm_for_x87=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012836fi
Stefan Krah99e36b92015-07-03 15:30:54 +020012837rm -f core conftest.err conftest.$ac_objext \
12838 conftest$ac_exeext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012839{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
12840$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsona548dee2009-11-15 13:12:43 +000012841if test "$have_gcc_asm_for_x87" = yes
12842then
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012843
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012844$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012845
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012846fi
Mark Dickinson7a3d8642008-04-22 00:54:27 +000012847
Mark Dickinson04b27232009-01-04 12:29:36 +000012848# Detect whether system arithmetic is subject to x87-style double
12849# rounding issues. The result of this test has little meaning on non
12850# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
12851# mode is round-to-nearest and double rounding issues are present, and
12852# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
12854$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinson99abd142009-10-24 13:44:16 +000012855# $BASECFLAGS may affect the result
12856ac_save_cc="$CC"
12857CC="$CC $BASECFLAGS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012858if test "$cross_compiling" = yes; then :
Mark Dickinson04b27232009-01-04 12:29:36 +000012859 ac_cv_x87_double_rounding=no
12860else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012861 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson04b27232009-01-04 12:29:36 +000012862/* end confdefs.h. */
12863
12864#include <stdlib.h>
12865#include <math.h>
12866int main() {
12867 volatile double x, y, z;
12868 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
12869 x = 0.99999999999999989; /* 1-2**-53 */
12870 y = 1./x;
12871 if (y != 1.)
12872 exit(0);
12873 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
12874 x = 1e16;
12875 y = 2.99999;
12876 z = x + y;
12877 if (z != 1e16+4.)
12878 exit(0);
12879 /* both tests show evidence of double rounding */
12880 exit(1);
12881}
12882
12883_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012884if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson04b27232009-01-04 12:29:36 +000012885 ac_cv_x87_double_rounding=no
12886else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012887 ac_cv_x87_double_rounding=yes
Mark Dickinson04b27232009-01-04 12:29:36 +000012888fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012889rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12890 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson04b27232009-01-04 12:29:36 +000012891fi
12892
Mark Dickinson99abd142009-10-24 13:44:16 +000012893CC="$ac_save_cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012894{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
12895$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson04b27232009-01-04 12:29:36 +000012896if test "$ac_cv_x87_double_rounding" = yes
12897then
12898
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012899$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson04b27232009-01-04 12:29:36 +000012900
12901fi
12902
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012903# ************************************
12904# * Check for mathematical functions *
12905# ************************************
12906
12907LIBS_SAVE=$LIBS
12908LIBS="$LIBS $LIBM"
12909
Mark Dickinson265d7382008-04-21 22:32:24 +000012910# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
12911# -0. on some architectures.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
12913$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012914if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012915 $as_echo_n "(cached) " >&6
Mark Dickinson265d7382008-04-21 22:32:24 +000012916else
12917
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012918if test "$cross_compiling" = yes; then :
Mark Dickinson265d7382008-04-21 22:32:24 +000012919 ac_cv_tanh_preserves_zero_sign=no
12920else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012921 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson265d7382008-04-21 22:32:24 +000012922/* end confdefs.h. */
12923
12924#include <math.h>
Mark Dickinson7a3d8642008-04-22 00:54:27 +000012925#include <stdlib.h>
Mark Dickinson265d7382008-04-21 22:32:24 +000012926int main() {
12927 /* return 0 if either negative zeros don't exist
12928 on this platform or if negative zeros exist
12929 and tanh(-0.) == -0. */
12930 if (atan2(0., -1.) == atan2(-0., -1.) ||
12931 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
12932 else exit(1);
12933}
12934
12935_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012936if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson265d7382008-04-21 22:32:24 +000012937 ac_cv_tanh_preserves_zero_sign=yes
12938else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012939 ac_cv_tanh_preserves_zero_sign=no
Mark Dickinson265d7382008-04-21 22:32:24 +000012940fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012941rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12942 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson265d7382008-04-21 22:32:24 +000012943fi
12944
Mark Dickinson265d7382008-04-21 22:32:24 +000012945fi
12946
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012947{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
12948$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Mark Dickinson265d7382008-04-21 22:32:24 +000012949if test "$ac_cv_tanh_preserves_zero_sign" = yes
12950then
12951
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012952$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Mark Dickinson265d7382008-04-21 22:32:24 +000012953
12954fi
12955
Mark Dickinson65898e02009-09-05 10:27:00 +000012956for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012957do :
12958 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12959ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012960if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinson65898e02009-09-05 10:27:00 +000012961 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012962#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Mark Dickinson65898e02009-09-05 10:27:00 +000012963_ACEOF
12964
12965fi
12966done
12967
Mark Dickinson65898e02009-09-05 10:27:00 +000012968for ac_func in hypot lgamma log1p round tgamma
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012969do :
12970 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12971ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012972if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Christian Heimes0a8143f2007-12-18 23:22:54 +000012973 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012974#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes0a8143f2007-12-18 23:22:54 +000012975_ACEOF
12976
12977fi
12978done
12979
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012980ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
12981"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012982if test "x$ac_cv_have_decl_isinf" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012983 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012984else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012985 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012986fi
12987
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012988cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012989#define HAVE_DECL_ISINF $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012990_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012991ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
12992"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012993if test "x$ac_cv_have_decl_isnan" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012994 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012995else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012996 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012997fi
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012998
12999cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013000#define HAVE_DECL_ISNAN $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013001_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013002ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
13003"
Matthias Klose3cef2a92012-03-14 23:39:33 +010013004if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013005 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013006else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013007 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013008fi
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013009
13010cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013011#define HAVE_DECL_ISFINITE $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013012_ACEOF
13013
13014
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000013015LIBS=$LIBS_SAVE
13016
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013017# For multiprocessing module, check that sem_open
13018# actually works. For FreeBSD versions <= 7.2,
13019# the kernel module that provides POSIX semaphores
13020# isn't loaded by default, so an attempt to call
13021# sem_open results in a 'Signal 12' error.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
13023$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013024if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013025 $as_echo_n "(cached) " >&6
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013026else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013027 if test "$cross_compiling" = yes; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013028 ac_cv_posix_semaphores_enabled=yes
13029else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013030 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013031/* end confdefs.h. */
13032
13033#include <unistd.h>
13034#include <fcntl.h>
13035#include <stdio.h>
13036#include <semaphore.h>
13037#include <sys/stat.h>
13038
13039int main(void) {
13040 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
13041 if (a == SEM_FAILED) {
13042 perror("sem_open");
13043 return 1;
13044 }
13045 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000013046 sem_unlink("/autoconf");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013047 return 0;
13048}
13049
13050_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013051if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013052 ac_cv_posix_semaphores_enabled=yes
13053else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013054 ac_cv_posix_semaphores_enabled=no
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013055fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013056rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13057 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013058fi
13059
13060
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013061fi
13062
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013063{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
13064$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013065if test $ac_cv_posix_semaphores_enabled = no
13066then
13067
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013068$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013069
13070fi
13071
13072# Multiprocessing check for broken sem_getvalue
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
13074$as_echo_n "checking for broken sem_getvalue... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013075if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013076 $as_echo_n "(cached) " >&6
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013077else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013078 if test "$cross_compiling" = yes; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013079 ac_cv_broken_sem_getvalue=yes
13080else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013081 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013082/* end confdefs.h. */
13083
13084#include <unistd.h>
13085#include <fcntl.h>
13086#include <stdio.h>
13087#include <semaphore.h>
13088#include <sys/stat.h>
13089
13090int main(void){
Mark Dickinson59dc89e2009-12-13 21:06:06 +000013091 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013092 int count;
13093 int res;
13094 if(a==SEM_FAILED){
13095 perror("sem_open");
13096 return 1;
13097
13098 }
13099 res = sem_getvalue(a, &count);
13100 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000013101 sem_unlink("/autocftw");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013102 return res==-1 ? 1 : 0;
13103}
13104
13105_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013106if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013107 ac_cv_broken_sem_getvalue=no
13108else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013109 ac_cv_broken_sem_getvalue=yes
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013110fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013111rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13112 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013113fi
13114
13115
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013116fi
13117
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013118{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
13119$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013120if test $ac_cv_broken_sem_getvalue = yes
13121then
13122
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013123$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013124
13125fi
13126
Mark Dickinsonefc82f72009-03-20 15:51:55 +000013127# determine what size digit to use for Python's longs
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
13129$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000013130# Check whether --enable-big-digits was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013131if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonefc82f72009-03-20 15:51:55 +000013132 enableval=$enable_big_digits; case $enable_big_digits in
13133yes)
13134 enable_big_digits=30 ;;
13135no)
13136 enable_big_digits=15 ;;
1313715|30)
13138 ;;
13139*)
Matthias Klose3cef2a92012-03-14 23:39:33 +010013140 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 +000013141esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013142{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
13143$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000013144
13145cat >>confdefs.h <<_ACEOF
13146#define PYLONG_BITS_IN_DIGIT $enable_big_digits
13147_ACEOF
13148
13149
13150else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013151 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13152$as_echo "no value specified" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000013153fi
13154
13155
Guido van Rossumef2255b2000-03-10 22:30:29 +000013156# check for wchar.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013157ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +010013158if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013159
13160
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013161$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013162
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013163 wchar_h="yes"
13164
Guido van Rossumef2255b2000-03-10 22:30:29 +000013165else
Martin v. Löwis11437992002-04-12 09:54:03 +000013166 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000013167
13168fi
13169
Michael W. Hudson54241132001-12-07 15:38:26 +000013170
Martin v. Löwis11437992002-04-12 09:54:03 +000013171
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013172# determine wchar_t size
13173if test "$wchar_h" = yes
13174then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013175 # The cast to long int works around a bug in the HP C Compiler
Martin v. Löwiseba40652007-08-30 20:10:57 +000013176# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13177# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13178# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
13180$as_echo_n "checking size of wchar_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013181if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013182 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013183else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013184 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
13185"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013186
Martin v. Löwis11437992002-04-12 09:54:03 +000013187else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013188 if test "$ac_cv_type_wchar_t" = yes; then
13189 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13190$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013191as_fn_error 77 "cannot compute sizeof (wchar_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +010013192See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013193 else
13194 ac_cv_sizeof_wchar_t=0
13195 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013196fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013197
Martin v. Löwis11437992002-04-12 09:54:03 +000013198fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013199{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
13200$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013201
13202
13203
Martin v. Löwis11437992002-04-12 09:54:03 +000013204cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013205#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013206_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013207
Michael W. Hudson54241132001-12-07 15:38:26 +000013208
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013209fi
13210
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
13212$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013213have_ucs4_tcl=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013214cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013215/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013216
13217#include <tcl.h>
13218#if TCL_UTF_MAX != 6
13219# error "NOT UCS4_TCL"
13220#endif
13221int
13222main ()
13223{
13224
13225 ;
13226 return 0;
13227}
13228_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013229if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013230
13231
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013232$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013233
13234 have_ucs4_tcl=yes
13235
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013236fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013237rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013238{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
13239$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013240
Skip Montanaro6dead952003-09-25 14:50:04 +000013241# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013242if test "$wchar_h" = yes
13243then
13244 # check whether wchar_t is signed or not
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013245 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
13246$as_echo_n "checking whether wchar_t is signed... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013247 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013248 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013249else
13250
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013251 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013252 ac_cv_wchar_t_signed=yes
13253else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013254 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013255/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013256
13257 #include <wchar.h>
13258 int main()
13259 {
Martin v. Löwis44fe0e42006-04-11 07:15:30 +000013260 /* Success: exit code 0 */
13261 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013262 }
13263
13264_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013265if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013266 ac_cv_wchar_t_signed=yes
13267else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013268 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013269fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013270rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13271 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013272fi
13273
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013274fi
13275
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013276 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
13277$as_echo "$ac_cv_wchar_t_signed" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013278fi
13279
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what type to use for unicode" >&5
13281$as_echo_n "checking what type to use for unicode... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013282# Check whether --enable-unicode was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013283if test "${enable_unicode+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000013284 enableval=$enable_unicode;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013285else
13286 enable_unicode=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +000013287fi
13288
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013289
13290if test $enable_unicode = yes
13291then
Martin v. Löwisfd917792001-06-27 20:22:04 +000013292 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013293 case "$have_ucs4_tcl" in
13294 yes) enable_unicode="ucs4"
13295 ;;
13296 *) enable_unicode="ucs2"
13297 ;;
13298 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013299fi
13300
Martin v. Löwis0036cba2002-04-12 09:58:45 +000013301
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013302case "$enable_unicode" in
13303ucs2) unicode_size="2"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013304 $as_echo "#define Py_UNICODE_SIZE 2" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013305
13306 ;;
13307ucs4) unicode_size="4"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013308 $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013309
13310 ;;
Martin v. Löwised11a5d2012-05-20 10:42:17 +020013311no) ;; # To allow --disable-unicode
Matthias Klose3cef2a92012-03-14 23:39:33 +010013312*) 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 +000013313esac
13314
Michael W. Hudson54241132001-12-07 15:38:26 +000013315
Martin v. Löwis11437992002-04-12 09:54:03 +000013316
13317
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013318if test "$enable_unicode" = "no"
13319then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000013320 UNICODE_OBJS=""
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013321 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not used" >&5
13322$as_echo "not used" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013323else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000013324 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000013325
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013326$as_echo "#define Py_USING_UNICODE 1" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013327
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013328
13329 # wchar_t is only usable if it maps to an unsigned type
13330 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000013331 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013332 then
13333 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013334
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013335$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013336
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013337 $as_echo "#define PY_UNICODE_TYPE wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013338
13339 elif test "$ac_cv_sizeof_short" = "$unicode_size"
13340 then
13341 PY_UNICODE_TYPE="unsigned short"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013342 $as_echo "#define PY_UNICODE_TYPE unsigned short" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013343
13344 elif test "$ac_cv_sizeof_long" = "$unicode_size"
13345 then
13346 PY_UNICODE_TYPE="unsigned long"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013347 $as_echo "#define PY_UNICODE_TYPE unsigned long" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013348
13349 else
13350 PY_UNICODE_TYPE="no type found"
13351 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PY_UNICODE_TYPE" >&5
13353$as_echo "$PY_UNICODE_TYPE" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013354fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000013355
13356# check for endianness
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013357 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13358$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013359if ${ac_cv_c_bigendian+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013360 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000013361else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013362 ac_cv_c_bigendian=unknown
13363 # See if we're dealing with a universal compiler.
13364 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13365/* end confdefs.h. */
13366#ifndef __APPLE_CC__
13367 not a universal capable compiler
13368 #endif
13369 typedef int dummy;
13370
Skip Montanaro6dead952003-09-25 14:50:04 +000013371_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013372if ac_fn_c_try_compile "$LINENO"; then :
13373
13374 # Check for potential -arch flags. It is not universal unless
13375 # there are at least two -arch flags with different values.
13376 ac_arch=
13377 ac_prev=
13378 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13379 if test -n "$ac_prev"; then
13380 case $ac_word in
13381 i?86 | x86_64 | ppc | ppc64)
13382 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13383 ac_arch=$ac_word
13384 else
13385 ac_cv_c_bigendian=universal
13386 break
13387 fi
13388 ;;
13389 esac
13390 ac_prev=
13391 elif test "x$ac_word" = "x-arch"; then
13392 ac_prev=arch
13393 fi
13394 done
13395fi
13396rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13397 if test $ac_cv_c_bigendian = unknown; then
13398 # See if sys/param.h defines the BYTE_ORDER macro.
13399 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013400/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013401#include <sys/types.h>
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013402 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013403
Martin v. Löwis11437992002-04-12 09:54:03 +000013404int
13405main ()
13406{
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013407#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13408 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13409 && LITTLE_ENDIAN)
13410 bogus endian macros
13411 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013412
13413 ;
13414 return 0;
13415}
13416_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013417if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013418 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013419 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013420/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013421#include <sys/types.h>
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013422 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013423
Martin v. Löwis11437992002-04-12 09:54:03 +000013424int
13425main ()
13426{
Guido van Rossumef2255b2000-03-10 22:30:29 +000013427#if BYTE_ORDER != BIG_ENDIAN
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013428 not big endian
13429 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013430
13431 ;
13432 return 0;
13433}
13434_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013435if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013436 ac_cv_c_bigendian=yes
13437else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013438 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000013439fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013440rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013441fi
13442rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13443 fi
13444 if test $ac_cv_c_bigendian = unknown; then
13445 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13446 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013447/* end confdefs.h. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013448#include <limits.h>
13449
Martin v. Löwis11437992002-04-12 09:54:03 +000013450int
13451main ()
13452{
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013453#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13454 bogus endian macros
13455 #endif
13456
Martin v. Löwis11437992002-04-12 09:54:03 +000013457 ;
13458 return 0;
13459}
13460_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013461if ac_fn_c_try_compile "$LINENO"; then :
13462 # It does; now see whether it defined to _BIG_ENDIAN or not.
13463 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13464/* end confdefs.h. */
13465#include <limits.h>
13466
13467int
13468main ()
13469{
13470#ifndef _BIG_ENDIAN
13471 not big endian
13472 #endif
13473
13474 ;
13475 return 0;
13476}
13477_ACEOF
13478if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013479 ac_cv_c_bigendian=yes
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000013480else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013481 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013482fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013483rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13484fi
13485rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13486 fi
13487 if test $ac_cv_c_bigendian = unknown; then
13488 # Compile a test program.
13489 if test "$cross_compiling" = yes; then :
13490 # Try to guess by grepping values from an object file.
13491 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13492/* end confdefs.h. */
13493short int ascii_mm[] =
13494 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13495 short int ascii_ii[] =
13496 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13497 int use_ascii (int i) {
13498 return ascii_mm[i] + ascii_ii[i];
13499 }
13500 short int ebcdic_ii[] =
13501 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13502 short int ebcdic_mm[] =
13503 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13504 int use_ebcdic (int i) {
13505 return ebcdic_mm[i] + ebcdic_ii[i];
13506 }
13507 extern int foo;
Martin v. Löwiseba40652007-08-30 20:10:57 +000013508
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013509int
13510main ()
13511{
13512return use_ascii (foo) == use_ebcdic (foo);
13513 ;
13514 return 0;
13515}
13516_ACEOF
13517if ac_fn_c_try_compile "$LINENO"; then :
13518 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
13519 ac_cv_c_bigendian=yes
13520 fi
13521 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
13522 if test "$ac_cv_c_bigendian" = unknown; then
13523 ac_cv_c_bigendian=no
13524 else
13525 # finding both strings is unlikely to happen, but who knows?
13526 ac_cv_c_bigendian=unknown
13527 fi
13528 fi
13529fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013530rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013531else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013532 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013533/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000013534$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013535int
13536main ()
13537{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013538
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013539 /* Are we little or big endian? From Harbison&Steele. */
13540 union
13541 {
13542 long int l;
13543 char c[sizeof (long int)];
13544 } u;
13545 u.l = 1;
13546 return u.c[sizeof (long int) - 1] == 1;
Martin v. Löwiseba40652007-08-30 20:10:57 +000013547
13548 ;
13549 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000013550}
Martin v. Löwis11437992002-04-12 09:54:03 +000013551_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013552if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013553 ac_cv_c_bigendian=no
13554else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013555 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000013556fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013557rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13558 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000013559fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013560
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013561 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013562fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013563{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
13564$as_echo "$ac_cv_c_bigendian" >&6; }
13565 case $ac_cv_c_bigendian in #(
13566 yes)
13567 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
13568;; #(
13569 no)
13570 ;; #(
13571 universal)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013572
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013573$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000013574
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013575 ;; #(
13576 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013577 as_fn_error $? "unknown endianness
Matthias Klose3cef2a92012-03-14 23:39:33 +010013578 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013579 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000013580
Michael W. Hudson54241132001-12-07 15:38:26 +000013581
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013582# Check whether right shifting a negative integer extends the sign bit
13583# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
13585$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013586if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013587 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000013588else
Martin v. Löwis11437992002-04-12 09:54:03 +000013589
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013590if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013591 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013592else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013593 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013594/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013595
13596int main()
13597{
Vladimir Marangozova6180282000-07-12 05:05:06 +000013598 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013599}
13600
Martin v. Löwis11437992002-04-12 09:54:03 +000013601_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013602if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000013603 ac_cv_rshift_extends_sign=yes
13604else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013605 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000013606fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013607rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13608 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000013609fi
13610
Martin v. Löwiseba40652007-08-30 20:10:57 +000013611fi
13612
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013613{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
13614$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000013615if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013616then
Martin v. Löwis11437992002-04-12 09:54:03 +000013617
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013618$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013619
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013620fi
13621
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013622# check for getc_unlocked and related locking functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
13624$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013625if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013626 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013627else
Martin v. Löwis11437992002-04-12 09:54:03 +000013628
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013629cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013630/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013631#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013632int
13633main ()
13634{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013635
13636 FILE *f = fopen("/dev/null", "r");
13637 flockfile(f);
13638 getc_unlocked(f);
13639 funlockfile(f);
13640
Martin v. Löwis11437992002-04-12 09:54:03 +000013641 ;
13642 return 0;
13643}
13644_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013645if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013646 ac_cv_have_getc_unlocked=yes
13647else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013648 ac_cv_have_getc_unlocked=no
13649fi
13650rm -f core conftest.err conftest.$ac_objext \
13651 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013652fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013653
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013654{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
13655$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013656if test "$ac_cv_have_getc_unlocked" = yes
13657then
Martin v. Löwis11437992002-04-12 09:54:03 +000013658
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013659$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013660
13661fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013662
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013663# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000013664# save the value of LIBS so we don't actually link Python with readline
13665LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013666
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013667# On some systems we need to link readline to a termcap compatible
13668# library. NOTE: Keep the precedence of listed libraries synchronised
13669# with setup.py.
13670py_cv_lib_readline=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
13672$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013673for py_libtermcap in "" ncursesw ncurses curses termcap; do
13674 if test -z "$py_libtermcap"; then
13675 READLINE_LIBS="-lreadline"
13676 else
13677 READLINE_LIBS="-lreadline -l$py_libtermcap"
13678 fi
13679 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013680 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013681/* end confdefs.h. */
13682
Martin v. Löwiseba40652007-08-30 20:10:57 +000013683/* Override any GCC internal prototype to avoid an error.
13684 Use char because int might match the return type of a GCC
13685 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013686#ifdef __cplusplus
13687extern "C"
13688#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013689char readline ();
13690int
13691main ()
13692{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013693return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013694 ;
13695 return 0;
13696}
13697_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013698if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013699 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013700fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013701rm -f core conftest.err conftest.$ac_objext \
13702 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013703 if test $py_cv_lib_readline = yes; then
13704 break
13705 fi
13706done
13707# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
13708#AC_SUBST([READLINE_LIBS])
Gregory P. Smithe080cdf2008-09-07 19:19:04 +000013709if test $py_cv_lib_readline = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
13711$as_echo "none" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013712else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
13714$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013715
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013716$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013717
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013718fi
13719
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013720# check for readline 2.1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
13722$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013723if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013724 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013725else
13726 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013727LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013728cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013729/* end confdefs.h. */
13730
Martin v. Löwiseba40652007-08-30 20:10:57 +000013731/* Override any GCC internal prototype to avoid an error.
13732 Use char because int might match the return type of a GCC
13733 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013734#ifdef __cplusplus
13735extern "C"
13736#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013737char rl_callback_handler_install ();
13738int
13739main ()
13740{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013741return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013742 ;
13743 return 0;
13744}
13745_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013746if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013747 ac_cv_lib_readline_rl_callback_handler_install=yes
13748else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013749 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013750fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013751rm -f core conftest.err conftest.$ac_objext \
13752 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013753LIBS=$ac_check_lib_save_LIBS
13754fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013755{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
13756$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013757if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013758
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013759$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013760
13761fi
13762
13763
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013764# check for readline 2.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013765cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013766/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013767#include <readline/readline.h>
13768_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013769if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013770 have_readline=yes
13771else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013772 have_readline=no
Matthias Klosec511b472010-05-08 11:01:39 +000013773
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013774fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013775rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013776if test $have_readline = yes
13777then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013778 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013779/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013780#include <readline/readline.h>
13781
13782_ACEOF
13783if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013784 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013785
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013786$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013787
13788fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000013789rm -f conftest*
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000013790
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013791 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000013792/* end confdefs.h. */
13793#include <readline/readline.h>
13794
13795_ACEOF
13796if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013797 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000013798
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013799$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000013800
13801fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000013802rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013803
13804fi
13805
Martin v. Löwis0daad592001-09-30 21:09:59 +000013806# check for readline 4.0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
13808$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013809if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013810 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000013811else
Martin v. Löwis11437992002-04-12 09:54:03 +000013812 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013813LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013814cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013815/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013816
Martin v. Löwiseba40652007-08-30 20:10:57 +000013817/* Override any GCC internal prototype to avoid an error.
13818 Use char because int might match the return type of a GCC
13819 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013820#ifdef __cplusplus
13821extern "C"
13822#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013823char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013824int
13825main ()
13826{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013827return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013828 ;
13829 return 0;
13830}
13831_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013832if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013833 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000013834else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013835 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000013836fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013837rm -f core conftest.err conftest.$ac_objext \
13838 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013839LIBS=$ac_check_lib_save_LIBS
13840fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013841{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
13842$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013843if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013844
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013845$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000013846
Martin v. Löwis0daad592001-09-30 21:09:59 +000013847fi
13848
Michael W. Hudson54241132001-12-07 15:38:26 +000013849
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013850# also in 4.0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
13852$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013853if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013854 $as_echo_n "(cached) " >&6
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013855else
13856 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013857LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013858cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013859/* end confdefs.h. */
13860
13861/* Override any GCC internal prototype to avoid an error.
13862 Use char because int might match the return type of a GCC
13863 builtin and then its argument prototype would still apply. */
13864#ifdef __cplusplus
13865extern "C"
13866#endif
13867char rl_completion_display_matches_hook ();
13868int
13869main ()
13870{
13871return rl_completion_display_matches_hook ();
13872 ;
13873 return 0;
13874}
13875_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013876if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013877 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
13878else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013879 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013880fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013881rm -f core conftest.err conftest.$ac_objext \
13882 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013883LIBS=$ac_check_lib_save_LIBS
13884fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013885{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
13886$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013887if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013888
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013889$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013890
13891fi
13892
13893
Martin v. Löwis0daad592001-09-30 21:09:59 +000013894# check for readline 4.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
13896$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013897if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013898 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000013899else
Martin v. Löwis11437992002-04-12 09:54:03 +000013900 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013901LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013902cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013903/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013904
Martin v. Löwiseba40652007-08-30 20:10:57 +000013905/* Override any GCC internal prototype to avoid an error.
13906 Use char because int might match the return type of a GCC
13907 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013908#ifdef __cplusplus
13909extern "C"
13910#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013911char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013912int
13913main ()
13914{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013915return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013916 ;
13917 return 0;
13918}
13919_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013920if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013921 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000013922else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013923 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000013924fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013925rm -f core conftest.err conftest.$ac_objext \
13926 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013927LIBS=$ac_check_lib_save_LIBS
13928fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013929{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
13930$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013931if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013932
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013933$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000013934
Guido van Rossum353ae582001-07-10 16:45:32 +000013935fi
13936
Jack Jansendd19cf82001-12-06 22:36:17 +000013937
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013938# also in readline 4.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013939cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013940/* end confdefs.h. */
13941#include <readline/readline.h>
13942_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013943if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013944 have_readline=yes
13945else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013946 have_readline=no
Matthias Klosec511b472010-05-08 11:01:39 +000013947
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013948fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013949rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013950if test $have_readline = yes
13951then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013952 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013953/* end confdefs.h. */
13954#include <readline/readline.h>
13955
13956_ACEOF
13957if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013958 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013959
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013960$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013961
13962fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000013963rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013964
13965fi
13966
Martin v. Löwis82bca632006-02-10 20:49:30 +000013967# End of readline checks: restore LIBS
13968LIBS=$LIBS_no_readline
13969
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013970{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
13971$as_echo_n "checking for broken nice()... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013972if ${ac_cv_broken_nice+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013973 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013974else
Martin v. Löwis11437992002-04-12 09:54:03 +000013975
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013976if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013977 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013978else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013979 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013980/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013981
13982int main()
13983{
13984 int val1 = nice(1);
13985 if (val1 != -1 && val1 == nice(2))
13986 exit(0);
13987 exit(1);
13988}
13989
Martin v. Löwis11437992002-04-12 09:54:03 +000013990_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013991if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013992 ac_cv_broken_nice=yes
13993else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013994 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013995fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013996rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13997 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013998fi
13999
Martin v. Löwiseba40652007-08-30 20:10:57 +000014000fi
14001
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014002{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
14003$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014004if test "$ac_cv_broken_nice" = yes
14005then
Martin v. Löwis11437992002-04-12 09:54:03 +000014006
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014007$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014008
14009fi
14010
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
14012$as_echo_n "checking for broken poll()... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014013if ${ac_cv_broken_poll+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014014 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014015else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014016 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014017 ac_cv_broken_poll=no
14018else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014019 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014020/* end confdefs.h. */
14021
14022#include <poll.h>
14023
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014024int main()
14025{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014026 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014027 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014028
14029 close (42);
14030
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014031 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014032 if (poll_test < 0)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014033 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014034 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014035 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014036 else
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014037 return 1;
14038}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014039
14040_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014041if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014042 ac_cv_broken_poll=yes
14043else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014044 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014045fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014046rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14047 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014048fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014049
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014050fi
14051
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014052{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
14053$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014054if test "$ac_cv_broken_poll" = yes
14055then
14056
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014057$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014058
14059fi
14060
Brett Cannon43802422005-02-10 20:48:03 +000014061# 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 +000014062# (which is not required by ISO C or UNIX spec) and/or if we support
14063# tzname[]
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014064ac_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 +000014065#include <$ac_cv_struct_tm>
14066
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014067"
Matthias Klose3cef2a92012-03-14 23:39:33 +010014068if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000014069
14070cat >>confdefs.h <<_ACEOF
14071#define HAVE_STRUCT_TM_TM_ZONE 1
14072_ACEOF
14073
14074
14075fi
14076
14077if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
14078
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014079$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014080
14081else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014082 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
14083"
Matthias Klose3cef2a92012-03-14 23:39:33 +010014084if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014085 ac_have_decl=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000014086else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014087 ac_have_decl=0
Martin v. Löwiseba40652007-08-30 20:10:57 +000014088fi
14089
Martin v. Löwiseba40652007-08-30 20:10:57 +000014090cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014091#define HAVE_DECL_TZNAME $ac_have_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +000014092_ACEOF
14093
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014094 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
14095$as_echo_n "checking for tzname... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014096if ${ac_cv_var_tzname+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014097 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000014098else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014099 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014100/* end confdefs.h. */
14101#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000014102#if !HAVE_DECL_TZNAME
14103extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000014104#endif
14105
14106int
14107main ()
14108{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014109return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000014110 ;
14111 return 0;
14112}
14113_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014114if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000014115 ac_cv_var_tzname=yes
14116else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014117 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000014118fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014119rm -f core conftest.err conftest.$ac_objext \
14120 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014121fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014122{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
14123$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000014124 if test $ac_cv_var_tzname = yes; then
14125
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014126$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014127
14128 fi
14129fi
14130
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014131
Martin v. Löwis1d459062005-03-14 21:23:33 +000014132# check tzset(3) exists and works like we expect it to
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
14134$as_echo_n "checking for working tzset()... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014135if ${ac_cv_working_tzset+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014136 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014137else
14138
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014139if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014140 ac_cv_working_tzset=no
14141else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014142 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014143/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014144
14145#include <stdlib.h>
14146#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000014147#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000014148
14149#if HAVE_TZNAME
14150extern char *tzname[];
14151#endif
14152
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014153int main()
14154{
Brett Cannon18367812003-09-19 00:59:16 +000014155 /* Note that we need to ensure that not only does tzset(3)
14156 do 'something' with localtime, but it works as documented
14157 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000014158 This includes making sure that tzname is set properly if
14159 tm->tm_zone does not exist since it is the alternative way
14160 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000014161
14162 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000014163 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000014164 */
14165
Martin v. Löwis1d459062005-03-14 21:23:33 +000014166 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000014167 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
14168
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014169 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014170 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014171 if (localtime(&groundhogday)->tm_hour != 0)
14172 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014173#if HAVE_TZNAME
14174 /* For UTC, tzname[1] is sometimes "", sometimes " " */
14175 if (strcmp(tzname[0], "UTC") ||
14176 (tzname[1][0] != 0 && tzname[1][0] != ' '))
14177 exit(1);
14178#endif
Brett Cannon18367812003-09-19 00:59:16 +000014179
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014180 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014181 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014182 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014183 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014184#if HAVE_TZNAME
14185 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
14186 exit(1);
14187#endif
Brett Cannon18367812003-09-19 00:59:16 +000014188
14189 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
14190 tzset();
14191 if (localtime(&groundhogday)->tm_hour != 11)
14192 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014193#if HAVE_TZNAME
14194 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
14195 exit(1);
14196#endif
14197
14198#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000014199 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
14200 exit(1);
14201 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
14202 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014203#endif
Brett Cannon18367812003-09-19 00:59:16 +000014204
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014205 exit(0);
14206}
14207
14208_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014209if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014210 ac_cv_working_tzset=yes
14211else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014212 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014213fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014214rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14215 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014216fi
14217
Martin v. Löwiseba40652007-08-30 20:10:57 +000014218fi
14219
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014220{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
14221$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014222if test "$ac_cv_working_tzset" = yes
14223then
14224
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014225$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014226
14227fi
14228
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014229# Look for subsecond timestamps in struct stat
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014230{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
14231$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014232if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014233 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014234else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014235 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014236/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014237#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014238int
14239main ()
14240{
14241
14242struct stat st;
14243st.st_mtim.tv_nsec = 1;
14244
14245 ;
14246 return 0;
14247}
14248_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014249if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000014250 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014251else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014252 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014253fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014254rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14255fi
14256
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014257{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
14258$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014259if test "$ac_cv_stat_tv_nsec" = yes
14260then
14261
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014262$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014263
14264fi
14265
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014266# Look for BSD style subsecond timestamps in struct stat
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
14268$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014269if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014270 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014271else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014272 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014273/* end confdefs.h. */
14274#include <sys/stat.h>
14275int
14276main ()
14277{
14278
14279struct stat st;
14280st.st_mtimespec.tv_nsec = 1;
14281
14282 ;
14283 return 0;
14284}
14285_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014286if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014287 ac_cv_stat_tv_nsec2=yes
14288else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014289 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014290fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014291rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14292fi
14293
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014294{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
14295$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014296if test "$ac_cv_stat_tv_nsec2" = yes
14297then
14298
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014299$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014300
14301fi
14302
doko@ubuntu.comf27ec3e2014-04-17 20:11:19 +020014303# first curses configure check
14304ac_save_cppflags="$CPPFLAGS"
14305CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
14306
14307for ac_header in curses.h ncurses.h
14308do :
14309 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14310ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
14311if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
14312 cat >>confdefs.h <<_ACEOF
14313#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14314_ACEOF
14315
14316fi
14317
14318done
14319
14320
14321# On Solaris, term.h requires curses.h
14322for ac_header in term.h
14323do :
14324 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
14325#ifdef HAVE_CURSES_H
14326#include <curses.h>
14327#endif
14328
14329"
14330if test "x$ac_cv_header_term_h" = xyes; then :
14331 cat >>confdefs.h <<_ACEOF
14332#define HAVE_TERM_H 1
14333_ACEOF
14334
14335fi
14336
14337done
14338
14339
Jack Jansen666b1e72001-10-31 12:11:48 +000014340# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
14342$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014343if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014344 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014345else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014346 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014347/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014348#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014349int
14350main ()
14351{
Jack Jansen666b1e72001-10-31 12:11:48 +000014352
14353 int rtn;
14354 rtn = mvwdelch(0,0,0);
14355
Martin v. Löwis11437992002-04-12 09:54:03 +000014356 ;
14357 return 0;
14358}
14359_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014360if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014361 ac_cv_mvwdelch_is_expression=yes
14362else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014363 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014364fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014365rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14366fi
14367
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014368{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
14369$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000014370
14371if test "$ac_cv_mvwdelch_is_expression" = yes
14372then
Martin v. Löwis11437992002-04-12 09:54:03 +000014373
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014374$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014375
14376fi
14377
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
14379$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014380if ${ac_cv_window_has_flags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014381 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014382else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014383 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014384/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014385#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014386int
14387main ()
14388{
Jack Jansen666b1e72001-10-31 12:11:48 +000014389
14390 WINDOW *w;
14391 w->_flags = 0;
14392
Martin v. Löwis11437992002-04-12 09:54:03 +000014393 ;
14394 return 0;
14395}
14396_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014397if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014398 ac_cv_window_has_flags=yes
14399else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014400 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014401fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014402rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14403fi
14404
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014405{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
14406$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000014407
Jack Jansen666b1e72001-10-31 12:11:48 +000014408
14409if test "$ac_cv_window_has_flags" = yes
14410then
Martin v. Löwis11437992002-04-12 09:54:03 +000014411
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014412$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014413
14414fi
14415
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
14417$as_echo_n "checking for is_term_resized... " >&6; }
14418cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000014419/* end confdefs.h. */
14420#include <curses.h>
14421int
14422main ()
14423{
14424void *x=is_term_resized
14425 ;
14426 return 0;
14427}
14428_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014429if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000014430
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014431$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000014432
Matthias Klosec511b472010-05-08 11:01:39 +000014433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014434$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014435else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14437$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014438
14439fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014440rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14441
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
14443$as_echo_n "checking for resize_term... " >&6; }
14444cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000014445/* end confdefs.h. */
14446#include <curses.h>
14447int
14448main ()
14449{
14450void *x=resize_term
14451 ;
14452 return 0;
14453}
14454_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014455if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000014456
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014457$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000014458
Matthias Klosec511b472010-05-08 11:01:39 +000014459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014460$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014461else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14463$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014464
14465fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014466rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14467
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
14469$as_echo_n "checking for resizeterm... " >&6; }
14470cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000014471/* end confdefs.h. */
14472#include <curses.h>
14473int
14474main ()
14475{
14476void *x=resizeterm
14477 ;
14478 return 0;
14479}
14480_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014481if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000014482
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014483$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000014484
Matthias Klosec511b472010-05-08 11:01:39 +000014485 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014486$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014487else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14489$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014490
14491fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014492rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.comf27ec3e2014-04-17 20:11:19 +020014493# last curses configure check
14494CPPFLAGS=$ac_save_cppflags
Martin v. Löwiseba40652007-08-30 20:10:57 +000014495
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
14497$as_echo "$as_me: checking for device files" >&6;}
14498
14499if test "x$cross_compiling" = xyes; then
14500 if test "${ac_cv_file__dev_ptmx+set}" != set; then
14501 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14502$as_echo_n "checking for /dev/ptmx... " >&6; }
14503 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14504$as_echo "not set" >&6; }
14505 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14506 fi
14507 if test "${ac_cv_file__dev_ptc+set}" != set; then
14508 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14509$as_echo_n "checking for /dev/ptc... " >&6; }
14510 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14511$as_echo "not set" >&6; }
14512 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14513 fi
14514fi
14515
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14517$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014518if ${ac_cv_file__dev_ptmx+:} false; then :
14519 $as_echo_n "(cached) " >&6
14520else
14521 test "$cross_compiling" = yes &&
14522 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14523if test -r "/dev/ptmx"; then
14524 ac_cv_file__dev_ptmx=yes
14525else
14526 ac_cv_file__dev_ptmx=no
14527fi
14528fi
14529{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
14530$as_echo "$ac_cv_file__dev_ptmx" >&6; }
14531if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Martin v. Löwisfefbc202006-10-17 18:59:23 +000014532
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014533fi
14534
14535if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014536
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014537$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014538
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014539fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14541$as_echo_n "checking for /dev/ptc... " >&6; }
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014542if ${ac_cv_file__dev_ptc+:} false; then :
14543 $as_echo_n "(cached) " >&6
14544else
14545 test "$cross_compiling" = yes &&
14546 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14547if test -r "/dev/ptc"; then
14548 ac_cv_file__dev_ptc=yes
14549else
14550 ac_cv_file__dev_ptc=no
14551fi
14552fi
14553{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
14554$as_echo "$ac_cv_file__dev_ptc" >&6; }
14555if test "x$ac_cv_file__dev_ptc" = xyes; then :
Martin v. Löwisfefbc202006-10-17 18:59:23 +000014556
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014557fi
14558
14559if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000014560
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014561$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000014562
Neal Norwitz865400f2003-03-21 01:42:58 +000014563fi
14564
Mark Dickinson82864d12009-11-15 16:18:58 +000014565if test "$have_long_long" = yes
14566then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014567 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
14568$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014569 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014570 $as_echo_n "(cached) " >&6
Mark Dickinson82864d12009-11-15 16:18:58 +000014571else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014572 if test "$cross_compiling" = yes; then :
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014573 ac_cv_have_long_long_format="cross -- assuming no"
14574 if test x$GCC = xyes; then
14575 save_CFLAGS=$CFLAGS
14576 CFLAGS="$CFLAGS -Werror -Wformat"
14577 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14578/* end confdefs.h. */
14579
14580 #include <stdio.h>
14581 #include <stddef.h>
14582
14583int
14584main ()
14585{
14586
14587 char *buffer;
14588 sprintf(buffer, "%lld", (long long)123);
14589 sprintf(buffer, "%lld", (long long)-123);
14590 sprintf(buffer, "%llu", (unsigned long long)123);
14591
14592 ;
14593 return 0;
14594}
14595_ACEOF
14596if ac_fn_c_try_compile "$LINENO"; then :
14597 ac_cv_have_long_long_format=yes
14598
14599fi
14600rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14601 CFLAGS=$save_CFLAGS
14602 fi
Mark Dickinson82864d12009-11-15 16:18:58 +000014603else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014604 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson82864d12009-11-15 16:18:58 +000014605/* end confdefs.h. */
14606
14607 #include <stdio.h>
14608 #include <stddef.h>
14609 #include <string.h>
14610
14611 #ifdef HAVE_SYS_TYPES_H
14612 #include <sys/types.h>
14613 #endif
14614
14615 int main()
14616 {
14617 char buffer[256];
14618
14619 if (sprintf(buffer, "%lld", (long long)123) < 0)
14620 return 1;
14621 if (strcmp(buffer, "123"))
14622 return 1;
14623
14624 if (sprintf(buffer, "%lld", (long long)-123) < 0)
14625 return 1;
14626 if (strcmp(buffer, "-123"))
14627 return 1;
14628
14629 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
14630 return 1;
14631 if (strcmp(buffer, "123"))
14632 return 1;
14633
14634 return 0;
14635 }
14636
14637_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014638if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson82864d12009-11-15 16:18:58 +000014639 ac_cv_have_long_long_format=yes
14640else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014641 ac_cv_have_long_long_format=no
Mark Dickinson82864d12009-11-15 16:18:58 +000014642fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014643rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14644 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson82864d12009-11-15 16:18:58 +000014645fi
14646
14647
Mark Dickinson82864d12009-11-15 16:18:58 +000014648fi
14649
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
14651$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson82864d12009-11-15 16:18:58 +000014652fi
14653
Mark Dickinson5ce84742009-12-31 20:48:04 +000014654if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson82864d12009-11-15 16:18:58 +000014655then
14656
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014657$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson82864d12009-11-15 16:18:58 +000014658
14659fi
14660
Ronald Oussoren315cd0c2009-11-19 16:25:21 +000014661if test $ac_sys_system = Darwin
14662then
14663 LIBS="$LIBS -framework CoreFoundation"
14664fi
14665
Mark Dickinson82864d12009-11-15 16:18:58 +000014666
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
14668$as_echo_n "checking for %zd printf() format support... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014669if ${ac_cv_have_size_t_format+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014670 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014671else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014672 if test "$cross_compiling" = yes; then :
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000014673 ac_cv_have_size_t_format="cross -- assuming yes"
14674
Brett Cannon09d12362006-05-11 05:11:33 +000014675else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014676 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon09d12362006-05-11 05:11:33 +000014677/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014678
Brett Cannon09d12362006-05-11 05:11:33 +000014679#include <stdio.h>
14680#include <stddef.h>
14681#include <string.h>
14682
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000014683#ifdef HAVE_SYS_TYPES_H
14684#include <sys/types.h>
14685#endif
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000014686
14687#ifdef HAVE_SSIZE_T
14688typedef ssize_t Py_ssize_t;
14689#elif SIZEOF_VOID_P == SIZEOF_LONG
14690typedef long Py_ssize_t;
14691#else
14692typedef int Py_ssize_t;
14693#endif
Brett Cannon09d12362006-05-11 05:11:33 +000014694
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000014695int main()
14696{
14697 char buffer[256];
14698
Brett Cannon09d12362006-05-11 05:11:33 +000014699 if(sprintf(buffer, "%zd", (size_t)123) < 0)
14700 return 1;
14701
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000014702 if (strcmp(buffer, "123"))
14703 return 1;
14704
14705 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
14706 return 1;
14707
14708 if (strcmp(buffer, "-123"))
Brett Cannon09d12362006-05-11 05:11:33 +000014709 return 1;
14710
14711 return 0;
14712}
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014713
Brett Cannon09d12362006-05-11 05:11:33 +000014714_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014715if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014716 ac_cv_have_size_t_format=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014717else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014718 ac_cv_have_size_t_format=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014719fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014720rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14721 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000014722fi
14723
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014724fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014725{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
14726$as_echo "$ac_cv_have_size_t_format" >&6; }
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000014727if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014728
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014729$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014730
14731fi
14732
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014733ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000014734#ifdef HAVE_SYS_TYPES_H
14735#include <sys/types.h>
14736#endif
14737#ifdef HAVE_SYS_SOCKET_H
14738#include <sys/socket.h>
14739#endif
14740
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014741"
Matthias Klose3cef2a92012-03-14 23:39:33 +010014742if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000014743
Martin v. Löwis11437992002-04-12 09:54:03 +000014744else
Guido van Rossum95713eb2000-05-18 20:53:31 +000014745
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014746$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000014747
14748fi
14749
Michael W. Hudson54241132001-12-07 15:38:26 +000014750
Benjamin Peterson7497e912010-10-16 00:53:39 +000014751case $ac_sys_system in
14752AIX*)
14753
14754$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
14755 ;;
14756esac
14757
14758
Michael W. Hudson54241132001-12-07 15:38:26 +000014759
14760
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000014761for h in `(cd $srcdir;echo Python/thread_*.h)`
14762do
14763 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
14764done
14765
Michael W. Hudson54241132001-12-07 15:38:26 +000014766
Neal Norwitzd24499d2005-12-18 21:36:39 +000014767SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
14769$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014770for dir in $SRCDIRS; do
14771 if test ! -d $dir; then
14772 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000014773 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014774done
Benjamin Peterson2c992a02015-05-28 12:45:31 -050014775
14776# BEGIN_COMPUTED_GOTO
14777# Check for --with-computed-gotos
14778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
14779$as_echo_n "checking for --with-computed-gotos... " >&6; }
14780
14781# Check whether --with-computed-gotos was given.
14782if test "${with_computed_gotos+set}" = set; then :
14783 withval=$with_computed_gotos;
14784if test "$withval" = yes
14785then
14786
14787$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
14788
14789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14790$as_echo "yes" >&6; }
14791fi
14792if test "$withval" = no
14793then
14794
14795$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
14796
14797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14798$as_echo "no" >&6; }
14799fi
14800
14801else
14802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14803$as_echo "no value specified" >&6; }
14804fi
14805
14806
14807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
14808$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
14809if ${ac_cv_computed_gotos+:} false; then :
14810 $as_echo_n "(cached) " >&6
14811else
14812 if test "$cross_compiling" = yes; then :
14813 if test "${with_computed_gotos+set}" = set; then
14814 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
14815 else
14816 ac_cv_computed_gotos=no
14817 fi
14818else
14819 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14820/* end confdefs.h. */
14821
14822int main(int argc, char **argv)
14823{
14824 static void *targets[1] = { &&LABEL1 };
14825 goto LABEL2;
14826LABEL1:
14827 return 0;
14828LABEL2:
14829 goto *targets[0];
14830 return 1;
14831}
14832
14833_ACEOF
14834if ac_fn_c_try_run "$LINENO"; then :
14835 ac_cv_computed_gotos=yes
14836else
14837 ac_cv_computed_gotos=no
14838fi
14839rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14840 conftest.$ac_objext conftest.beam conftest.$ac_ext
14841fi
14842
14843fi
14844
14845{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
14846$as_echo "$ac_cv_computed_gotos" >&6; }
14847case "$ac_cv_computed_gotos" in yes*)
14848
14849$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
14850
14851esac
14852# END_COMPUTED_GOTO
14853
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014854{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
14855$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000014856
Ned Deily3f1d0b32014-11-20 02:11:03 -080014857# ensurepip option
14858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
14859$as_echo_n "checking for ensurepip... " >&6; }
14860
14861# Check whether --with-ensurepip was given.
14862if test "${with_ensurepip+set}" = set; then :
14863 withval=$with_ensurepip;
14864else
14865 with_ensurepip=no
14866fi
14867
14868case $with_ensurepip in #(
14869 yes|upgrade) :
14870 ENSUREPIP=upgrade ;; #(
14871 install) :
14872 ENSUREPIP=install ;; #(
14873 no) :
14874 ENSUREPIP=no ;; #(
14875 *) :
14876 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
14877esac
14878{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
14879$as_echo "$ENSUREPIP" >&6; }
14880
14881
Guido van Rossum627b2d71993-12-24 10:39:16 +000014882# generate output files
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000014883ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000014884
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000014885ac_config_files="$ac_config_files Modules/ld_so_aix"
14886
Martin v. Löwis11437992002-04-12 09:54:03 +000014887cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014888# This file is a shell script that caches the results of configure
14889# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000014890# scripts and configure runs, see configure's option --config-cache.
14891# It is not useful on other systems. If it contains results you don't
14892# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014893#
Martin v. Löwis11437992002-04-12 09:54:03 +000014894# config.status only pays attention to the cache file if you give it
14895# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014896#
Skip Montanaro6dead952003-09-25 14:50:04 +000014897# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000014898# loading this file, other *unset* `ac_cv_foo' will be assigned the
14899# following values.
14900
14901_ACEOF
14902
Guido van Rossumf78abae1997-01-21 22:02:36 +000014903# The following way of writing the cache mishandles newlines in values,
14904# but we know of no workaround that is simple, portable, and efficient.
Martin v. Löwiseba40652007-08-30 20:10:57 +000014905# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014906# Ultrix sh set writes to stderr and can't be redirected directly,
14907# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwiseba40652007-08-30 20:10:57 +000014908(
14909 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
14910 eval ac_val=\$$ac_var
14911 case $ac_val in #(
14912 *${as_nl}*)
14913 case $ac_var in #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014914 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
14915$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014916 esac
14917 case $ac_var in #(
14918 _ | IFS | as_nl) ;; #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014919 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
14920 *) { eval $ac_var=; unset $ac_var;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014921 esac ;;
14922 esac
14923 done
14924
Martin v. Löwis11437992002-04-12 09:54:03 +000014925 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +000014926 case $as_nl`(ac_space=' '; set) 2>&1` in #(
14927 *${as_nl}ac_space=\ *)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014928 # `set' does not quote correctly, so add quotes: double-quote
14929 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000014930 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014931 "s/'/'\\\\''/g;
14932 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Martin v. Löwiseba40652007-08-30 20:10:57 +000014933 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000014934 *)
14935 # `set' quotes correctly as required by POSIX, so do not add quotes.
Martin v. Löwiseba40652007-08-30 20:10:57 +000014936 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000014937 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014938 esac |
14939 sort
14940) |
Martin v. Löwis11437992002-04-12 09:54:03 +000014941 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000014942 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000014943 t clear
Martin v. Löwiseba40652007-08-30 20:10:57 +000014944 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000014945 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
14946 t end
Martin v. Löwiseba40652007-08-30 20:10:57 +000014947 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
14948 :end' >>confcache
14949if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
14950 if test -w "$cache_file"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +010014951 if test "x$cache_file" != "x/dev/null"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014952 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
14953$as_echo "$as_me: updating cache $cache_file" >&6;}
Matthias Klose3cef2a92012-03-14 23:39:33 +010014954 if test ! -f "$cache_file" || test -h "$cache_file"; then
14955 cat confcache >"$cache_file"
14956 else
14957 case $cache_file in #(
14958 */* | ?:*)
14959 mv -f confcache "$cache_file"$$ &&
14960 mv -f "$cache_file"$$ "$cache_file" ;; #(
14961 *)
14962 mv -f confcache "$cache_file" ;;
14963 esac
14964 fi
14965 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014966 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014967 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
14968$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014969 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014970fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014971rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000014972
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014973test "x$prefix" = xNONE && prefix=$ac_default_prefix
14974# Let make expand exec_prefix.
14975test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000014976
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014977DEFS=-DHAVE_CONFIG_H
14978
Skip Montanaro6dead952003-09-25 14:50:04 +000014979ac_libobjs=
14980ac_ltlibobjs=
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014981U=
Skip Montanaro6dead952003-09-25 14:50:04 +000014982for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
14983 # 1. Remove the extension, and $U if already installed.
Martin v. Löwiseba40652007-08-30 20:10:57 +000014984 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014985 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Martin v. Löwiseba40652007-08-30 20:10:57 +000014986 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
14987 # will be set to the directory where LIBOBJS objects are built.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014988 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
14989 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000014990done
14991LIBOBJS=$ac_libobjs
14992
14993LTLIBOBJS=$ac_ltlibobjs
14994
14995
Martin v. Löwis11437992002-04-12 09:54:03 +000014996
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014997
Matthias Klose3cef2a92012-03-14 23:39:33 +010014998: "${CONFIG_STATUS=./config.status}"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014999ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000015000ac_clean_files_save=$ac_clean_files
15001ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015002{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
15003$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
15004as_write_fail=0
15005cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015006#! $SHELL
15007# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015008# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015009# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000015010# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015011
Martin v. Löwis11437992002-04-12 09:54:03 +000015012debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000015013ac_cs_recheck=false
15014ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000015015
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015016SHELL=\${CONFIG_SHELL-$SHELL}
15017export SHELL
15018_ASEOF
15019cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
15020## -------------------- ##
15021## M4sh Initialization. ##
15022## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000015023
Martin v. Löwiseba40652007-08-30 20:10:57 +000015024# Be more Bourne compatible
15025DUALCASE=1; export DUALCASE # for MKS sh
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015026if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015027 emulate sh
15028 NULLCMD=:
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015029 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000015030 # is contrary to our usage. Disable this feature.
15031 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000015032 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000015033else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015034 case `(set -o) 2>/dev/null` in #(
15035 *posix*) :
15036 set -o posix ;; #(
15037 *) :
15038 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015039esac
Martin v. Löwis11437992002-04-12 09:54:03 +000015040fi
Michael W. Hudson54241132001-12-07 15:38:26 +000015041
Skip Montanaro6dead952003-09-25 14:50:04 +000015042
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015043as_nl='
15044'
15045export as_nl
15046# Printing a long string crashes Solaris 7 /usr/bin/printf.
15047as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
15048as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
15049as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
15050# Prefer a ksh shell builtin over an external printf program on Solaris,
15051# but without wasting forks for bash or zsh.
15052if test -z "$BASH_VERSION$ZSH_VERSION" \
15053 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
15054 as_echo='print -r --'
15055 as_echo_n='print -rn --'
15056elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
15057 as_echo='printf %s\n'
15058 as_echo_n='printf %s'
15059else
15060 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
15061 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
15062 as_echo_n='/usr/ucb/echo -n'
15063 else
15064 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
15065 as_echo_n_body='eval
15066 arg=$1;
15067 case $arg in #(
15068 *"$as_nl"*)
15069 expr "X$arg" : "X\\(.*\\)$as_nl";
15070 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
15071 esac;
15072 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
15073 '
15074 export as_echo_n_body
15075 as_echo_n='sh -c $as_echo_n_body as_echo'
15076 fi
15077 export as_echo_body
15078 as_echo='sh -c $as_echo_body as_echo'
15079fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015080
15081# The user is always right.
15082if test "${PATH_SEPARATOR+set}" != set; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015083 PATH_SEPARATOR=:
15084 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
15085 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
15086 PATH_SEPARATOR=';'
15087 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000015088fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015089
Martin v. Löwiseba40652007-08-30 20:10:57 +000015090
15091# IFS
15092# We need space, tab and new line, in precisely that order. Quoting is
15093# there to prevent editors from complaining about space-tab.
15094# (If _AS_PATH_WALK were called with IFS unset, it would disable word
15095# splitting by setting IFS to empty value.)
Martin v. Löwiseba40652007-08-30 20:10:57 +000015096IFS=" "" $as_nl"
15097
15098# Find who we are. Look in the path if we contain no directory separator.
Matthias Klose3cef2a92012-03-14 23:39:33 +010015099as_myself=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015100case $0 in #((
Martin v. Löwiseba40652007-08-30 20:10:57 +000015101 *[\\/]* ) as_myself=$0 ;;
15102 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000015103for as_dir in $PATH
15104do
15105 IFS=$as_save_IFS
15106 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015107 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
15108 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000015109IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000015110
Martin v. Löwiseba40652007-08-30 20:10:57 +000015111 ;;
15112esac
15113# We did not find ourselves, most probably we were run as `sh COMMAND'
15114# in which case we are not to be found in the path.
15115if test "x$as_myself" = x; then
15116 as_myself=$0
15117fi
15118if test ! -f "$as_myself"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015119 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
15120 exit 1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015121fi
15122
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015123# Unset variables that we do not need and which cause bugs (e.g. in
15124# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
15125# suppresses any "Segmentation fault" message there. '((' could
15126# trigger a bug in pdksh 5.2.14.
15127for as_var in BASH_ENV ENV MAIL MAILPATH
15128do eval test x\${$as_var+set} = xset \
15129 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Martin v. Löwiseba40652007-08-30 20:10:57 +000015130done
15131PS1='$ '
15132PS2='> '
15133PS4='+ '
15134
15135# NLS nuisances.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015136LC_ALL=C
15137export LC_ALL
15138LANGUAGE=C
15139export LANGUAGE
Martin v. Löwiseba40652007-08-30 20:10:57 +000015140
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015141# CDPATH.
15142(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
15143
15144
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015145# as_fn_error STATUS ERROR [LINENO LOG_FD]
15146# ----------------------------------------
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015147# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
15148# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015149# script with STATUS, using 1 if that was 0.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015150as_fn_error ()
15151{
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015152 as_status=$1; test $as_status -eq 0 && as_status=1
15153 if test "$4"; then
15154 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
15155 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015156 fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015157 $as_echo "$as_me: error: $2" >&2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015158 as_fn_exit $as_status
15159} # as_fn_error
15160
15161
15162# as_fn_set_status STATUS
15163# -----------------------
15164# Set $? to STATUS, without forking.
15165as_fn_set_status ()
15166{
15167 return $1
15168} # as_fn_set_status
15169
15170# as_fn_exit STATUS
15171# -----------------
15172# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
15173as_fn_exit ()
15174{
15175 set +e
15176 as_fn_set_status $1
15177 exit $1
15178} # as_fn_exit
15179
15180# as_fn_unset VAR
15181# ---------------
15182# Portably unset VAR.
15183as_fn_unset ()
15184{
15185 { eval $1=; unset $1;}
15186}
15187as_unset=as_fn_unset
15188# as_fn_append VAR VALUE
15189# ----------------------
15190# Append the text in VALUE to the end of the definition contained in VAR. Take
15191# advantage of any shell optimizations that allow amortized linear growth over
15192# repeated appends, instead of the typical quadratic growth present in naive
15193# implementations.
15194if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
15195 eval 'as_fn_append ()
15196 {
15197 eval $1+=\$2
15198 }'
15199else
15200 as_fn_append ()
15201 {
15202 eval $1=\$$1\$2
15203 }
15204fi # as_fn_append
15205
15206# as_fn_arith ARG...
15207# ------------------
15208# Perform arithmetic evaluation on the ARGs, and store the result in the
15209# global $as_val. Take advantage of shells that can avoid forks. The arguments
15210# must be portable across $(()) and expr.
15211if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
15212 eval 'as_fn_arith ()
15213 {
15214 as_val=$(( $* ))
15215 }'
15216else
15217 as_fn_arith ()
15218 {
15219 as_val=`expr "$@" || test $? -eq 1`
15220 }
15221fi # as_fn_arith
15222
15223
Martin v. Löwiseba40652007-08-30 20:10:57 +000015224if expr a : '\(a\)' >/dev/null 2>&1 &&
15225 test "X`expr 00001 : '.*\(...\)'`" = X001; then
15226 as_expr=expr
15227else
15228 as_expr=false
15229fi
15230
15231if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
15232 as_basename=basename
15233else
15234 as_basename=false
15235fi
15236
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015237if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
15238 as_dirname=dirname
15239else
15240 as_dirname=false
15241fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015242
Martin v. Löwiseba40652007-08-30 20:10:57 +000015243as_me=`$as_basename -- "$0" ||
15244$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15245 X"$0" : 'X\(//\)$' \| \
15246 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015247$as_echo X/"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000015248 sed '/^.*\/\([^/][^/]*\)\/*$/{
15249 s//\1/
15250 q
15251 }
15252 /^X\/\(\/\/\)$/{
15253 s//\1/
15254 q
15255 }
15256 /^X\/\(\/\).*/{
15257 s//\1/
15258 q
15259 }
15260 s/.*/./; q'`
15261
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015262# Avoid depending upon Character Ranges.
15263as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15264as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15265as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15266as_cr_digits='0123456789'
15267as_cr_alnum=$as_cr_Letters$as_cr_digits
Martin v. Löwiseba40652007-08-30 20:10:57 +000015268
15269ECHO_C= ECHO_N= ECHO_T=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015270case `echo -n x` in #(((((
Martin v. Löwiseba40652007-08-30 20:10:57 +000015271-n*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015272 case `echo 'xy\c'` in
Martin v. Löwiseba40652007-08-30 20:10:57 +000015273 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015274 xy) ECHO_C='\c';;
15275 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
15276 ECHO_T=' ';;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015277 esac;;
15278*)
15279 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000015280esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015281
Martin v. Löwis11437992002-04-12 09:54:03 +000015282rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +000015283if test -d conf$$.dir; then
15284 rm -f conf$$.dir/conf$$.file
15285else
15286 rm -f conf$$.dir
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015287 mkdir conf$$.dir 2>/dev/null
Martin v. Löwiseba40652007-08-30 20:10:57 +000015288fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015289if (echo >conf$$.file) 2>/dev/null; then
15290 if ln -s conf$$.file conf$$ 2>/dev/null; then
15291 as_ln_s='ln -s'
15292 # ... but there are two gotchas:
15293 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
15294 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015295 # In both cases, we have to default to `cp -pR'.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015296 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015297 as_ln_s='cp -pR'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015298 elif ln conf$$.file conf$$ 2>/dev/null; then
15299 as_ln_s=ln
15300 else
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015301 as_ln_s='cp -pR'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015302 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015303else
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015304 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000015305fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015306rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
15307rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000015308
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015309
15310# as_fn_mkdir_p
15311# -------------
15312# Create "$as_dir" as a directory, including parents if necessary.
15313as_fn_mkdir_p ()
15314{
15315
15316 case $as_dir in #(
15317 -*) as_dir=./$as_dir;;
15318 esac
15319 test -d "$as_dir" || eval $as_mkdir_p || {
15320 as_dirs=
15321 while :; do
15322 case $as_dir in #(
15323 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
15324 *) as_qdir=$as_dir;;
15325 esac
15326 as_dirs="'$as_qdir' $as_dirs"
15327 as_dir=`$as_dirname -- "$as_dir" ||
15328$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15329 X"$as_dir" : 'X\(//\)[^/]' \| \
15330 X"$as_dir" : 'X\(//\)$' \| \
15331 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
15332$as_echo X"$as_dir" |
15333 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15334 s//\1/
15335 q
15336 }
15337 /^X\(\/\/\)[^/].*/{
15338 s//\1/
15339 q
15340 }
15341 /^X\(\/\/\)$/{
15342 s//\1/
15343 q
15344 }
15345 /^X\(\/\).*/{
15346 s//\1/
15347 q
15348 }
15349 s/.*/./; q'`
15350 test -d "$as_dir" && break
15351 done
15352 test -z "$as_dirs" || eval "mkdir $as_dirs"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015353 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015354
15355
15356} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000015357if mkdir -p . 2>/dev/null; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015358 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000015359else
Skip Montanarof0d5f792004-08-15 14:08:23 +000015360 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000015361 as_mkdir_p=false
15362fi
15363
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015364
15365# as_fn_executable_p FILE
15366# -----------------------
15367# Test if FILE is an executable regular file.
15368as_fn_executable_p ()
15369{
15370 test -f "$1" && test -x "$1"
15371} # as_fn_executable_p
15372as_test_x='test -x'
15373as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000015374
15375# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015376as_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 +000015377
15378# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015379as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015380
15381
Martin v. Löwis11437992002-04-12 09:54:03 +000015382exec 6>&1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015383## ----------------------------------- ##
15384## Main body of $CONFIG_STATUS script. ##
15385## ----------------------------------- ##
15386_ASEOF
15387test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015388
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015389cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15390# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000015391# report actual input values of CONFIG_FILES etc. instead of their
Martin v. Löwiseba40652007-08-30 20:10:57 +000015392# values after options handling.
15393ac_log="
Martin v. Löwis174440b2008-10-03 08:59:41 +000015394This file was extended by python $as_me 2.7, which was
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015395generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000015396
15397 CONFIG_FILES = $CONFIG_FILES
15398 CONFIG_HEADERS = $CONFIG_HEADERS
15399 CONFIG_LINKS = $CONFIG_LINKS
15400 CONFIG_COMMANDS = $CONFIG_COMMANDS
15401 $ $0 $@
15402
Martin v. Löwiseba40652007-08-30 20:10:57 +000015403on `(hostname || uname -n) 2>/dev/null | sed 1q`
15404"
15405
Martin v. Löwis11437992002-04-12 09:54:03 +000015406_ACEOF
15407
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015408case $ac_config_files in *"
15409"*) set x $ac_config_files; shift; ac_config_files=$*;;
15410esac
15411
15412case $ac_config_headers in *"
15413"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
15414esac
15415
15416
15417cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015418# Files that config.status was made for.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015419config_files="$ac_config_files"
15420config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000015421
Martin v. Löwiseba40652007-08-30 20:10:57 +000015422_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015423
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015424cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015425ac_cs_usage="\
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015426\`$as_me' instantiates files and other configuration actions
15427from templates according to the current configuration. Unless the files
15428and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000015429
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015430Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000015431
15432 -h, --help print this help, then exit
Martin v. Löwiseba40652007-08-30 20:10:57 +000015433 -V, --version print version number and configuration settings, then exit
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015434 --config print configuration, then exit
15435 -q, --quiet, --silent
15436 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000015437 -d, --debug don't remove temporary files
15438 --recheck update $as_me by reconfiguring in the same conditions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015439 --file=FILE[:TEMPLATE]
15440 instantiate the configuration file FILE
15441 --header=FILE[:TEMPLATE]
15442 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000015443
15444Configuration files:
15445$config_files
15446
15447Configuration headers:
15448$config_headers
15449
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015450Report bugs to <http://bugs.python.org/>."
Skip Montanaro89e975f2007-08-22 19:05:21 +000015451
Martin v. Löwiseba40652007-08-30 20:10:57 +000015452_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015453cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15454ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000015455ac_cs_version="\\
Martin v. Löwis174440b2008-10-03 08:59:41 +000015456python config.status 2.7
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015457configured by $0, generated by GNU Autoconf 2.69,
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015458 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000015459
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015460Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000015461This config.status script is free software; the Free Software Foundation
15462gives unlimited permission to copy, distribute and modify it."
Martin v. Löwiseba40652007-08-30 20:10:57 +000015463
15464ac_pwd='$ac_pwd'
15465srcdir='$srcdir'
15466INSTALL='$INSTALL'
Trent Nelsonf6407a12012-08-30 14:56:13 +000015467MKDIR_P='$MKDIR_P'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015468test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000015469_ACEOF
15470
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015471cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15472# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000015473ac_need_defaults=:
15474while test $# != 0
15475do
15476 case $1 in
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015477 --*=?*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000015478 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15479 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000015480 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000015481 ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015482 --*=)
15483 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15484 ac_optarg=
15485 ac_shift=:
15486 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015487 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000015488 ac_option=$1
15489 ac_optarg=$2
15490 ac_shift=shift
15491 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015492 esac
15493
Skip Montanaro6dead952003-09-25 14:50:04 +000015494 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000015495 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000015496 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15497 ac_cs_recheck=: ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015498 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015499 $as_echo "$ac_cs_version"; exit ;;
15500 --config | --confi | --conf | --con | --co | --c )
15501 $as_echo "$ac_cs_config"; exit ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015502 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000015503 debug=: ;;
15504 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000015505 $ac_shift
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015506 case $ac_optarg in
15507 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015508 '') as_fn_error $? "missing file argument" ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015509 esac
15510 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015511 ac_need_defaults=false;;
15512 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000015513 $ac_shift
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015514 case $ac_optarg in
15515 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15516 esac
15517 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015518 ac_need_defaults=false;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015519 --he | --h)
15520 # Conflict between --help and --header
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015521 as_fn_error $? "ambiguous option: \`$1'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015522Try \`$0 --help' for more information.";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015523 --help | --hel | -h )
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015524 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000015525 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
15526 | -silent | --silent | --silen | --sile | --sil | --si | --s)
15527 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015528
15529 # This is an error.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015530 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015531Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015532
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015533 *) as_fn_append ac_config_targets " $1"
Martin v. Löwiseba40652007-08-30 20:10:57 +000015534 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015535
15536 esac
15537 shift
15538done
15539
Skip Montanaro6dead952003-09-25 14:50:04 +000015540ac_configure_extra_args=
15541
15542if $ac_cs_silent; then
15543 exec 6>/dev/null
15544 ac_configure_extra_args="$ac_configure_extra_args --silent"
15545fi
15546
15547_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015548cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000015549if \$ac_cs_recheck; then
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015550 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015551 shift
15552 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
15553 CONFIG_SHELL='$SHELL'
Martin v. Löwiseba40652007-08-30 20:10:57 +000015554 export CONFIG_SHELL
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015555 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000015556fi
15557
Martin v. Löwis11437992002-04-12 09:54:03 +000015558_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015559cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015560exec 5>>config.log
15561{
15562 echo
15563 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
15564## Running $as_me. ##
15565_ASBOX
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015566 $as_echo "$ac_log"
Martin v. Löwiseba40652007-08-30 20:10:57 +000015567} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015568
Martin v. Löwiseba40652007-08-30 20:10:57 +000015569_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015570cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015571_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015572
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015573cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015574
15575# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000015576for ac_config_target in $ac_config_targets
15577do
Martin v. Löwiseba40652007-08-30 20:10:57 +000015578 case $ac_config_target in
15579 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
15580 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
15581 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
15582 "Mac/IDLE/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/IDLE/Makefile" ;;
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000015583 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
15584 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015585 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
15586 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000015587 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000015588 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015589
Matthias Klose3cef2a92012-03-14 23:39:33 +010015590 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015591 esac
15592done
15593
Martin v. Löwiseba40652007-08-30 20:10:57 +000015594
Martin v. Löwis11437992002-04-12 09:54:03 +000015595# If the user did not use the arguments to specify the items to instantiate,
15596# then the envvar interface is used. Set only those that are not.
15597# We use the long form for the default assignment because of an extremely
15598# bizarre bug on SunOS 4.1.3.
15599if $ac_need_defaults; then
15600 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15601 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
15602fi
15603
Skip Montanaro6dead952003-09-25 14:50:04 +000015604# Have a temporary directory for convenience. Make it in the build tree
Martin v. Löwiseba40652007-08-30 20:10:57 +000015605# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000015606# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015607# Hook for its removal unless debugging.
15608# Note that there is a small window in which the directory will not be cleaned:
15609# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000015610$debug ||
15611{
Matthias Klose3cef2a92012-03-14 23:39:33 +010015612 tmp= ac_tmp=
Martin v. Löwiseba40652007-08-30 20:10:57 +000015613 trap 'exit_status=$?
Matthias Klose3cef2a92012-03-14 23:39:33 +010015614 : "${ac_tmp:=$tmp}"
15615 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +000015616' 0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015617 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000015618}
Martin v. Löwis11437992002-04-12 09:54:03 +000015619# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000015620
Martin v. Löwis11437992002-04-12 09:54:03 +000015621{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015622 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Matthias Klose3cef2a92012-03-14 23:39:33 +010015623 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000015624} ||
15625{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015626 tmp=./conf$$-$RANDOM
15627 (umask 077 && mkdir "$tmp")
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015628} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Matthias Klose3cef2a92012-03-14 23:39:33 +010015629ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000015630
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015631# Set up the scripts for CONFIG_FILES section.
15632# No need to generate them if there are no CONFIG_FILES.
15633# This happens for instance with `./config.status config.h'.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015634if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015635
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015636
15637ac_cr=`echo X | tr X '\015'`
15638# On cygwin, bash can eat \r inside `` if the user requested igncr.
15639# But we know of no other shell where ac_cr would be empty at this
15640# point, so we can use a bashism as a fallback.
15641if test "x$ac_cr" = x; then
15642 eval ac_cr=\$\'\\r\'
15643fi
15644ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
15645if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015646 ac_cs_awk_cr='\\r'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015647else
15648 ac_cs_awk_cr=$ac_cr
15649fi
15650
Matthias Klose3cef2a92012-03-14 23:39:33 +010015651echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000015652_ACEOF
15653
Martin v. Löwiseba40652007-08-30 20:10:57 +000015654
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015655{
15656 echo "cat >conf$$subs.awk <<_ACEOF" &&
15657 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
15658 echo "_ACEOF"
15659} >conf$$subs.sh ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015660 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15661ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015662ac_delim='%!_!# '
15663for ac_last_try in false false false false false :; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015664 . ./conf$$subs.sh ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015665 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015666
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015667 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
15668 if test $ac_delim_n = $ac_delim_num; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015669 break
15670 elif $ac_last_try; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015671 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015672 else
15673 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000015674 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015675done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015676rm -f conf$$subs.sh
Martin v. Löwiseba40652007-08-30 20:10:57 +000015677
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015678cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Matthias Klose3cef2a92012-03-14 23:39:33 +010015679cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000015680_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015681sed -n '
15682h
15683s/^/S["/; s/!.*/"]=/
15684p
15685g
15686s/^[^!]*!//
15687:repl
15688t repl
15689s/'"$ac_delim"'$//
15690t delim
15691:nl
15692h
15693s/\(.\{148\}\)..*/\1/
15694t more1
15695s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
15696p
15697n
15698b repl
15699:more1
15700s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15701p
15702g
15703s/.\{148\}//
15704t nl
15705:delim
15706h
15707s/\(.\{148\}\)..*/\1/
15708t more2
15709s/["\\]/\\&/g; s/^/"/; s/$/"/
15710p
15711b
15712:more2
15713s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15714p
15715g
15716s/.\{148\}//
15717t delim
15718' <conf$$subs.awk | sed '
15719/^[^""]/{
15720 N
15721 s/\n//
15722}
15723' >>$CONFIG_STATUS || ac_write_fail=1
15724rm -f conf$$subs.awk
15725cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15726_ACAWK
Matthias Klose3cef2a92012-03-14 23:39:33 +010015727cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015728 for (key in S) S_is_set[key] = 1
15729 FS = ""
15730
15731}
15732{
15733 line = $ 0
15734 nfields = split(line, field, "@")
15735 substed = 0
15736 len = length(field[1])
15737 for (i = 2; i < nfields; i++) {
15738 key = field[i]
15739 keylen = length(key)
15740 if (S_is_set[key]) {
15741 value = S[key]
15742 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
15743 len += length(value) + length(field[++i])
15744 substed = 1
15745 } else
15746 len += 1 + keylen
15747 }
15748
15749 print line
15750}
15751
15752_ACAWK
Martin v. Löwiseba40652007-08-30 20:10:57 +000015753_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015754cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15755if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
15756 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
15757else
15758 cat
Matthias Klose3cef2a92012-03-14 23:39:33 +010015759fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015760 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015761_ACEOF
15762
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015763# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
15764# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Martin v. Löwiseba40652007-08-30 20:10:57 +000015765# trailing colons and then remove the whole line if VPATH becomes empty
15766# (actually we leave an empty line to preserve line numbers).
15767if test "x$srcdir" = x.; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015768 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
15769h
15770s///
15771s/^/:/
15772s/[ ]*$/:/
15773s/:\$(srcdir):/:/g
15774s/:\${srcdir}:/:/g
15775s/:@srcdir@:/:/g
15776s/^:*//
Martin v. Löwiseba40652007-08-30 20:10:57 +000015777s/:*$//
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015778x
15779s/\(=[ ]*\).*/\1/
15780G
15781s/\n//
Martin v. Löwiseba40652007-08-30 20:10:57 +000015782s/^[^=]*=[ ]*$//
15783}'
15784fi
15785
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015786cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015787fi # test -n "$CONFIG_FILES"
15788
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015789# Set up the scripts for CONFIG_HEADERS section.
15790# No need to generate them if there are no CONFIG_HEADERS.
15791# This happens for instance with `./config.status Makefile'.
15792if test -n "$CONFIG_HEADERS"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +010015793cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015794BEGIN {
15795_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000015796
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015797# Transform confdefs.h into an awk script `defines.awk', embedded as
15798# here-document in config.status, that substitutes the proper values into
15799# config.h.in to produce config.h.
15800
15801# Create a delimiter string that does not exist in confdefs.h, to ease
15802# handling of long lines.
15803ac_delim='%!_!# '
15804for ac_last_try in false false :; do
Matthias Klose3cef2a92012-03-14 23:39:33 +010015805 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
15806 if test -z "$ac_tt"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015807 break
15808 elif $ac_last_try; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015809 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015810 else
15811 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
15812 fi
15813done
15814
15815# For the awk script, D is an array of macro values keyed by name,
15816# likewise P contains macro parameters if any. Preserve backslash
15817# newline sequences.
15818
15819ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
15820sed -n '
15821s/.\{148\}/&'"$ac_delim"'/g
15822t rset
15823:rset
15824s/^[ ]*#[ ]*define[ ][ ]*/ /
15825t def
15826d
15827:def
15828s/\\$//
15829t bsnl
15830s/["\\]/\\&/g
15831s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
15832D["\1"]=" \3"/p
15833s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
15834d
15835:bsnl
15836s/["\\]/\\&/g
15837s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
15838D["\1"]=" \3\\\\\\n"\\/p
15839t cont
15840s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
15841t cont
15842d
15843:cont
15844n
15845s/.\{148\}/&'"$ac_delim"'/g
15846t clear
15847:clear
15848s/\\$//
15849t bsnlc
15850s/["\\]/\\&/g; s/^/"/; s/$/"/p
15851d
15852:bsnlc
15853s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
15854b cont
15855' <confdefs.h | sed '
15856s/'"$ac_delim"'/"\\\
15857"/g' >>$CONFIG_STATUS || ac_write_fail=1
15858
15859cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15860 for (key in D) D_is_set[key] = 1
15861 FS = ""
15862}
15863/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
15864 line = \$ 0
15865 split(line, arg, " ")
15866 if (arg[1] == "#") {
15867 defundef = arg[2]
15868 mac1 = arg[3]
15869 } else {
15870 defundef = substr(arg[1], 2)
15871 mac1 = arg[2]
15872 }
15873 split(mac1, mac2, "(") #)
15874 macro = mac2[1]
15875 prefix = substr(line, 1, index(line, defundef) - 1)
15876 if (D_is_set[macro]) {
15877 # Preserve the white space surrounding the "#".
15878 print prefix "define", macro P[macro] D[macro]
15879 next
15880 } else {
15881 # Replace #undef with comments. This is necessary, for example,
15882 # in the case of _POSIX_SOURCE, which is predefined and required
15883 # on some systems where configure will not decide to define it.
15884 if (defundef == "undef") {
15885 print "/*", prefix defundef, macro, "*/"
15886 next
15887 }
15888 }
15889}
15890{ print }
15891_ACAWK
15892_ACEOF
15893cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015894 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015895fi # test -n "$CONFIG_HEADERS"
15896
15897
15898eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
15899shift
15900for ac_tag
Martin v. Löwiseba40652007-08-30 20:10:57 +000015901do
15902 case $ac_tag in
15903 :[FHLC]) ac_mode=$ac_tag; continue;;
15904 esac
15905 case $ac_mode$ac_tag in
15906 :[FHL]*:*);;
Matthias Klose3cef2a92012-03-14 23:39:33 +010015907 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015908 :[FH]-) ac_tag=-:-;;
15909 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
15910 esac
15911 ac_save_IFS=$IFS
15912 IFS=:
15913 set x $ac_tag
15914 IFS=$ac_save_IFS
15915 shift
15916 ac_file=$1
15917 shift
15918
15919 case $ac_mode in
15920 :L) ac_source=$1;;
15921 :[FH])
15922 ac_file_inputs=
15923 for ac_f
15924 do
15925 case $ac_f in
Matthias Klose3cef2a92012-03-14 23:39:33 +010015926 -) ac_f="$ac_tmp/stdin";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015927 *) # Look for the file first in the build tree, then in the source tree
15928 # (if the path is not absolute). The absolute path cannot be DOS-style,
15929 # because $ac_f cannot contain `:'.
15930 test -f "$ac_f" ||
15931 case $ac_f in
15932 [\\/$]*) false;;
15933 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
15934 esac ||
Matthias Klose3cef2a92012-03-14 23:39:33 +010015935 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015936 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015937 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
15938 as_fn_append ac_file_inputs " '$ac_f'"
Martin v. Löwiseba40652007-08-30 20:10:57 +000015939 done
15940
15941 # Let's still pretend it is `configure' which instantiates (i.e., don't
15942 # use $as_me), people would be surprised to read:
15943 # /* config.h. Generated by config.status. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015944 configure_input='Generated from '`
15945 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
15946 `' by configure.'
Martin v. Löwiseba40652007-08-30 20:10:57 +000015947 if test x"$ac_file" != x-; then
15948 configure_input="$ac_file. $configure_input"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015949 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
15950$as_echo "$as_me: creating $ac_file" >&6;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000015951 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015952 # Neutralize special characters interpreted by sed in replacement strings.
15953 case $configure_input in #(
15954 *\&* | *\|* | *\\* )
15955 ac_sed_conf_input=`$as_echo "$configure_input" |
15956 sed 's/[\\\\&|]/\\\\&/g'`;; #(
15957 *) ac_sed_conf_input=$configure_input;;
15958 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000015959
15960 case $ac_tag in
Matthias Klose3cef2a92012-03-14 23:39:33 +010015961 *:-:* | *:-) cat >"$ac_tmp/stdin" \
15962 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015963 esac
15964 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015965 esac
15966
Martin v. Löwiseba40652007-08-30 20:10:57 +000015967 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000015968$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015969 X"$ac_file" : 'X\(//\)[^/]' \| \
15970 X"$ac_file" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000015971 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015972$as_echo X"$ac_file" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000015973 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15974 s//\1/
15975 q
15976 }
15977 /^X\(\/\/\)[^/].*/{
15978 s//\1/
15979 q
15980 }
15981 /^X\(\/\/\)$/{
15982 s//\1/
15983 q
15984 }
15985 /^X\(\/\).*/{
15986 s//\1/
15987 q
15988 }
15989 s/.*/./; q'`
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015990 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000015991 ac_builddir=.
15992
Martin v. Löwiseba40652007-08-30 20:10:57 +000015993case "$ac_dir" in
15994.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
15995*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015996 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015997 # A ".." for each directory in $ac_dir_suffix.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015998 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015999 case $ac_top_builddir_sub in
16000 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
16001 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
16002 esac ;;
16003esac
16004ac_abs_top_builddir=$ac_pwd
16005ac_abs_builddir=$ac_pwd$ac_dir_suffix
16006# for backward compatibility:
16007ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000016008
16009case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +000016010 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000016011 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +000016012 ac_top_srcdir=$ac_top_builddir_sub
16013 ac_abs_top_srcdir=$ac_pwd ;;
16014 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000016015 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016016 ac_top_srcdir=$srcdir
16017 ac_abs_top_srcdir=$srcdir ;;
16018 *) # Relative name.
16019 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
16020 ac_top_srcdir=$ac_top_build_prefix$srcdir
16021 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016022esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000016023ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000016024
Martin v. Löwis11437992002-04-12 09:54:03 +000016025
Martin v. Löwiseba40652007-08-30 20:10:57 +000016026 case $ac_mode in
16027 :F)
16028 #
16029 # CONFIG_FILE
16030 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016031
16032 case $INSTALL in
16033 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016034 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016035 esac
Trent Nelsonf6407a12012-08-30 14:56:13 +000016036 ac_MKDIR_P=$MKDIR_P
16037 case $MKDIR_P in
16038 [\\/$]* | ?:[\\/]* ) ;;
16039 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
16040 esac
Brett Cannon19fab762007-06-02 03:02:29 +000016041_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000016042
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016043cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000016044# If the template does not know about datarootdir, expand it.
16045# FIXME: This hack should be removed a few years after 2.60.
16046ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016047ac_sed_dataroot='
16048/datarootdir/ {
Martin v. Löwiseba40652007-08-30 20:10:57 +000016049 p
16050 q
16051}
16052/@datadir@/p
16053/@docdir@/p
16054/@infodir@/p
16055/@localedir@/p
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016056/@mandir@/p'
16057case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Martin v. Löwiseba40652007-08-30 20:10:57 +000016058*datarootdir*) ac_datarootdir_seen=yes;;
16059*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016060 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
16061$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000016062_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016063cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000016064 ac_datarootdir_hack='
16065 s&@datadir@&$datadir&g
16066 s&@docdir@&$docdir&g
16067 s&@infodir@&$infodir&g
16068 s&@localedir@&$localedir&g
16069 s&@mandir@&$mandir&g
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016070 s&\\\${datarootdir}&$datarootdir&g' ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016071esac
16072_ACEOF
16073
16074# Neutralize VPATH when `$srcdir' = `.'.
16075# Shell code in configure.ac might set extrasub.
16076# FIXME: do we really want to maintain this feature?
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016077cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16078ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000016079$extrasub
16080_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016081cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016082:t
16083/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016084s|@configure_input@|$ac_sed_conf_input|;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000016085s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016086s&@top_build_prefix@&$ac_top_build_prefix&;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000016087s&@srcdir@&$ac_srcdir&;t t
16088s&@abs_srcdir@&$ac_abs_srcdir&;t t
16089s&@top_srcdir@&$ac_top_srcdir&;t t
16090s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
16091s&@builddir@&$ac_builddir&;t t
16092s&@abs_builddir@&$ac_abs_builddir&;t t
16093s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
16094s&@INSTALL@&$ac_INSTALL&;t t
Trent Nelsonf6407a12012-08-30 14:56:13 +000016095s&@MKDIR_P@&$ac_MKDIR_P&;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000016096$ac_datarootdir_hack
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016097"
Matthias Klose3cef2a92012-03-14 23:39:33 +010016098eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
16099 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016100
Martin v. Löwiseba40652007-08-30 20:10:57 +000016101test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Matthias Klose3cef2a92012-03-14 23:39:33 +010016102 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
16103 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
16104 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016105 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016106which seems to be undefined. Please make sure it is defined" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016107$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016108which seems to be undefined. Please make sure it is defined" >&2;}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016109
Matthias Klose3cef2a92012-03-14 23:39:33 +010016110 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000016111 case $ac_file in
Matthias Klose3cef2a92012-03-14 23:39:33 +010016112 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
16113 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016114 esac \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016115 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016116 ;;
16117 :H)
16118 #
16119 # CONFIG_HEADER
16120 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016121 if test x"$ac_file" != x-; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016122 {
16123 $as_echo "/* $configure_input */" \
Matthias Klose3cef2a92012-03-14 23:39:33 +010016124 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
16125 } >"$ac_tmp/config.h" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016126 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Matthias Klose3cef2a92012-03-14 23:39:33 +010016127 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016128 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
16129$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016130 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016131 rm -f "$ac_file"
Matthias Klose3cef2a92012-03-14 23:39:33 +010016132 mv "$ac_tmp/config.h" "$ac_file" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016133 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016134 fi
16135 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016136 $as_echo "/* $configure_input */" \
Matthias Klose3cef2a92012-03-14 23:39:33 +010016137 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016138 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016139 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016140 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000016141
Martin v. Löwiseba40652007-08-30 20:10:57 +000016142
16143 esac
16144
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000016145
16146 case $ac_file$ac_mode in
16147 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
16148
16149 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000016150done # for ac_tag
16151
Guido van Rossum627b2d71993-12-24 10:39:16 +000016152
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016153as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000016154_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016155ac_clean_files=$ac_clean_files_save
16156
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016157test $ac_write_fail = 0 ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016158 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016159
Martin v. Löwis11437992002-04-12 09:54:03 +000016160
16161# configure is writing to config.log, and then calls config.status.
16162# config.status does its own redirection, appending to config.log.
16163# Unfortunately, on DOS this fails, as config.log is still kept open
16164# by configure, so config.status won't be able to write to it; its
16165# output is simply discarded. So we exec the FD to /dev/null,
16166# effectively closing config.log, so it can be properly (re)opened and
16167# appended to by config.status. When coming back to configure, we
16168# need to make the FD available again.
16169if test "$no_create" != yes; then
16170 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000016171 ac_config_status_args=
16172 test "$silent" = yes &&
16173 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000016174 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000016175 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000016176 exec 5>>config.log
16177 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16178 # would make configure fail if this is the last instruction.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016179 $ac_cs_success || as_fn_exit 1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016180fi
16181if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
16182 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
16183$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016184fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000016185
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016186
Martin v. Löwisf7afe952006-04-14 15:16:15 +000016187echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016188if test ! -f Modules/Setup
16189then
16190 cp $srcdir/Modules/Setup.dist Modules/Setup
16191fi
16192
Martin v. Löwisf7afe952006-04-14 15:16:15 +000016193echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016194if test ! -f Modules/Setup.local
16195then
16196 echo "# Edit this file for local setup changes" >Modules/Setup.local
16197fi
16198
16199echo "creating Makefile"
16200$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
16201 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000016202 Modules/Setup.local Modules/Setup
Skip Montanaro89e975f2007-08-22 19:05:21 +000016203
16204case $ac_sys_system in
16205BeOS)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016206 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000016207
16208 Support for BeOS is deprecated as of Python 2.6.
16209 See PEP 11 for the gory details.
16210 " >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016211$as_echo "$as_me: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000016212
16213 Support for BeOS is deprecated as of Python 2.6.
16214 See PEP 11 for the gory details.
16215 " >&2;}
16216 ;;
16217*) ;;
16218esac
16219
Neil Schemenauerc761fc82001-02-19 04:50:49 +000016220mv config.c Modules