blob: 712787133fd1fbfee4d99a152d20644a8292e52e [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
664UNIVERSAL_ARCH_FLAGS
665BASECFLAGS
666OPT
667LN
Trent Nelsonf6407a12012-08-30 14:56:13 +0000668MKDIR_P
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000669INSTALL_DATA
670INSTALL_SCRIPT
671INSTALL_PROGRAM
Georg Brandl3a5508e2011-03-06 10:42:21 +0100672HAS_HG
673HGBRANCH
674HGTAG
675HGVERSION
Trent Nelsond86ceec2012-10-16 09:42:45 -0400676BASECPPFLAGS
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000677SVNVERSION
678ARFLAGS
doko@python.orgd65e2ba2013-01-31 23:52:03 +0100679ac_ct_AR
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000680AR
681RANLIB
682GNULD
683LINKCC
684RUNSHARED
685INSTSONAME
686LDLIBRARYDIR
687BLDLIBRARY
688DLLLIBRARY
689LDLIBRARY
690LIBRARY
691BUILDEXEEXT
692EGREP
693GREP
694CPP
doko@python.org4e63fbe2013-01-25 13:08:27 +0100695MULTIARCH
doko@python.orgd65e2ba2013-01-31 23:52:03 +0100696ac_ct_CXX
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000697MAINCC
698CXX
699OBJEXT
700EXEEXT
701ac_ct_CC
702CPPFLAGS
703LDFLAGS
704CFLAGS
705CC
706EXPORT_MACOSX_DEPLOYMENT_TARGET
707CONFIGURE_MACOSX_DEPLOYMENT_TARGET
708EXTRAMACHDEPPATH
709EXTRAPLATDIR
doko@ubuntu.coma50b0de2015-04-13 21:55:59 +0200710PLATDIR
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000711SGI_ABI
doko@python.orgd65e2ba2013-01-31 23:52:03 +0100712_PYTHON_HOST_PLATFORM
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000713MACHDEP
714FRAMEWORKINSTALLAPPSPREFIX
715FRAMEWORKUNIXTOOLSPREFIX
716FRAMEWORKALTINSTALLLAST
717FRAMEWORKALTINSTALLFIRST
718FRAMEWORKINSTALLLAST
719FRAMEWORKINSTALLFIRST
720PYTHONFRAMEWORKINSTALLDIR
721PYTHONFRAMEWORKPREFIX
722PYTHONFRAMEWORKDIR
723PYTHONFRAMEWORKIDENTIFIER
724PYTHONFRAMEWORK
725LIPO_32BIT_FLAGS
726ARCH_RUN_32BIT
727UNIVERSALSDK
728CONFIG_ARGS
729SOVERSION
730VERSION
doko@python.orgd65e2ba2013-01-31 23:52:03 +0100731PYTHON_FOR_BUILD
732host_os
733host_vendor
734host_cpu
735host
736build_os
737build_vendor
738build_cpu
739build
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000740target_alias
741host_alias
742build_alias
743LIBS
744ECHO_T
745ECHO_N
746ECHO_C
747DEFS
748mandir
749localedir
750libdir
751psdir
752pdfdir
753dvidir
754htmldir
755infodir
756docdir
757oldincludedir
758includedir
759localstatedir
760sharedstatedir
761sysconfdir
762datadir
763datarootdir
764libexecdir
765sbindir
766bindir
767program_transform_name
768prefix
769exec_prefix
770PACKAGE_URL
771PACKAGE_BUGREPORT
772PACKAGE_STRING
773PACKAGE_VERSION
774PACKAGE_TARNAME
775PACKAGE_NAME
776PATH_SEPARATOR
777SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000778ac_subst_files=''
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000779ac_user_opts='
780enable_option_checking
781enable_universalsdk
782with_universal_archs
783with_framework_name
784enable_framework
785with_gcc
786with_cxx_main
787with_suffix
788enable_shared
789enable_profiling
790with_pydebug
791enable_toolbox_glue
792with_libs
793with_system_expat
794with_system_ffi
Ned Deilya2a9f572013-10-25 00:30:10 -0700795with_tcltk_includes
796with_tcltk_libs
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000797with_dbmliborder
798with_signal_module
799with_dec_threads
800with_threads
801with_thread
802with_pth
803enable_ipv6
804with_doc_strings
805with_tsc
806with_pymalloc
807with_valgrind
808with_wctype_functions
809with_fpectl
810with_libm
811with_libc
812enable_big_digits
813enable_unicode
Benjamin Peterson2c992a02015-05-28 12:45:31 -0500814with_computed_gotos
Ned Deily3f1d0b32014-11-20 02:11:03 -0800815with_ensurepip
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000816'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000817 ac_precious_vars='build_alias
818host_alias
819target_alias
820CC
821CFLAGS
822LDFLAGS
823LIBS
824CPPFLAGS
Benjamin Peterson64e8f6e2014-12-15 00:00:23 -0500825CPP
826PKG_CONFIG
827PKG_CONFIG_PATH
828PKG_CONFIG_LIBDIR'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000829
Guido van Rossum627b2d71993-12-24 10:39:16 +0000830
Guido van Rossum7f43da71994-08-01 12:15:30 +0000831# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000832ac_init_help=
833ac_init_version=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000834ac_unrecognized_opts=
835ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000836# The variables have the same names as the options, with
837# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000838cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000839exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000840no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000841no_recursion=
842prefix=NONE
843program_prefix=NONE
844program_suffix=NONE
845program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000846silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000847site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000848srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000849verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000850x_includes=NONE
851x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000852
853# Installation directory options.
854# These are left unexpanded so users can "make install exec_prefix=/foo"
855# and all the variables that are supposed to be based on exec_prefix
856# by default will actually change.
857# Use braces instead of parens because sh, perl, etc. also accept them.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000858# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000859bindir='${exec_prefix}/bin'
860sbindir='${exec_prefix}/sbin'
861libexecdir='${exec_prefix}/libexec'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000862datarootdir='${prefix}/share'
863datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000864sysconfdir='${prefix}/etc'
865sharedstatedir='${prefix}/com'
866localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000867includedir='${prefix}/include'
868oldincludedir='/usr/include'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000869docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
870infodir='${datarootdir}/info'
871htmldir='${docdir}'
872dvidir='${docdir}'
873pdfdir='${docdir}'
874psdir='${docdir}'
875libdir='${exec_prefix}/lib'
876localedir='${datarootdir}/locale'
877mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000878
Guido van Rossum7f43da71994-08-01 12:15:30 +0000879ac_prev=
Martin v. Löwiseba40652007-08-30 20:10:57 +0000880ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000881for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000882do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000883 # If the previous option needs an argument, assign it.
884 if test -n "$ac_prev"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +0000885 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000886 ac_prev=
887 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000888 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000889
Martin v. Löwiseba40652007-08-30 20:10:57 +0000890 case $ac_option in
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000891 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
892 *=) ac_optarg= ;;
893 *) ac_optarg=yes ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000894 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000895
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000896 # Accept the important Cygnus configure options, so we can diagnose typos.
897
Martin v. Löwiseba40652007-08-30 20:10:57 +0000898 case $ac_dashdash$ac_option in
899 --)
900 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000901
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000902 -bindir | --bindir | --bindi | --bind | --bin | --bi)
903 ac_prev=bindir ;;
904 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000905 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000906
907 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000908 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000909 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000910 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000911
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000912 -cache-file | --cache-file | --cache-fil | --cache-fi \
913 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
914 ac_prev=cache_file ;;
915 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
916 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000917 cache_file=$ac_optarg ;;
918
919 --config-cache | -C)
920 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000921
Martin v. Löwiseba40652007-08-30 20:10:57 +0000922 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000923 ac_prev=datadir ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000924 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000925 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000926
Martin v. Löwiseba40652007-08-30 20:10:57 +0000927 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
928 | --dataroo | --dataro | --datar)
929 ac_prev=datarootdir ;;
930 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
931 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
932 datarootdir=$ac_optarg ;;
933
Guido van Rossum7f43da71994-08-01 12:15:30 +0000934 -disable-* | --disable-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000935 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000936 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000937 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000938 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000939 ac_useropt_orig=$ac_useropt
940 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
941 case $ac_user_opts in
942 *"
943"enable_$ac_useropt"
944"*) ;;
945 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
946 ac_unrecognized_sep=', ';;
947 esac
948 eval enable_$ac_useropt=no ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000949
950 -docdir | --docdir | --docdi | --doc | --do)
951 ac_prev=docdir ;;
952 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
953 docdir=$ac_optarg ;;
954
955 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
956 ac_prev=dvidir ;;
957 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
958 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000959
960 -enable-* | --enable-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000961 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000962 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000963 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000964 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000965 ac_useropt_orig=$ac_useropt
966 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
967 case $ac_user_opts in
968 *"
969"enable_$ac_useropt"
970"*) ;;
971 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
972 ac_unrecognized_sep=', ';;
973 esac
974 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000975
Guido van Rossum7f43da71994-08-01 12:15:30 +0000976 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
977 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
978 | --exec | --exe | --ex)
979 ac_prev=exec_prefix ;;
980 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
981 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
982 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000983 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000984
985 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000986 # Obsolete; use --with-gas.
987 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000988
Martin v. Löwis11437992002-04-12 09:54:03 +0000989 -help | --help | --hel | --he | -h)
990 ac_init_help=long ;;
991 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
992 ac_init_help=recursive ;;
993 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
994 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000995
996 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000997 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000998 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000999 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001000
Martin v. Löwiseba40652007-08-30 20:10:57 +00001001 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1002 ac_prev=htmldir ;;
1003 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1004 | --ht=*)
1005 htmldir=$ac_optarg ;;
1006
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001007 -includedir | --includedir | --includedi | --included | --include \
1008 | --includ | --inclu | --incl | --inc)
1009 ac_prev=includedir ;;
1010 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1011 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001012 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001013
1014 -infodir | --infodir | --infodi | --infod | --info | --inf)
1015 ac_prev=infodir ;;
1016 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001017 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001018
1019 -libdir | --libdir | --libdi | --libd)
1020 ac_prev=libdir ;;
1021 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001022 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001023
1024 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1025 | --libexe | --libex | --libe)
1026 ac_prev=libexecdir ;;
1027 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1028 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001029 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001030
Martin v. Löwiseba40652007-08-30 20:10:57 +00001031 -localedir | --localedir | --localedi | --localed | --locale)
1032 ac_prev=localedir ;;
1033 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1034 localedir=$ac_optarg ;;
1035
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001036 -localstatedir | --localstatedir | --localstatedi | --localstated \
Martin v. Löwiseba40652007-08-30 20:10:57 +00001037 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001038 ac_prev=localstatedir ;;
1039 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Martin v. Löwiseba40652007-08-30 20:10:57 +00001040 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001041 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001042
1043 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1044 ac_prev=mandir ;;
1045 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001046 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001047
Guido van Rossum7f43da71994-08-01 12:15:30 +00001048 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001049 # Obsolete; use --without-fp.
1050 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001051
1052 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001053 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001054 no_create=yes ;;
1055
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001056 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1057 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1058 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001059
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001060 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1061 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1062 | --oldin | --oldi | --old | --ol | --o)
1063 ac_prev=oldincludedir ;;
1064 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1065 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1066 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001067 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001068
Guido van Rossum7f43da71994-08-01 12:15:30 +00001069 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1070 ac_prev=prefix ;;
1071 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001072 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001073
1074 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1075 | --program-pre | --program-pr | --program-p)
1076 ac_prev=program_prefix ;;
1077 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1078 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001079 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001080
1081 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1082 | --program-suf | --program-su | --program-s)
1083 ac_prev=program_suffix ;;
1084 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1085 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001086 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001087
1088 -program-transform-name | --program-transform-name \
1089 | --program-transform-nam | --program-transform-na \
1090 | --program-transform-n | --program-transform- \
1091 | --program-transform | --program-transfor \
1092 | --program-transfo | --program-transf \
1093 | --program-trans | --program-tran \
1094 | --progr-tra | --program-tr | --program-t)
1095 ac_prev=program_transform_name ;;
1096 -program-transform-name=* | --program-transform-name=* \
1097 | --program-transform-nam=* | --program-transform-na=* \
1098 | --program-transform-n=* | --program-transform-=* \
1099 | --program-transform=* | --program-transfor=* \
1100 | --program-transfo=* | --program-transf=* \
1101 | --program-trans=* | --program-tran=* \
1102 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001103 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001104
Martin v. Löwiseba40652007-08-30 20:10:57 +00001105 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1106 ac_prev=pdfdir ;;
1107 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1108 pdfdir=$ac_optarg ;;
1109
1110 -psdir | --psdir | --psdi | --psd | --ps)
1111 ac_prev=psdir ;;
1112 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1113 psdir=$ac_optarg ;;
1114
Guido van Rossum7f43da71994-08-01 12:15:30 +00001115 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1116 | -silent | --silent | --silen | --sile | --sil)
1117 silent=yes ;;
1118
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001119 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1120 ac_prev=sbindir ;;
1121 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1122 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001123 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001124
1125 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1126 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1127 | --sharedst | --shareds | --shared | --share | --shar \
1128 | --sha | --sh)
1129 ac_prev=sharedstatedir ;;
1130 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1131 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1132 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1133 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001134 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001135
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001136 -site | --site | --sit)
1137 ac_prev=site ;;
1138 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001139 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001140
Guido van Rossum7f43da71994-08-01 12:15:30 +00001141 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1142 ac_prev=srcdir ;;
1143 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001144 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001145
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001146 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1147 | --syscon | --sysco | --sysc | --sys | --sy)
1148 ac_prev=sysconfdir ;;
1149 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1150 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001151 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001152
Guido van Rossum7f43da71994-08-01 12:15:30 +00001153 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001154 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001155 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001156 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001157
1158 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1159 verbose=yes ;;
1160
Martin v. Löwis11437992002-04-12 09:54:03 +00001161 -version | --version | --versio | --versi | --vers | -V)
1162 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001163
1164 -with-* | --with-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001165 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001166 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001167 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001168 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001169 ac_useropt_orig=$ac_useropt
1170 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1171 case $ac_user_opts in
1172 *"
1173"with_$ac_useropt"
1174"*) ;;
1175 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1176 ac_unrecognized_sep=', ';;
1177 esac
1178 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001179
1180 -without-* | --without-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001181 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001182 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001183 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001184 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001185 ac_useropt_orig=$ac_useropt
1186 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1187 case $ac_user_opts in
1188 *"
1189"with_$ac_useropt"
1190"*) ;;
1191 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1192 ac_unrecognized_sep=', ';;
1193 esac
1194 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001195
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001196 --x)
1197 # Obsolete; use --with-x.
1198 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001199
1200 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1201 | --x-incl | --x-inc | --x-in | --x-i)
1202 ac_prev=x_includes ;;
1203 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1204 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001205 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001206
1207 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1208 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1209 ac_prev=x_libraries ;;
1210 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1211 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001212 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001213
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001214 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1215Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001216 ;;
1217
Martin v. Löwis11437992002-04-12 09:54:03 +00001218 *=*)
1219 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1220 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001221 case $ac_envvar in #(
1222 '' | [0-9]* | *[!_$as_cr_alnum]* )
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001223 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001224 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001225 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001226 export $ac_envvar ;;
1227
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001228 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001229 # FIXME: should be removed in autoconf 3.0.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001230 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001231 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001232 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Matthias Klose3cef2a92012-03-14 23:39:33 +01001233 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001234 ;;
1235
1236 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001237done
1238
Guido van Rossum7f43da71994-08-01 12:15:30 +00001239if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001240 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001241 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001242fi
1243
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001244if test -n "$ac_unrecognized_opts"; then
1245 case $enable_option_checking in
1246 no) ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001247 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001248 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1249 esac
1250fi
1251
1252# Check all directory arguments for consistency.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001253for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1254 datadir sysconfdir sharedstatedir localstatedir includedir \
1255 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1256 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001257do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001258 eval ac_val=\$$ac_var
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001259 # Remove trailing slashes.
1260 case $ac_val in
1261 */ )
1262 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1263 eval $ac_var=\$ac_val;;
1264 esac
1265 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001266 case $ac_val in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001267 [\\/$]* | ?:[\\/]* ) continue;;
1268 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001269 esac
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001270 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001271done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001272
Martin v. Löwis11437992002-04-12 09:54:03 +00001273# There might be people who depend on the old broken behavior: `$host'
1274# used to hold the argument of --host etc.
1275# FIXME: To remove some day.
1276build=$build_alias
1277host=$host_alias
1278target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001279
Martin v. Löwis11437992002-04-12 09:54:03 +00001280# FIXME: To remove some day.
1281if test "x$host_alias" != x; then
1282 if test "x$build_alias" = x; then
1283 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001284 elif test "x$build_alias" != "x$host_alias"; then
1285 cross_compiling=yes
1286 fi
1287fi
1288
1289ac_tool_prefix=
1290test -n "$host_alias" && ac_tool_prefix=$host_alias-
1291
1292test "$silent" = yes && exec 6>/dev/null
1293
Guido van Rossum627b2d71993-12-24 10:39:16 +00001294
Martin v. Löwiseba40652007-08-30 20:10:57 +00001295ac_pwd=`pwd` && test -n "$ac_pwd" &&
1296ac_ls_di=`ls -di .` &&
1297ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001298 as_fn_error $? "working directory cannot be determined"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001299test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001300 as_fn_error $? "pwd does not report name of working directory"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001301
1302
Guido van Rossum627b2d71993-12-24 10:39:16 +00001303# Find the source files, if location was not specified.
1304if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001305 ac_srcdir_defaulted=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +00001306 # Try the directory containing this script, then the parent directory.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001307 ac_confdir=`$as_dirname -- "$as_myself" ||
1308$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1309 X"$as_myself" : 'X\(//\)[^/]' \| \
1310 X"$as_myself" : 'X\(//\)$' \| \
1311 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1312$as_echo X"$as_myself" |
Martin v. Löwiseba40652007-08-30 20:10:57 +00001313 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1314 s//\1/
1315 q
1316 }
1317 /^X\(\/\/\)[^/].*/{
1318 s//\1/
1319 q
1320 }
1321 /^X\(\/\/\)$/{
1322 s//\1/
1323 q
1324 }
1325 /^X\(\/\).*/{
1326 s//\1/
1327 q
1328 }
1329 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001330 srcdir=$ac_confdir
Martin v. Löwiseba40652007-08-30 20:10:57 +00001331 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001332 srcdir=..
1333 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001334else
1335 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001336fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001337if test ! -r "$srcdir/$ac_unique_file"; then
1338 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001339 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Brett Cannon19fab762007-06-02 03:02:29 +00001340fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001341ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1342ac_abs_confdir=`(
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001343 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001344 pwd)`
1345# When building in place, set srcdir=.
1346if test "$ac_abs_confdir" = "$ac_pwd"; then
1347 srcdir=.
1348fi
1349# Remove unnecessary trailing slashes from srcdir.
1350# Double slashes in file names in object file debugging info
1351# mess up M-x gdb in Emacs.
1352case $srcdir in
1353*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1354esac
1355for ac_var in $ac_precious_vars; do
1356 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1357 eval ac_env_${ac_var}_value=\$${ac_var}
1358 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1359 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1360done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001361
Martin v. Löwis11437992002-04-12 09:54:03 +00001362#
1363# Report the --help message.
1364#
1365if test "$ac_init_help" = "long"; then
1366 # Omit some internal or obsolete options to make the list less imposing.
1367 # This message is too long to be a string in the A/UX 3.1 sh.
1368 cat <<_ACEOF
Martin v. Löwis174440b2008-10-03 08:59:41 +00001369\`configure' configures python 2.7 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001370
1371Usage: $0 [OPTION]... [VAR=VALUE]...
1372
1373To assign environment variables (e.g., CC, CFLAGS...), specify them as
1374VAR=VALUE. See below for descriptions of some of the useful variables.
1375
1376Defaults for the options are specified in brackets.
1377
1378Configuration:
1379 -h, --help display this help and exit
1380 --help=short display options specific to this package
1381 --help=recursive display the short help of all the included packages
1382 -V, --version display version information and exit
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001383 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001384 --cache-file=FILE cache test results in FILE [disabled]
1385 -C, --config-cache alias for \`--cache-file=config.cache'
1386 -n, --no-create do not create output files
1387 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1388
Martin v. Löwis11437992002-04-12 09:54:03 +00001389Installation directories:
1390 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001391 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001392 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001393 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001394
1395By default, \`make install' will install all the files in
1396\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1397an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1398for instance \`--prefix=\$HOME'.
1399
1400For better control, use the options below.
1401
1402Fine tuning of the installation directories:
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001403 --bindir=DIR user executables [EPREFIX/bin]
1404 --sbindir=DIR system admin executables [EPREFIX/sbin]
1405 --libexecdir=DIR program executables [EPREFIX/libexec]
1406 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1407 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1408 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1409 --libdir=DIR object code libraries [EPREFIX/lib]
1410 --includedir=DIR C header files [PREFIX/include]
1411 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1412 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1413 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1414 --infodir=DIR info documentation [DATAROOTDIR/info]
1415 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1416 --mandir=DIR man documentation [DATAROOTDIR/man]
1417 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1418 --htmldir=DIR html documentation [DOCDIR]
1419 --dvidir=DIR dvi documentation [DOCDIR]
1420 --pdfdir=DIR pdf documentation [DOCDIR]
1421 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001422_ACEOF
1423
1424 cat <<\_ACEOF
doko@python.orgd65e2ba2013-01-31 23:52:03 +01001425
1426System types:
1427 --build=BUILD configure for building on BUILD [guessed]
1428 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001429_ACEOF
1430fi
1431
1432if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001433 case $ac_init_help in
Martin v. Löwis174440b2008-10-03 08:59:41 +00001434 short | recursive ) echo "Configuration of python 2.7:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001435 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001436 cat <<\_ACEOF
1437
1438Optional Features:
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001439 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001440 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1441 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Brett Cannon91a1dec2008-02-13 19:15:44 +00001442 --enable-universalsdk[=SDKDIR]
Brett Cannon9a8bb0e2008-02-03 02:07:55 +00001443 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001444 --enable-framework[=INSTALLDIR]
1445 Build (MacOSX|Darwin) framework
1446 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001447 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001448 --enable-toolbox-glue disable/enable MacOSX glue code for extensions
1449 --enable-ipv6 Enable ipv6 (with ipv4) support
1450 --disable-ipv6 Disable ipv6 support
Mark Dickinsonefc82f72009-03-20 15:51:55 +00001451 --enable-big-digits[=BITS]
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001452 use big digits for Python longs [[BITS=30]]
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001453 --enable-unicode[=ucs[24]]
Benjamin Peterson66556b02010-05-25 02:23:32 +00001454 Enable Unicode strings (default is ucs2)
Martin v. Löwis11437992002-04-12 09:54:03 +00001455
1456Optional Packages:
1457 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1458 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001459 --with-universal-archs=ARCH
1460 select architectures for universal build ("32-bit",
Ronald Oussoren23d92532009-09-07 06:12:00 +00001461 "64-bit", "3-way", "intel" or "all")
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001462 --with-framework-name=FRAMEWORK
1463 specify an alternate name of the framework built
1464 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001465 --without-gcc never use gcc
Martin v. Löwis0f48d982006-04-14 14:34:26 +00001466 --with-cxx-main=<compiler>
1467 compile main() and link python executable with C++
1468 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001469 --with-suffix=.exe set executable suffix
1470 --with-pydebug build with Py_DEBUG defined
1471 --with-libs='lib1 ...' link against additional libs
Benjamin Peterson2c196742009-12-31 03:17:18 +00001472 --with-system-expat build pyexpat module using an installed expat
1473 library
Martin v. Löwis9176fc12006-04-11 11:12:43 +00001474 --with-system-ffi build _ctypes module using an installed ffi library
Ned Deilya2a9f572013-10-25 00:30:10 -07001475 --with-tcltk-includes='-I...'
1476 override search for Tcl and Tk include files
1477 --with-tcltk-libs='-L...'
1478 override search for Tcl and Tk libs
Benjamin Peterson867475c2009-04-29 20:36:25 +00001479 --with-dbmliborder=db1:db2:...
1480 order to check db backends for dbm. Valid value is a
1481 colon separated string with the backend names
1482 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001483 --with-signal-module disable/enable signal module
1484 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1485 --with(out)-threads[=DIRECTORY]
1486 disable/enable thread support
1487 --with(out)-thread[=DIRECTORY]
1488 deprecated; use --with(out)-threads
1489 --with-pth use GNU pth threading libraries
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001490 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001491 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001492 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00001493 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001494 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001495 --with-fpectl enable SIGFPE catching
1496 --with-libm=STRING math library
1497 --with-libc=STRING C library
Benjamin Peterson2c992a02015-05-28 12:45:31 -05001498 --with(out)-computed-gotos
1499 Use computed gotos in evaluation loop (enabled by
1500 default on supported compilers)
Ned Deily3f1d0b32014-11-20 02:11:03 -08001501 --with(out)-ensurepip=[=OPTION]
1502 "install" or "upgrade" using bundled pip, default is
1503 "no"
Martin v. Löwis11437992002-04-12 09:54:03 +00001504
1505Some influential environment variables:
1506 CC C compiler command
1507 CFLAGS C compiler flags
1508 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1509 nonstandard directory <lib dir>
Martin v. Löwiseba40652007-08-30 20:10:57 +00001510 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001511 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Martin v. Löwiseba40652007-08-30 20:10:57 +00001512 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001513 CPP C preprocessor
Benjamin Peterson64e8f6e2014-12-15 00:00:23 -05001514 PKG_CONFIG path to pkg-config utility
1515 PKG_CONFIG_PATH
1516 directories to add to pkg-config's search path
1517 PKG_CONFIG_LIBDIR
1518 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001519
1520Use these variables to override the choices made by `configure' or to help
1521it to find libraries and programs with nonstandard names/locations.
1522
Georg Brandl464432d2009-05-20 18:24:08 +00001523Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001524_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001525ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001526fi
1527
1528if test "$ac_init_help" = "recursive"; then
1529 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001530 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001531 test -d "$ac_dir" ||
1532 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1533 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001534 ac_builddir=.
1535
Martin v. Löwiseba40652007-08-30 20:10:57 +00001536case "$ac_dir" in
1537.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1538*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001539 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001540 # A ".." for each directory in $ac_dir_suffix.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001541 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001542 case $ac_top_builddir_sub in
1543 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1544 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1545 esac ;;
1546esac
1547ac_abs_top_builddir=$ac_pwd
1548ac_abs_builddir=$ac_pwd$ac_dir_suffix
1549# for backward compatibility:
1550ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001551
1552case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001553 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001554 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001555 ac_top_srcdir=$ac_top_builddir_sub
1556 ac_abs_top_srcdir=$ac_pwd ;;
1557 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001558 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001559 ac_top_srcdir=$srcdir
1560 ac_abs_top_srcdir=$srcdir ;;
1561 *) # Relative name.
1562 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1563 ac_top_srcdir=$ac_top_build_prefix$srcdir
1564 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001565esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001566ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001567
Martin v. Löwiseba40652007-08-30 20:10:57 +00001568 cd "$ac_dir" || { ac_status=$?; continue; }
1569 # Check for guested configure.
1570 if test -f "$ac_srcdir/configure.gnu"; then
1571 echo &&
1572 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1573 elif test -f "$ac_srcdir/configure"; then
1574 echo &&
1575 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001576 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001577 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001578 fi || ac_status=$?
1579 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001580 done
1581fi
1582
Martin v. Löwiseba40652007-08-30 20:10:57 +00001583test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001584if $ac_init_version; then
1585 cat <<\_ACEOF
Martin v. Löwis174440b2008-10-03 08:59:41 +00001586python configure 2.7
Charles-François Natalibe2b9072013-01-08 19:47:00 +01001587generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001588
Charles-François Natalibe2b9072013-01-08 19:47:00 +01001589Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001590This configure script is free software; the Free Software Foundation
1591gives unlimited permission to copy, distribute and modify it.
1592_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001593 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001594fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001595
1596## ------------------------ ##
1597## Autoconf initialization. ##
1598## ------------------------ ##
1599
1600# ac_fn_c_try_compile LINENO
1601# --------------------------
1602# Try to compile conftest.$ac_ext, and return whether this succeeded.
1603ac_fn_c_try_compile ()
1604{
1605 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1606 rm -f conftest.$ac_objext
1607 if { { ac_try="$ac_compile"
1608case "(($ac_try" in
1609 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1610 *) ac_try_echo=$ac_try;;
1611esac
1612eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1613$as_echo "$ac_try_echo"; } >&5
1614 (eval "$ac_compile") 2>conftest.err
1615 ac_status=$?
1616 if test -s conftest.err; then
1617 grep -v '^ *+' conftest.err >conftest.er1
1618 cat conftest.er1 >&5
1619 mv -f conftest.er1 conftest.err
1620 fi
1621 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1622 test $ac_status = 0; } && {
1623 test -z "$ac_c_werror_flag" ||
1624 test ! -s conftest.err
1625 } && test -s conftest.$ac_objext; then :
1626 ac_retval=0
1627else
1628 $as_echo "$as_me: failed program was:" >&5
1629sed 's/^/| /' conftest.$ac_ext >&5
1630
1631 ac_retval=1
1632fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01001633 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001634 as_fn_set_status $ac_retval
1635
1636} # ac_fn_c_try_compile
1637
1638# ac_fn_c_try_cpp LINENO
1639# ----------------------
1640# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1641ac_fn_c_try_cpp ()
1642{
1643 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1644 if { { ac_try="$ac_cpp conftest.$ac_ext"
1645case "(($ac_try" in
1646 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1647 *) ac_try_echo=$ac_try;;
1648esac
1649eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1650$as_echo "$ac_try_echo"; } >&5
1651 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1652 ac_status=$?
1653 if test -s conftest.err; then
1654 grep -v '^ *+' conftest.err >conftest.er1
1655 cat conftest.er1 >&5
1656 mv -f conftest.er1 conftest.err
1657 fi
1658 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001659 test $ac_status = 0; } > conftest.i && {
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001660 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1661 test ! -s conftest.err
1662 }; then :
1663 ac_retval=0
1664else
1665 $as_echo "$as_me: failed program was:" >&5
1666sed 's/^/| /' conftest.$ac_ext >&5
1667
1668 ac_retval=1
1669fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01001670 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001671 as_fn_set_status $ac_retval
1672
1673} # ac_fn_c_try_cpp
1674
1675# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1676# -------------------------------------------------------
1677# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1678# the include files in INCLUDES and setting the cache variable VAR
1679# accordingly.
1680ac_fn_c_check_header_mongrel ()
1681{
1682 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Matthias Klose3cef2a92012-03-14 23:39:33 +01001683 if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001684 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1685$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001686if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001687 $as_echo_n "(cached) " >&6
1688fi
1689eval ac_res=\$$3
1690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1691$as_echo "$ac_res" >&6; }
1692else
1693 # Is the header compilable?
1694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1695$as_echo_n "checking $2 usability... " >&6; }
1696cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1697/* end confdefs.h. */
1698$4
1699#include <$2>
1700_ACEOF
1701if ac_fn_c_try_compile "$LINENO"; then :
1702 ac_header_compiler=yes
1703else
1704 ac_header_compiler=no
1705fi
1706rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1707{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1708$as_echo "$ac_header_compiler" >&6; }
1709
1710# Is the header present?
1711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1712$as_echo_n "checking $2 presence... " >&6; }
1713cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1714/* end confdefs.h. */
1715#include <$2>
1716_ACEOF
1717if ac_fn_c_try_cpp "$LINENO"; then :
1718 ac_header_preproc=yes
1719else
1720 ac_header_preproc=no
1721fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001722rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001723{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1724$as_echo "$ac_header_preproc" >&6; }
1725
1726# So? What about this header?
1727case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1728 yes:no: )
1729 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1730$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1731 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1732$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1733 ;;
1734 no:yes:* )
1735 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1736$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1737 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1738$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1739 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1740$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1741 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1742$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1743 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1744$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001745( $as_echo "## -------------------------------------- ##
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001746## Report this to http://bugs.python.org/ ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001747## -------------------------------------- ##"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001748 ) | sed "s/^/$as_me: WARNING: /" >&2
1749 ;;
1750esac
1751 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1752$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001753if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001754 $as_echo_n "(cached) " >&6
1755else
1756 eval "$3=\$ac_header_compiler"
1757fi
1758eval ac_res=\$$3
1759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1760$as_echo "$ac_res" >&6; }
1761fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01001762 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001763
1764} # ac_fn_c_check_header_mongrel
1765
1766# ac_fn_c_try_run LINENO
1767# ----------------------
1768# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1769# that executables *can* be run.
1770ac_fn_c_try_run ()
1771{
1772 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1773 if { { ac_try="$ac_link"
1774case "(($ac_try" in
1775 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1776 *) ac_try_echo=$ac_try;;
1777esac
1778eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1779$as_echo "$ac_try_echo"; } >&5
1780 (eval "$ac_link") 2>&5
1781 ac_status=$?
1782 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1783 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1784 { { case "(($ac_try" in
1785 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1786 *) ac_try_echo=$ac_try;;
1787esac
1788eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1789$as_echo "$ac_try_echo"; } >&5
1790 (eval "$ac_try") 2>&5
1791 ac_status=$?
1792 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1793 test $ac_status = 0; }; }; then :
1794 ac_retval=0
1795else
1796 $as_echo "$as_me: program exited with status $ac_status" >&5
1797 $as_echo "$as_me: failed program was:" >&5
1798sed 's/^/| /' conftest.$ac_ext >&5
1799
1800 ac_retval=$ac_status
1801fi
1802 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Matthias Klose3cef2a92012-03-14 23:39:33 +01001803 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001804 as_fn_set_status $ac_retval
1805
1806} # ac_fn_c_try_run
1807
1808# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1809# -------------------------------------------------------
1810# Tests whether HEADER exists and can be compiled using the include files in
1811# INCLUDES, setting the cache variable VAR accordingly.
1812ac_fn_c_check_header_compile ()
1813{
1814 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1815 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1816$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001817if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001818 $as_echo_n "(cached) " >&6
1819else
1820 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1821/* end confdefs.h. */
1822$4
1823#include <$2>
1824_ACEOF
1825if ac_fn_c_try_compile "$LINENO"; then :
1826 eval "$3=yes"
1827else
1828 eval "$3=no"
1829fi
1830rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1831fi
1832eval ac_res=\$$3
1833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1834$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001835 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001836
1837} # ac_fn_c_check_header_compile
1838
1839# ac_fn_c_try_link LINENO
1840# -----------------------
1841# Try to link conftest.$ac_ext, and return whether this succeeded.
1842ac_fn_c_try_link ()
1843{
1844 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1845 rm -f conftest.$ac_objext conftest$ac_exeext
1846 if { { ac_try="$ac_link"
1847case "(($ac_try" in
1848 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1849 *) ac_try_echo=$ac_try;;
1850esac
1851eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1852$as_echo "$ac_try_echo"; } >&5
1853 (eval "$ac_link") 2>conftest.err
1854 ac_status=$?
1855 if test -s conftest.err; then
1856 grep -v '^ *+' conftest.err >conftest.er1
1857 cat conftest.er1 >&5
1858 mv -f conftest.er1 conftest.err
1859 fi
1860 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1861 test $ac_status = 0; } && {
1862 test -z "$ac_c_werror_flag" ||
1863 test ! -s conftest.err
1864 } && test -s conftest$ac_exeext && {
1865 test "$cross_compiling" = yes ||
Charles-François Natalibe2b9072013-01-08 19:47:00 +01001866 test -x conftest$ac_exeext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001867 }; then :
1868 ac_retval=0
1869else
1870 $as_echo "$as_me: failed program was:" >&5
1871sed 's/^/| /' conftest.$ac_ext >&5
1872
1873 ac_retval=1
1874fi
1875 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1876 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1877 # interfere with the next link command; also delete a directory that is
1878 # left behind by Apple's compiler. We do this before executing the actions.
1879 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Matthias Klose3cef2a92012-03-14 23:39:33 +01001880 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001881 as_fn_set_status $ac_retval
1882
1883} # ac_fn_c_try_link
1884
1885# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1886# -------------------------------------------
1887# Tests whether TYPE exists after having included INCLUDES, setting cache
1888# variable VAR accordingly.
1889ac_fn_c_check_type ()
1890{
1891 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1892 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1893$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001894if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001895 $as_echo_n "(cached) " >&6
1896else
1897 eval "$3=no"
1898 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1899/* end confdefs.h. */
1900$4
1901int
1902main ()
1903{
1904if (sizeof ($2))
1905 return 0;
1906 ;
1907 return 0;
1908}
1909_ACEOF
1910if ac_fn_c_try_compile "$LINENO"; then :
1911 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1912/* end confdefs.h. */
1913$4
1914int
1915main ()
1916{
1917if (sizeof (($2)))
1918 return 0;
1919 ;
1920 return 0;
1921}
1922_ACEOF
1923if ac_fn_c_try_compile "$LINENO"; then :
1924
1925else
1926 eval "$3=yes"
1927fi
1928rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1929fi
1930rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1931fi
1932eval ac_res=\$$3
1933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1934$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001935 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001936
1937} # ac_fn_c_check_type
1938
1939# ac_fn_c_find_uintX_t LINENO BITS VAR
1940# ------------------------------------
1941# Finds an unsigned integer type with width BITS, setting cache variable VAR
1942# accordingly.
1943ac_fn_c_find_uintX_t ()
1944{
1945 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1946 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1947$as_echo_n "checking for uint$2_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001948if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001949 $as_echo_n "(cached) " >&6
1950else
1951 eval "$3=no"
1952 # Order is important - never check a type that is potentially smaller
1953 # than half of the expected target width.
1954 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1955 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1956 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1957/* end confdefs.h. */
1958$ac_includes_default
1959int
1960main ()
1961{
1962static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01001963test_array [0] = 0;
1964return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001965
1966 ;
1967 return 0;
1968}
1969_ACEOF
1970if ac_fn_c_try_compile "$LINENO"; then :
1971 case $ac_type in #(
1972 uint$2_t) :
1973 eval "$3=yes" ;; #(
1974 *) :
1975 eval "$3=\$ac_type" ;;
1976esac
1977fi
1978rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001979 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001980
1981else
1982 break
1983fi
1984 done
1985fi
1986eval ac_res=\$$3
1987 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1988$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001989 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001990
1991} # ac_fn_c_find_uintX_t
1992
1993# ac_fn_c_find_intX_t LINENO BITS VAR
1994# -----------------------------------
1995# Finds a signed integer type with width BITS, setting cache variable VAR
1996# accordingly.
1997ac_fn_c_find_intX_t ()
1998{
1999 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2000 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
2001$as_echo_n "checking for int$2_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002002if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002003 $as_echo_n "(cached) " >&6
2004else
2005 eval "$3=no"
2006 # Order is important - never check a type that is potentially smaller
2007 # than half of the expected target width.
2008 for ac_type in int$2_t 'int' 'long int' \
2009 'long long int' 'short int' 'signed char'; do
2010 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2011/* end confdefs.h. */
2012$ac_includes_default
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002013 enum { N = $2 / 2 - 1 };
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002014int
2015main ()
2016{
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002017static 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 +01002018test_array [0] = 0;
2019return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002020
2021 ;
2022 return 0;
2023}
2024_ACEOF
2025if ac_fn_c_try_compile "$LINENO"; then :
2026 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2027/* end confdefs.h. */
2028$ac_includes_default
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002029 enum { N = $2 / 2 - 1 };
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002030int
2031main ()
2032{
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002033static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002034 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002035test_array [0] = 0;
2036return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002037
2038 ;
2039 return 0;
2040}
2041_ACEOF
2042if ac_fn_c_try_compile "$LINENO"; then :
2043
2044else
2045 case $ac_type in #(
2046 int$2_t) :
2047 eval "$3=yes" ;; #(
2048 *) :
2049 eval "$3=\$ac_type" ;;
2050esac
2051fi
2052rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2053fi
2054rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002055 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002056
2057else
2058 break
2059fi
2060 done
2061fi
2062eval ac_res=\$$3
2063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2064$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002065 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002066
2067} # ac_fn_c_find_intX_t
2068
2069# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2070# --------------------------------------------
2071# Tries to find the compile-time value of EXPR in a program that includes
2072# INCLUDES, setting VAR accordingly. Returns whether the value could be
2073# computed
2074ac_fn_c_compute_int ()
2075{
2076 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2077 if test "$cross_compiling" = yes; then
2078 # Depending upon the size, compute the lo and hi bounds.
2079cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2080/* end confdefs.h. */
2081$4
2082int
2083main ()
2084{
2085static int test_array [1 - 2 * !(($2) >= 0)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002086test_array [0] = 0;
2087return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002088
2089 ;
2090 return 0;
2091}
2092_ACEOF
2093if ac_fn_c_try_compile "$LINENO"; then :
2094 ac_lo=0 ac_mid=0
2095 while :; do
2096 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2097/* end confdefs.h. */
2098$4
2099int
2100main ()
2101{
2102static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002103test_array [0] = 0;
2104return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002105
2106 ;
2107 return 0;
2108}
2109_ACEOF
2110if ac_fn_c_try_compile "$LINENO"; then :
2111 ac_hi=$ac_mid; break
2112else
2113 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2114 if test $ac_lo -le $ac_mid; then
2115 ac_lo= ac_hi=
2116 break
2117 fi
2118 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2119fi
2120rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2121 done
2122else
2123 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2124/* end confdefs.h. */
2125$4
2126int
2127main ()
2128{
2129static int test_array [1 - 2 * !(($2) < 0)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002130test_array [0] = 0;
2131return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002132
2133 ;
2134 return 0;
2135}
2136_ACEOF
2137if ac_fn_c_try_compile "$LINENO"; then :
2138 ac_hi=-1 ac_mid=-1
2139 while :; do
2140 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2141/* end confdefs.h. */
2142$4
2143int
2144main ()
2145{
2146static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002147test_array [0] = 0;
2148return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002149
2150 ;
2151 return 0;
2152}
2153_ACEOF
2154if ac_fn_c_try_compile "$LINENO"; then :
2155 ac_lo=$ac_mid; break
2156else
2157 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2158 if test $ac_mid -le $ac_hi; then
2159 ac_lo= ac_hi=
2160 break
2161 fi
2162 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2163fi
2164rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2165 done
2166else
2167 ac_lo= ac_hi=
2168fi
2169rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2170fi
2171rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2172# Binary search between lo and hi bounds.
2173while test "x$ac_lo" != "x$ac_hi"; do
2174 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2175 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2176/* end confdefs.h. */
2177$4
2178int
2179main ()
2180{
2181static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002182test_array [0] = 0;
2183return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002184
2185 ;
2186 return 0;
2187}
2188_ACEOF
2189if ac_fn_c_try_compile "$LINENO"; then :
2190 ac_hi=$ac_mid
2191else
2192 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2193fi
2194rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2195done
2196case $ac_lo in #((
2197?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2198'') ac_retval=1 ;;
2199esac
2200 else
2201 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2202/* end confdefs.h. */
2203$4
2204static long int longval () { return $2; }
2205static unsigned long int ulongval () { return $2; }
2206#include <stdio.h>
2207#include <stdlib.h>
2208int
2209main ()
2210{
2211
2212 FILE *f = fopen ("conftest.val", "w");
2213 if (! f)
2214 return 1;
2215 if (($2) < 0)
2216 {
2217 long int i = longval ();
2218 if (i != ($2))
2219 return 1;
2220 fprintf (f, "%ld", i);
2221 }
2222 else
2223 {
2224 unsigned long int i = ulongval ();
2225 if (i != ($2))
2226 return 1;
2227 fprintf (f, "%lu", i);
2228 }
2229 /* Do not output a trailing newline, as this causes \r\n confusion
2230 on some platforms. */
2231 return ferror (f) || fclose (f) != 0;
2232
2233 ;
2234 return 0;
2235}
2236_ACEOF
2237if ac_fn_c_try_run "$LINENO"; then :
2238 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2239else
2240 ac_retval=1
2241fi
2242rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2243 conftest.$ac_objext conftest.beam conftest.$ac_ext
2244rm -f conftest.val
2245
2246 fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01002247 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002248 as_fn_set_status $ac_retval
2249
2250} # ac_fn_c_compute_int
2251
2252# ac_fn_c_check_func LINENO FUNC VAR
2253# ----------------------------------
2254# Tests whether FUNC exists, setting the cache variable VAR accordingly
2255ac_fn_c_check_func ()
2256{
2257 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2258 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2259$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002260if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002261 $as_echo_n "(cached) " >&6
2262else
2263 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2264/* end confdefs.h. */
2265/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2266 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2267#define $2 innocuous_$2
2268
2269/* System header to define __stub macros and hopefully few prototypes,
2270 which can conflict with char $2 (); below.
2271 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2272 <limits.h> exists even on freestanding compilers. */
2273
2274#ifdef __STDC__
2275# include <limits.h>
2276#else
2277# include <assert.h>
2278#endif
2279
2280#undef $2
2281
2282/* Override any GCC internal prototype to avoid an error.
2283 Use char because int might match the return type of a GCC
2284 builtin and then its argument prototype would still apply. */
2285#ifdef __cplusplus
2286extern "C"
2287#endif
2288char $2 ();
2289/* The GNU C library defines this for functions which it implements
2290 to always fail with ENOSYS. Some functions are actually named
2291 something starting with __ and the normal name is an alias. */
2292#if defined __stub_$2 || defined __stub___$2
2293choke me
2294#endif
2295
2296int
2297main ()
2298{
2299return $2 ();
2300 ;
2301 return 0;
2302}
2303_ACEOF
2304if ac_fn_c_try_link "$LINENO"; then :
2305 eval "$3=yes"
2306else
2307 eval "$3=no"
2308fi
2309rm -f core conftest.err conftest.$ac_objext \
2310 conftest$ac_exeext conftest.$ac_ext
2311fi
2312eval ac_res=\$$3
2313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2314$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002315 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002316
2317} # ac_fn_c_check_func
2318
2319# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2320# ----------------------------------------------------
2321# Tries to find if the field MEMBER exists in type AGGR, after including
2322# INCLUDES, setting cache variable VAR accordingly.
2323ac_fn_c_check_member ()
2324{
2325 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2326 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2327$as_echo_n "checking for $2.$3... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002328if eval \${$4+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002329 $as_echo_n "(cached) " >&6
2330else
2331 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2332/* end confdefs.h. */
2333$5
2334int
2335main ()
2336{
2337static $2 ac_aggr;
2338if (ac_aggr.$3)
2339return 0;
2340 ;
2341 return 0;
2342}
2343_ACEOF
2344if ac_fn_c_try_compile "$LINENO"; then :
2345 eval "$4=yes"
2346else
2347 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2348/* end confdefs.h. */
2349$5
2350int
2351main ()
2352{
2353static $2 ac_aggr;
2354if (sizeof ac_aggr.$3)
2355return 0;
2356 ;
2357 return 0;
2358}
2359_ACEOF
2360if ac_fn_c_try_compile "$LINENO"; then :
2361 eval "$4=yes"
2362else
2363 eval "$4=no"
2364fi
2365rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2366fi
2367rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2368fi
2369eval ac_res=\$$4
2370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2371$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002372 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002373
2374} # ac_fn_c_check_member
2375
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002376# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2377# ---------------------------------------------
2378# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2379# accordingly.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002380ac_fn_c_check_decl ()
2381{
2382 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002383 as_decl_name=`echo $2|sed 's/ *(.*//'`
2384 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2385 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2386$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002387if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002388 $as_echo_n "(cached) " >&6
2389else
2390 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2391/* end confdefs.h. */
2392$4
2393int
2394main ()
2395{
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002396#ifndef $as_decl_name
2397#ifdef __cplusplus
2398 (void) $as_decl_use;
2399#else
2400 (void) $as_decl_name;
2401#endif
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002402#endif
2403
2404 ;
2405 return 0;
2406}
2407_ACEOF
2408if ac_fn_c_try_compile "$LINENO"; then :
2409 eval "$3=yes"
2410else
2411 eval "$3=no"
2412fi
2413rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2414fi
2415eval ac_res=\$$3
2416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2417$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002418 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002419
2420} # ac_fn_c_check_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +00002421cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002422This file contains any messages produced by compilers while
2423running configure, to aid debugging if configure makes a mistake.
2424
Martin v. Löwis174440b2008-10-03 08:59:41 +00002425It was created by python $as_me 2.7, which was
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002426generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002427
2428 $ $0 $@
2429
2430_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00002431exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002432{
2433cat <<_ASUNAME
2434## --------- ##
2435## Platform. ##
2436## --------- ##
2437
2438hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2439uname -m = `(uname -m) 2>/dev/null || echo unknown`
2440uname -r = `(uname -r) 2>/dev/null || echo unknown`
2441uname -s = `(uname -s) 2>/dev/null || echo unknown`
2442uname -v = `(uname -v) 2>/dev/null || echo unknown`
2443
2444/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2445/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2446
2447/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2448/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2449/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Martin v. Löwiseba40652007-08-30 20:10:57 +00002450/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002451/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2452/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2453/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2454
2455_ASUNAME
2456
2457as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2458for as_dir in $PATH
2459do
2460 IFS=$as_save_IFS
2461 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002462 $as_echo "PATH: $as_dir"
2463 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002464IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002465
2466} >&5
2467
2468cat >&5 <<_ACEOF
2469
2470
2471## ----------- ##
2472## Core tests. ##
2473## ----------- ##
2474
2475_ACEOF
2476
2477
2478# Keep a trace of the command line.
2479# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002480# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002481# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002482# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002483ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002484ac_configure_args0=
2485ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002486ac_must_keep_next=false
2487for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002488do
Skip Montanaro6dead952003-09-25 14:50:04 +00002489 for ac_arg
2490 do
2491 case $ac_arg in
2492 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2493 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2494 | -silent | --silent | --silen | --sile | --sil)
2495 continue ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002496 *\'*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002497 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002498 esac
2499 case $ac_pass in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002500 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002501 2)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002502 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002503 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002504 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002505 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002506 case $ac_arg in
2507 *=* | --config-cache | -C | -disable-* | --disable-* \
2508 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2509 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2510 | -with-* | --with-* | -without-* | --without-* | --x)
2511 case "$ac_configure_args0 " in
2512 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2513 esac
2514 ;;
2515 -* ) ac_must_keep_next=true ;;
2516 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002517 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002518 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002519 ;;
2520 esac
2521 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002522done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002523{ ac_configure_args0=; unset ac_configure_args0;}
2524{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002525
2526# When interrupted or exit'd, cleanup temporary files, and complete
2527# config.log. We remove comments because anyway the quotes in there
2528# would cause problems or look ugly.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002529# WARNING: Use '\'' to represent an apostrophe within the trap.
2530# 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 +00002531trap 'exit_status=$?
2532 # Save into config.log some information that might help in debugging.
2533 {
2534 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002535
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002536 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002537## Cache variables. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002538## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002539 echo
2540 # The following way of writing the cache mishandles newlines in values,
Martin v. Löwiseba40652007-08-30 20:10:57 +00002541(
2542 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2543 eval ac_val=\$$ac_var
2544 case $ac_val in #(
2545 *${as_nl}*)
2546 case $ac_var in #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002547 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2548$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002549 esac
2550 case $ac_var in #(
2551 _ | IFS | as_nl) ;; #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002552 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2553 *) { eval $ac_var=; unset $ac_var;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002554 esac ;;
2555 esac
2556 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002557 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +00002558 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2559 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002560 sed -n \
Martin v. Löwiseba40652007-08-30 20:10:57 +00002561 "s/'\''/'\''\\\\'\'''\''/g;
2562 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2563 ;; #(
Skip Montanaro89e975f2007-08-22 19:05:21 +00002564 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00002565 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaro89e975f2007-08-22 19:05:21 +00002566 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002567 esac |
2568 sort
2569)
Martin v. Löwis11437992002-04-12 09:54:03 +00002570 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002571
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002572 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002573## Output variables. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002574## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002575 echo
2576 for ac_var in $ac_subst_vars
2577 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002578 eval ac_val=\$$ac_var
2579 case $ac_val in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002580 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002581 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002582 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002583 done | sort
2584 echo
2585
2586 if test -n "$ac_subst_files"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002587 $as_echo "## ------------------- ##
Martin v. Löwiseba40652007-08-30 20:10:57 +00002588## File substitutions. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002589## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002590 echo
2591 for ac_var in $ac_subst_files
2592 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002593 eval ac_val=\$$ac_var
2594 case $ac_val in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002595 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002596 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002597 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002598 done | sort
2599 echo
2600 fi
2601
Martin v. Löwis11437992002-04-12 09:54:03 +00002602 if test -s confdefs.h; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002603 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002604## confdefs.h. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002605## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002606 echo
Martin v. Löwiseba40652007-08-30 20:10:57 +00002607 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002608 echo
2609 fi
2610 test "$ac_signal" != 0 &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002611 $as_echo "$as_me: caught signal $ac_signal"
2612 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002613 } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002614 rm -f core *.core core.conftest.* &&
2615 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002616 exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +00002617' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002618for ac_signal in 1 2 13 15; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002619 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002620done
2621ac_signal=0
2622
2623# confdefs.h avoids OS command line length limits that DEFS can exceed.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002624rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002625
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002626$as_echo "/* confdefs.h */" > confdefs.h
2627
Martin v. Löwis11437992002-04-12 09:54:03 +00002628# Predefined preprocessor variables.
2629
2630cat >>confdefs.h <<_ACEOF
2631#define PACKAGE_NAME "$PACKAGE_NAME"
2632_ACEOF
2633
Martin v. Löwis11437992002-04-12 09:54:03 +00002634cat >>confdefs.h <<_ACEOF
2635#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2636_ACEOF
2637
Martin v. Löwis11437992002-04-12 09:54:03 +00002638cat >>confdefs.h <<_ACEOF
2639#define PACKAGE_VERSION "$PACKAGE_VERSION"
2640_ACEOF
2641
Martin v. Löwis11437992002-04-12 09:54:03 +00002642cat >>confdefs.h <<_ACEOF
2643#define PACKAGE_STRING "$PACKAGE_STRING"
2644_ACEOF
2645
Martin v. Löwis11437992002-04-12 09:54:03 +00002646cat >>confdefs.h <<_ACEOF
2647#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2648_ACEOF
2649
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002650cat >>confdefs.h <<_ACEOF
2651#define PACKAGE_URL "$PACKAGE_URL"
2652_ACEOF
2653
Martin v. Löwis11437992002-04-12 09:54:03 +00002654
2655# Let the site file select an alternate cache file if it wants to.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002656# Prefer an explicitly selected file to automatically selected ones.
2657ac_site_file1=NONE
2658ac_site_file2=NONE
Martin v. Löwiseba40652007-08-30 20:10:57 +00002659if test -n "$CONFIG_SITE"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002660 # We do not want a PATH search for config.site.
2661 case $CONFIG_SITE in #((
2662 -*) ac_site_file1=./$CONFIG_SITE;;
2663 */*) ac_site_file1=$CONFIG_SITE;;
2664 *) ac_site_file1=./$CONFIG_SITE;;
2665 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00002666elif test "x$prefix" != xNONE; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002667 ac_site_file1=$prefix/share/config.site
2668 ac_site_file2=$prefix/etc/config.site
Martin v. Löwiseba40652007-08-30 20:10:57 +00002669else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002670 ac_site_file1=$ac_default_prefix/share/config.site
2671 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002672fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002673for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Martin v. Löwiseba40652007-08-30 20:10:57 +00002674do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002675 test "x$ac_site_file" = xNONE && continue
2676 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2677 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2678$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002679 sed 's/^/| /' "$ac_site_file" >&5
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002680 . "$ac_site_file" \
2681 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2682$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2683as_fn_error $? "failed to load site script $ac_site_file
Matthias Klose3cef2a92012-03-14 23:39:33 +01002684See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002685 fi
2686done
2687
2688if test -r "$cache_file"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002689 # Some versions of bash will fail to source /dev/null (special files
2690 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2691 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2692 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2693$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002694 case $cache_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00002695 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2696 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002697 esac
2698 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002699else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002700 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2701$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002702 >$cache_file
2703fi
2704
2705# Check that the precious variables saved in the cache have kept the same
2706# value.
2707ac_cache_corrupted=false
Martin v. Löwiseba40652007-08-30 20:10:57 +00002708for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002709 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2710 eval ac_new_set=\$ac_env_${ac_var}_set
Martin v. Löwiseba40652007-08-30 20:10:57 +00002711 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2712 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002713 case $ac_old_set,$ac_new_set in
2714 set,)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002715 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2716$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 +00002717 ac_cache_corrupted=: ;;
2718 ,set)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002719 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2720$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002721 ac_cache_corrupted=: ;;
2722 ,);;
2723 *)
2724 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002725 # differences in whitespace do not lead to failure.
2726 ac_old_val_w=`echo x $ac_old_val`
2727 ac_new_val_w=`echo x $ac_new_val`
2728 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2729 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2730$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2731 ac_cache_corrupted=:
2732 else
2733 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2734$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2735 eval $ac_var=\$ac_old_val
2736 fi
2737 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2738$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2739 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2740$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002741 fi;;
2742 esac
2743 # Pass precious variables to config.status.
2744 if test "$ac_new_set" = set; then
2745 case $ac_new_val in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002746 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002747 *) ac_arg=$ac_var=$ac_new_val ;;
2748 esac
2749 case " $ac_configure_args " in
2750 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002751 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002752 esac
2753 fi
2754done
2755if $ac_cache_corrupted; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002756 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2757$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2758 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2759$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002760 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002761fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002762## -------------------- ##
2763## Main body of script. ##
2764## -------------------- ##
Martin v. Löwiseba40652007-08-30 20:10:57 +00002765
Guido van Rossum7f43da71994-08-01 12:15:30 +00002766ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002767ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002768ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2769ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2770ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002771
Guido van Rossum627b2d71993-12-24 10:39:16 +00002772
Michael W. Hudson54241132001-12-07 15:38:26 +00002773
Martin v. Löwiseba40652007-08-30 20:10:57 +00002774ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002775
2776
doko@python.orgd65e2ba2013-01-31 23:52:03 +01002777ac_aux_dir=
2778for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2779 if test -f "$ac_dir/install-sh"; then
2780 ac_aux_dir=$ac_dir
2781 ac_install_sh="$ac_aux_dir/install-sh -c"
2782 break
2783 elif test -f "$ac_dir/install.sh"; then
2784 ac_aux_dir=$ac_dir
2785 ac_install_sh="$ac_aux_dir/install.sh -c"
2786 break
2787 elif test -f "$ac_dir/shtool"; then
2788 ac_aux_dir=$ac_dir
2789 ac_install_sh="$ac_aux_dir/shtool install -c"
2790 break
2791 fi
2792done
2793if test -z "$ac_aux_dir"; then
2794 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2795fi
2796
2797# These three variables are undocumented and unsupported,
2798# and are intended to be withdrawn in a future Autoconf release.
2799# They can cause serious problems if a builder's source tree is in a directory
2800# whose full name contains unusual characters.
2801ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2802ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2803ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2804
2805
2806# Make sure we can run config.sub.
2807$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2808 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2809
2810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2811$as_echo_n "checking build system type... " >&6; }
2812if ${ac_cv_build+:} false; then :
2813 $as_echo_n "(cached) " >&6
2814else
2815 ac_build_alias=$build_alias
2816test "x$ac_build_alias" = x &&
2817 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2818test "x$ac_build_alias" = x &&
2819 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2820ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2821 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2822
2823fi
2824{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2825$as_echo "$ac_cv_build" >&6; }
2826case $ac_cv_build in
2827*-*-*) ;;
2828*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2829esac
2830build=$ac_cv_build
2831ac_save_IFS=$IFS; IFS='-'
2832set x $ac_cv_build
2833shift
2834build_cpu=$1
2835build_vendor=$2
2836shift; shift
2837# Remember, the first character of IFS is used to create $*,
2838# except with old shells:
2839build_os=$*
2840IFS=$ac_save_IFS
2841case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2842
2843
2844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2845$as_echo_n "checking host system type... " >&6; }
2846if ${ac_cv_host+:} false; then :
2847 $as_echo_n "(cached) " >&6
2848else
2849 if test "x$host_alias" = x; then
2850 ac_cv_host=$ac_cv_build
2851else
2852 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2853 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2854fi
2855
2856fi
2857{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2858$as_echo "$ac_cv_host" >&6; }
2859case $ac_cv_host in
2860*-*-*) ;;
2861*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2862esac
2863host=$ac_cv_host
2864ac_save_IFS=$IFS; IFS='-'
2865set x $ac_cv_host
2866shift
2867host_cpu=$1
2868host_vendor=$2
2869shift; shift
2870# Remember, the first character of IFS is used to create $*,
2871# except with old shells:
2872host_os=$*
2873IFS=$ac_save_IFS
2874case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2875
2876
2877
2878
2879
Ned Deily983df862014-08-22 13:30:59 -07002880# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2881rm -f pybuilddir.txt
2882
doko@python.orgd65e2ba2013-01-31 23:52:03 +01002883if test "$cross_compiling" = yes; then
2884 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2885$as_echo_n "checking for python interpreter for cross build... " >&6; }
2886 if test -z "$PYTHON_FOR_BUILD"; then
2887 for interp in python$PACKAGE_VERSION python2 python; do
2888 which $interp >/dev/null 2>&1 || continue
2889 if $interp -c 'import sys;sys.exit(not (sys.version_info[:2] >= (2,7) and sys.version_info[0] < 3))'; then
2890 break
2891 fi
2892 interp=
2893 done
2894 if test x$interp = x; then
2895 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2896 fi
2897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2898$as_echo "$interp" >&6; }
doko@ubuntu.coma50b0de2015-04-13 21:55:59 +02002899 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 +01002900 fi
2901elif test "$cross_compiling" = maybe; then
2902 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
2903else
2904 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2905fi
2906
2907
Martin v. Löwis11437992002-04-12 09:54:03 +00002908
Georg Brandlbcd64a32009-03-31 21:45:18 +00002909if test "$prefix" != "/"; then
2910 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2911fi
2912
2913
Martin v. Löwis11437992002-04-12 09:54:03 +00002914
2915
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002916# We don't use PACKAGE_ variables, and they cause conflicts
2917# with other autoconf-based packages that include Python.h
2918grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2919rm confdefs.h
2920mv confdefs.h.new confdefs.h
2921
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002922
Martin v. Löwis174440b2008-10-03 08:59:41 +00002923VERSION=2.7
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002924
Martin v. Löwis1142de32002-03-29 16:28:31 +00002925
2926SOVERSION=1.0
2927
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002928# The later defininition of _XOPEN_SOURCE disables certain features
2929# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2930
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002931$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002932
2933
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002934# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2935# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2936# them.
2937
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002938$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002939
2940
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002941# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2942# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2943# them.
2944
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002945$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002946
2947
Martin v. Löwisd6320502004-08-12 13:45:08 +00002948# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2949# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2950
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002951$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002952
2953
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002954# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2955# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2956# them.
2957
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002958$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002959
2960
2961
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002962define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002963
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002964# Arguments passed to configure.
2965
2966CONFIG_ARGS="$ac_configure_args"
2967
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
2969$as_echo_n "checking for --enable-universalsdk... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002970# Check whether --enable-universalsdk was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002971if test "${enable_universalsdk+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00002972 enableval=$enable_universalsdk;
Ronald Oussoren988117f2006-04-29 11:31:35 +00002973 case $enableval in
2974 yes)
2975 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002976 if test ! -d "${enableval}"
2977 then
2978 enableval=/
2979 fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00002980 ;;
2981 esac
2982 case $enableval in
2983 no)
2984 UNIVERSALSDK=
2985 enable_universalsdk=
2986 ;;
2987 *)
2988 UNIVERSALSDK=$enableval
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002989 if test ! -d "${UNIVERSALSDK}"
2990 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002991 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002992 fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00002993 ;;
2994 esac
2995
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002996
Ronald Oussoren988117f2006-04-29 11:31:35 +00002997else
2998
2999 UNIVERSALSDK=
3000 enable_universalsdk=
3001
Martin v. Löwiseba40652007-08-30 20:10:57 +00003002fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00003003
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003004if test -n "${UNIVERSALSDK}"
3005then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3007$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003008else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3010$as_echo "no" >&6; }
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003011fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00003012
Martin v. Löwiseba40652007-08-30 20:10:57 +00003013
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +00003014
Ned Deily8e60f6e2013-05-30 00:14:29 -07003015ARCH_RUN_32BIT=""
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +00003016
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003017UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren92919a62009-12-24 13:30:58 +00003018
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3020$as_echo_n "checking for --with-universal-archs... " >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003021
3022# Check whether --with-universal-archs was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003023if test "${with_universal_archs+set}" = set; then :
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003024 withval=$with_universal_archs;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
3026$as_echo "$withval" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003027 UNIVERSAL_ARCHS="$withval"
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00003028 if test "${enable_universalsdk}" ; then
3029 :
3030 else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003031 as_fn_error $? "--with-universal-archs without --enable-universalsdk. See Mac/README" "$LINENO" 5
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00003032 fi
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003033
3034else
3035
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003036 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 32-bit" >&5
3037$as_echo "32-bit" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003038
3039fi
3040
3041
3042
3043
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003044
3045# Check whether --with-framework-name was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003046if test "${with_framework_name+set}" = set; then :
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003047 withval=$with_framework_name;
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00003048 if test "${enable_framework}"; then
3049 :
3050 else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003051 as_fn_error $? "--with-framework-name without --enable-framework. See Mac/README" "$LINENO" 5
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00003052 fi
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003053 PYTHONFRAMEWORK=${withval}
3054 PYTHONFRAMEWORKDIR=${withval}.framework
3055 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3056
3057else
3058
3059 PYTHONFRAMEWORK=Python
3060 PYTHONFRAMEWORKDIR=Python.framework
3061 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3062
3063fi
3064
Martin v. Löwiseba40652007-08-30 20:10:57 +00003065# Check whether --enable-framework was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003066if test "${enable_framework+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003067 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003068 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003069 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003070 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003071 esac
3072 case $enableval in
3073 no)
3074 PYTHONFRAMEWORK=
3075 PYTHONFRAMEWORKDIR=no-framework
3076 PYTHONFRAMEWORKPREFIX=
3077 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00003078 FRAMEWORKINSTALLFIRST=
3079 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00003080 FRAMEWORKALTINSTALLFIRST=
3081 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00003082 if test "x${prefix}" = "xNONE"; then
3083 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3084 else
3085 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3086 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003087 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003088 ;;
3089 *)
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003090 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003091 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00003092 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003093 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure bininstall maninstall"
Ronald Oussoren92919a62009-12-24 13:30:58 +00003094 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3095 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003096 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003097
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00003098 if test "x${prefix}" = "xNONE" ; then
3099 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003100
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00003101 else
3102 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3103 fi
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003104
3105 case "${enableval}" in
3106 /System*)
3107 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3108 if test "${prefix}" = "NONE" ; then
3109 # See below
3110 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3111 fi
3112 ;;
3113
3114 /Library*)
3115 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3116 ;;
3117
3118 */Library/Frameworks)
3119 MDIR="`dirname "${enableval}"`"
3120 MDIR="`dirname "${MDIR}"`"
3121 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3122
3123 if test "${prefix}" = "NONE"; then
3124 # User hasn't specified the
3125 # --prefix option, but wants to install
3126 # the framework in a non-default location,
3127 # ensure that the compatibility links get
3128 # installed relative to that prefix as well
3129 # instead of in /usr/local.
3130 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3131 fi
3132 ;;
3133
3134 *)
3135 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3136 ;;
3137 esac
3138
Jack Jansen127e56e2001-09-11 14:41:54 +00003139 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Ronald Oussoren836b0392006-05-14 19:56:34 +00003140
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003141 # Add files for Mac specific code to the list of output
Ronald Oussoren836b0392006-05-14 19:56:34 +00003142 # files:
Martin v. Löwiseba40652007-08-30 20:10:57 +00003143 ac_config_files="$ac_config_files Mac/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00003144
Martin v. Löwiseba40652007-08-30 20:10:57 +00003145 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00003146
Martin v. Löwiseba40652007-08-30 20:10:57 +00003147 ac_config_files="$ac_config_files Mac/IDLE/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00003148
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003149 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3150
3151 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3152
Jack Jansene578a632001-08-15 01:27:14 +00003153 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003154
Guido van Rossum563e7081996-09-10 18:20:48 +00003155else
Martin v. Löwis11437992002-04-12 09:54:03 +00003156
Jack Jansene578a632001-08-15 01:27:14 +00003157 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003158 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003159 PYTHONFRAMEWORKPREFIX=
3160 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00003161 FRAMEWORKINSTALLFIRST=
3162 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00003163 FRAMEWORKALTINSTALLFIRST=
3164 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00003165 if test "x${prefix}" = "xNONE" ; then
3166 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3167 else
3168 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3169 fi
Jack Jansene578a632001-08-15 01:27:14 +00003170 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003171
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003172
Martin v. Löwiseba40652007-08-30 20:10:57 +00003173fi
3174
Michael W. Hudson54241132001-12-07 15:38:26 +00003175
3176
3177
3178
Jack Jansene578a632001-08-15 01:27:14 +00003179
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00003180
3181
Ronald Oussoren5b787322006-06-06 19:50:24 +00003182
3183
3184
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003185
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003186
Jack Jansene578a632001-08-15 01:27:14 +00003187##AC_ARG_WITH(dyld,
Matthias Klose22520ea2010-05-08 10:14:46 +00003188## AS_HELP_STRING([--with-dyld],
3189## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003190##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003191# Set name for machine-dependent library files
3192
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3194$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003195if test -z "$MACHDEP"
3196then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003197 # avoid using uname for cross builds
3198 if test "$cross_compiling" = yes; then
3199 # ac_sys_system and ac_sys_release are only used for setting
3200 # `define_xopen_source' in the case statement below. For the
3201 # current supported cross builds, this macro is not adjusted.
3202 case "$host" in
3203 *-*-linux*)
3204 ac_sys_system=Linux
3205 ;;
3206 *-*-cygwin*)
3207 ac_sys_system=Cygwin
3208 ;;
3209 *)
3210 # for now, limit cross builds to known configurations
3211 MACHDEP="unknown"
3212 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3213 esac
3214 ac_sys_release=
3215 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003216 ac_sys_system=`uname -s`
Georg Brandlfe18a112009-09-04 07:55:14 +00003217 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003218 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003219 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003220 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003221 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003222 fi
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003223 fi
3224 ac_md_system=`echo $ac_sys_system |
3225 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3226 ac_md_release=`echo $ac_sys_release |
3227 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3228 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003229
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003230 case $MACHDEP in
Victor Stinneracacbaa2011-08-20 14:02:38 +02003231 linux*) MACHDEP="linux2";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003232 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003233 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003234 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00003235 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003236 '') MACHDEP="unknown";;
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003237 esac
3238fi
3239
3240
3241if test "$cross_compiling" = yes; then
3242 case "$host" in
3243 *-*-linux*)
3244 case "$host_cpu" in
3245 arm*)
3246 _host_cpu=arm
3247 ;;
3248 *)
3249 _host_cpu=$host_cpu
3250 esac
3251 ;;
3252 *-*-cygwin*)
3253 _host_cpu=
3254 ;;
3255 *)
3256 # for now, limit cross builds to known configurations
3257 MACHDEP="unknown"
3258 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003259 esac
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003260 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003261fi
Guido van Rossum91922671997-10-09 20:24:13 +00003262
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003263# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3264# disable features if it is defined, without any means to access these
3265# features as extensions. For these systems, we skip the definition of
3266# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3267# some feature, make sure there is no alternative way to access this
3268# feature. Also, when using wildcards, make sure you have verified the
3269# need for not defining _XOPEN_SOURCE on all systems matching the
3270# wildcard, and that the wildcard does not include future systems
3271# (which may remove their limitations).
3272case $ac_sys_system/$ac_sys_release in
3273 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3274 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003275 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis7875ef62010-02-15 21:41:12 +00003276 # In addition, Stefan Krah confirms that issue #1244610 exists through
3277 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali97781b02011-07-22 23:43:42 +02003278 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Martin v. Löwiscb78de62007-12-29 18:49:21 +00003279 define_xopen_source=no
3280 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3281 # also defined. This can be overridden by defining _BSD_SOURCE
3282 # As this has a different meaning on Linux, only define it on OpenBSD
3283
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003284$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwiscb78de62007-12-29 18:49:21 +00003285
3286 ;;
Charles-François Natali97781b02011-07-22 23:43:42 +02003287 OpenBSD/*)
Martin v. Löwis5e2dd862010-02-15 08:32:00 +00003288 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3289 # also defined. This can be overridden by defining _BSD_SOURCE
3290 # As this has a different meaning on Linux, only define it on OpenBSD
3291
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003292$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis5e2dd862010-02-15 08:32:00 +00003293
3294 ;;
Martin v. Löwis4d542ec2006-11-25 15:39:19 +00003295 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3296 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3297 # Marc Recht
Benjamin Petersoneac68f42008-11-16 17:54:55 +00003298 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 +00003299 define_xopen_source=no;;
Martin v. Löwisb41afb52010-05-28 15:28:47 +00003300 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3301 # request to enable features supported by the standard as a request
3302 # to disable features not supported by the standard. The best way
3303 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3304 # entirely and define __EXTENSIONS__ instead.
3305 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003306 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003307 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3308 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003309 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003310 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003311 define_xopen_source=no;;
3312 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003313 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003314 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003315 define_xopen_source=no;;
Martin v. Löwisbb86d832008-11-04 20:40:09 +00003316 # On FreeBSD 4, the math functions C89 does not cover are never defined
3317 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3318 FreeBSD/4.*)
3319 define_xopen_source=no;;
3320 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3321 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3322 # identifies itself as Darwin/7.*
3323 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3324 # disables platform specific features beyond repair.
3325 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3326 # has no effect, don't bother defining them
3327 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003328 define_xopen_source=no;;
Ronald Oussorena55af9a2010-01-17 16:25:57 +00003329 Darwin/1[0-9].*)
3330 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003331 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3332 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3333 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003334 AIX/4)
3335 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003336 AIX/5)
3337 if test `uname -r` -eq 1; then
3338 define_xopen_source=no
3339 fi
3340 ;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00003341 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3342 # defining NI_NUMERICHOST.
3343 QNX/6.3.2)
3344 define_xopen_source=no
3345 ;;
Martin v. Löwisa0588362006-04-04 06:03:50 +00003346
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003347esac
3348
3349if test $define_xopen_source = yes
3350then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003351
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003352$as_echo "#define _XOPEN_SOURCE 600" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003353
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003354
3355 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3356 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3357 # several APIs are not declared. Since this is also needed in some
3358 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003359
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003360$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003361
3362
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003363
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003364$as_echo "#define _POSIX_C_SOURCE 200112L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003365
3366
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003367fi
3368
Guido van Rossum91922671997-10-09 20:24:13 +00003369#
3370# SGI compilers allow the specification of the both the ABI and the
3371# ISA on the command line. Depending on the values of these switches,
3372# different and often incompatable code will be generated.
3373#
3374# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3375# thus supply support for various ABI/ISA combinations. The MACHDEP
3376# variable is also adjusted.
3377#
3378
3379if test ! -z "$SGI_ABI"
3380then
3381 CC="cc $SGI_ABI"
3382 LDFLAGS="$SGI_ABI $LDFLAGS"
3383 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3384fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003385{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3386$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003387
doko@ubuntu.coma50b0de2015-04-13 21:55:59 +02003388
3389PLATDIR=plat-$MACHDEP
3390
Jack Jansen83f898c2002-12-30 22:23:40 +00003391# And add extra plat-mac for darwin
3392
Jack Jansen7b59b422003-03-17 15:44:10 +00003393
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking EXTRAPLATDIR" >&5
3395$as_echo_n "checking EXTRAPLATDIR... " >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00003396if test -z "$EXTRAPLATDIR"
3397then
3398 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00003399 darwin)
3400 EXTRAPLATDIR="\$(PLATMACDIRS)"
3401 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
3402 ;;
3403 *)
3404 EXTRAPLATDIR=""
3405 EXTRAMACHDEPPATH=""
3406 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00003407 esac
3408fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003409{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRAPLATDIR" >&5
3410$as_echo "$EXTRAPLATDIR" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00003411
Jack Jansen6b08a402004-06-03 12:41:45 +00003412# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3413# it may influence the way we can build extensions, so distutils
3414# needs to check it
3415
Ronald Oussoren988117f2006-04-29 11:31:35 +00003416
Jack Jansen6b08a402004-06-03 12:41:45 +00003417CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Ronald Oussoren988117f2006-04-29 11:31:35 +00003418EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003419
Guido van Rossum627b2d71993-12-24 10:39:16 +00003420# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003421
3422# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3423# for debug/optimization stuff. BASECFLAGS is for flags that are required
3424# just to get things to compile and link. Users are free to override OPT
3425# when running configure or make. The build should not break if they do.
3426# BASECFLAGS should generally not be messed with, however.
3427
3428# XXX shouldn't some/most/all of this code be merged with the stuff later
3429# on that fiddles with OPT and BASECFLAGS?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3431$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003432
Martin v. Löwiseba40652007-08-30 20:10:57 +00003433# Check whether --with-gcc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003434if test "${with_gcc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003435 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003436 case $withval in
Mark Dickinson04b27232009-01-04 12:29:36 +00003437 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003438 without_gcc=yes;;
3439 yes) CC=gcc
3440 without_gcc=no;;
3441 *) CC=$withval
3442 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003443 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003444else
Martin v. Löwis11437992002-04-12 09:54:03 +00003445
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003446 case $ac_sys_system in
Antoine Pitrou285cd162010-09-21 15:23:17 +00003447 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003448 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003449 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003450 case $BE_HOST_CPU in
3451 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00003452 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003453 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00003454 BASECFLAGS="$BASECFLAGS -export pragma"
3455 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003456 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003457 ;;
3458 x86)
Fred Drake5790be12000-10-09 17:06:13 +00003459 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003460 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00003461 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003462 ;;
3463 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003464 as_fn_error $? "Unknown BeOS platform \"$BE_HOST_CPU\"" "$LINENO" 5
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003465 ;;
3466 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003467 AR="\$(srcdir)/Modules/ar_beos"
3468 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003469 ;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003470 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003471 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00003472fi
3473
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003474{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3475$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003476
Guido van Rossum8b131c51995-03-09 14:10:13 +00003477# If the user switches compilers, we can't believe the cache
3478if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3479then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003480 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003481(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003482fi
3483
Trent Nelson15daa352012-12-13 06:46:39 +00003484if test "$MACHDEP" = "irix6" && test "$CC" != "gcc"; then
3485 # Normally, MIPSpro CC treats #error directives as warnings, which means
3486 # a successful exit code is returned (0). This is a problem because IRIX
3487 # has a bunch of system headers with this guard at the top:
3488 #
3489 # #ifndef __c99
3490 # #error This header file is to be used only for c99 mode compilations
3491 # #else
3492 #
3493 # When autoconf tests for such a header, like stdint.h, this happens:
3494 #
3495 # configure:4619: cc -c conftest.c >&5
3496 # cc-1035 cc: WARNING File = /usr/include/stdint.h, Line = 5
3497 # #error directive: This header file is to be used only for c99 mode
3498 # compilations
3499 #
3500 # #error This header file is to be used only for c99 mode compilations
3501 # ^
3502 #
3503 # configure:4619: $? = 0
3504 # configure:4619: result: yes
3505 #
3506 # Therefore, we use `-diag_error 1035` to have the compiler treat the
3507 # warning as an error, which causes cc to return a non-zero result,
3508 # which autoconf can interpret correctly.
3509 CFLAGS="$CFLAGS -diag_error 1035"
3510 # Whilst we're here, we might as well make sure CXX defaults to something
3511 # sensible if we're not using gcc.
3512 if test -z "$CXX"; then
3513 CXX="CC"
3514 fi
3515fi
3516
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00003517# If the user set CFLAGS, use this instead of the automatically
3518# determined setting
3519preset_cflags="$CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +00003520ac_ext=c
3521ac_cpp='$CPP $CPPFLAGS'
3522ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3523ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3524ac_compiler_gnu=$ac_cv_c_compiler_gnu
3525if test -n "$ac_tool_prefix"; then
3526 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3527set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3529$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003530if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003531 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003532else
3533 if test -n "$CC"; then
3534 ac_cv_prog_CC="$CC" # Let the user override the test.
3535else
Martin v. Löwis11437992002-04-12 09:54:03 +00003536as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3537for as_dir in $PATH
3538do
3539 IFS=$as_save_IFS
3540 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003541 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003542 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003543 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003544 $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 +00003545 break 2
3546 fi
3547done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003548 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003549IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003550
Jack Jansendd19cf82001-12-06 22:36:17 +00003551fi
3552fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003553CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003554if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003555 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3556$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003557else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3559$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003560fi
3561
Martin v. Löwiseba40652007-08-30 20:10:57 +00003562
Martin v. Löwis11437992002-04-12 09:54:03 +00003563fi
3564if test -z "$ac_cv_prog_CC"; then
3565 ac_ct_CC=$CC
3566 # Extract the first word of "gcc", so it can be a program name with args.
3567set dummy gcc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3569$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003570if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003571 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003572else
3573 if test -n "$ac_ct_CC"; then
3574 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3575else
3576as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3577for as_dir in $PATH
3578do
3579 IFS=$as_save_IFS
3580 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003581 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003582 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003583 ac_cv_prog_ac_ct_CC="gcc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003584 $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 +00003585 break 2
3586 fi
3587done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003588 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003589IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003590
3591fi
3592fi
3593ac_ct_CC=$ac_cv_prog_ac_ct_CC
3594if test -n "$ac_ct_CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3596$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003597else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3599$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003600fi
3601
Martin v. Löwiseba40652007-08-30 20:10:57 +00003602 if test "x$ac_ct_CC" = x; then
3603 CC=""
3604 else
3605 case $cross_compiling:$ac_tool_warned in
3606yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003607{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3608$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00003609ac_tool_warned=yes ;;
3610esac
3611 CC=$ac_ct_CC
3612 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003613else
3614 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003615fi
3616
Jack Jansendd19cf82001-12-06 22:36:17 +00003617if test -z "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003618 if test -n "$ac_tool_prefix"; then
3619 # 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 +00003620set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3622$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003623if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003624 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003625else
3626 if test -n "$CC"; then
3627 ac_cv_prog_CC="$CC" # Let the user override the test.
3628else
Martin v. Löwis11437992002-04-12 09:54:03 +00003629as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3630for as_dir in $PATH
3631do
3632 IFS=$as_save_IFS
3633 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003634 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003635 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003636 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003637 $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 +00003638 break 2
3639 fi
3640done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003641 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003642IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003643
3644fi
3645fi
3646CC=$ac_cv_prog_CC
3647if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3649$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003650else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3652$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003653fi
3654
Martin v. Löwiseba40652007-08-30 20:10:57 +00003655
Martin v. Löwis11437992002-04-12 09:54:03 +00003656 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003657fi
3658if test -z "$CC"; then
3659 # Extract the first word of "cc", so it can be a program name with args.
3660set dummy cc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3662$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003663if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003664 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003665else
3666 if test -n "$CC"; then
3667 ac_cv_prog_CC="$CC" # Let the user override the test.
3668else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003669 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003670as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3671for as_dir in $PATH
3672do
3673 IFS=$as_save_IFS
3674 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003675 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003676 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003677 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3678 ac_prog_rejected=yes
3679 continue
3680 fi
3681 ac_cv_prog_CC="cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003682 $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 +00003683 break 2
3684 fi
3685done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003686 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003687IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003688
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003689if test $ac_prog_rejected = yes; then
3690 # We found a bogon in the path, so make sure we never use it.
3691 set dummy $ac_cv_prog_CC
3692 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003693 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003694 # We chose a different compiler from the bogus one.
3695 # However, it has the same basename, so the bogon will be chosen
3696 # first if we set CC to just the basename; use the full file name.
3697 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003698 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003699 fi
3700fi
3701fi
3702fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003703CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003704if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3706$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003707else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3709$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003710fi
3711
Martin v. Löwiseba40652007-08-30 20:10:57 +00003712
Martin v. Löwis11437992002-04-12 09:54:03 +00003713fi
3714if test -z "$CC"; then
3715 if test -n "$ac_tool_prefix"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003716 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003717 do
3718 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3719set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3721$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003722if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003723 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003724else
3725 if test -n "$CC"; then
3726 ac_cv_prog_CC="$CC" # Let the user override the test.
3727else
Martin v. Löwis11437992002-04-12 09:54:03 +00003728as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3729for as_dir in $PATH
3730do
3731 IFS=$as_save_IFS
3732 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003733 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003734 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003735 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003736 $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 +00003737 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003738 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003739done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003740 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003741IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003742
3743fi
3744fi
3745CC=$ac_cv_prog_CC
3746if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3748$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003749else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3751$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003752fi
3753
Martin v. Löwiseba40652007-08-30 20:10:57 +00003754
Martin v. Löwis11437992002-04-12 09:54:03 +00003755 test -n "$CC" && break
3756 done
3757fi
3758if test -z "$CC"; then
3759 ac_ct_CC=$CC
Martin v. Löwiseba40652007-08-30 20:10:57 +00003760 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003761do
3762 # Extract the first word of "$ac_prog", so it can be a program name with args.
3763set dummy $ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3765$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003766if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003767 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003768else
3769 if test -n "$ac_ct_CC"; then
3770 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3771else
3772as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3773for as_dir in $PATH
3774do
3775 IFS=$as_save_IFS
3776 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003777 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003778 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003779 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003780 $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 +00003781 break 2
3782 fi
3783done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003784 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003785IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003786
Martin v. Löwis11437992002-04-12 09:54:03 +00003787fi
3788fi
3789ac_ct_CC=$ac_cv_prog_ac_ct_CC
3790if test -n "$ac_ct_CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3792$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003793else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3795$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003796fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003797
Martin v. Löwiseba40652007-08-30 20:10:57 +00003798
Martin v. Löwis11437992002-04-12 09:54:03 +00003799 test -n "$ac_ct_CC" && break
3800done
Michael W. Hudson54241132001-12-07 15:38:26 +00003801
Martin v. Löwiseba40652007-08-30 20:10:57 +00003802 if test "x$ac_ct_CC" = x; then
3803 CC=""
3804 else
3805 case $cross_compiling:$ac_tool_warned in
3806yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003807{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3808$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00003809ac_tool_warned=yes ;;
3810esac
3811 CC=$ac_ct_CC
3812 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003813fi
3814
3815fi
3816
3817
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003818test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3819$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003820as_fn_error $? "no acceptable C compiler found in \$PATH
Matthias Klose3cef2a92012-03-14 23:39:33 +01003821See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003822
3823# Provide some information about the compiler.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003824$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3825set X $ac_compile
3826ac_compiler=$2
3827for ac_option in --version -v -V -qversion; do
3828 { { ac_try="$ac_compiler $ac_option >&5"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003829case "(($ac_try" in
3830 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3831 *) ac_try_echo=$ac_try;;
3832esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003833eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3834$as_echo "$ac_try_echo"; } >&5
3835 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003836 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003837 if test -s conftest.err; then
3838 sed '10a\
3839... rest of stderr output deleted ...
3840 10q' conftest.err >conftest.er1
3841 cat conftest.er1 >&5
3842 fi
3843 rm -f conftest.er1 conftest.err
3844 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3845 test $ac_status = 0; }
3846done
Martin v. Löwis11437992002-04-12 09:54:03 +00003847
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003848cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003849/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003850
Martin v. Löwis11437992002-04-12 09:54:03 +00003851int
3852main ()
3853{
3854
3855 ;
3856 return 0;
3857}
3858_ACEOF
3859ac_clean_files_save=$ac_clean_files
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003860ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003861# Try to create an executable without -o first, disregard a.out.
3862# It will help us diagnose broken compilers, and finding out an intuition
3863# of exeext.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3865$as_echo_n "checking whether the C compiler works... " >&6; }
3866ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3867
3868# The possible output files:
3869ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3870
Martin v. Löwiseba40652007-08-30 20:10:57 +00003871ac_rmfiles=
3872for ac_file in $ac_files
3873do
3874 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003875 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00003876 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3877 esac
3878done
3879rm -f $ac_rmfiles
3880
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003881if { { ac_try="$ac_link_default"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003882case "(($ac_try" in
3883 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3884 *) ac_try_echo=$ac_try;;
3885esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003886eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3887$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003888 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003889 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003890 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3891 test $ac_status = 0; }; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003892 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3893# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3894# in a Makefile. We should not override ac_cv_exeext if it was cached,
3895# so that the user can short-circuit this test for compilers unknown to
3896# Autoconf.
3897for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003898do
3899 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003900 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003901 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Skip Montanarof0d5f792004-08-15 14:08:23 +00003902 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003903 [ab].out )
Skip Montanarof0d5f792004-08-15 14:08:23 +00003904 # We found the default executable, but exeext='' is most
3905 # certainly right.
3906 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003907 *.* )
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003908 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Martin v. Löwiseba40652007-08-30 20:10:57 +00003909 then :; else
3910 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3911 fi
3912 # We set ac_cv_exeext here because the later test for it is not
3913 # safe: cross compilers may not add the suffix if given an `-o'
3914 # argument, so we may need to know it at that point already.
3915 # Even if this section looks crufty: it has the advantage of
3916 # actually working.
Skip Montanarof0d5f792004-08-15 14:08:23 +00003917 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003918 * )
Skip Montanarof0d5f792004-08-15 14:08:23 +00003919 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003920 esac
3921done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003922test "$ac_cv_exeext" = no && ac_cv_exeext=
3923
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003924else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003925 ac_file=''
3926fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003927if test -z "$ac_file"; then :
3928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3929$as_echo "no" >&6; }
3930$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003931sed 's/^/| /' conftest.$ac_ext >&5
3932
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003933{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3934$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003935as_fn_error 77 "C compiler cannot create executables
Matthias Klose3cef2a92012-03-14 23:39:33 +01003936See \`config.log' for more details" "$LINENO" 5; }
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003937else
3938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3939$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003940fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3942$as_echo_n "checking for C compiler default output file name... " >&6; }
3943{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3944$as_echo "$ac_file" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003945ac_exeext=$ac_cv_exeext
Michael W. Hudson54241132001-12-07 15:38:26 +00003946
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003947rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00003948ac_clean_files=$ac_clean_files_save
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3950$as_echo_n "checking for suffix of executables... " >&6; }
3951if { { ac_try="$ac_link"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003952case "(($ac_try" in
3953 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3954 *) ac_try_echo=$ac_try;;
3955esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003956eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3957$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003958 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003959 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003960 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3961 test $ac_status = 0; }; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00003962 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3963# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3964# work properly (i.e., refer to `conftest.exe'), while it won't with
3965# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00003966for ac_file in conftest.exe conftest conftest.*; do
3967 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003968 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003969 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003970 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
Skip Montanarof0d5f792004-08-15 14:08:23 +00003971 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003972 * ) break;;
3973 esac
3974done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003975else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003976 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3977$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003978as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Matthias Klose3cef2a92012-03-14 23:39:33 +01003979See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003980fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003981rm -f conftest conftest$ac_cv_exeext
3982{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3983$as_echo "$ac_cv_exeext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003984
3985rm -f conftest.$ac_ext
3986EXEEXT=$ac_cv_exeext
3987ac_exeext=$EXEEXT
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003988cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3989/* end confdefs.h. */
3990#include <stdio.h>
3991int
3992main ()
3993{
3994FILE *f = fopen ("conftest.out", "w");
3995 return ferror (f) || fclose (f) != 0;
3996
3997 ;
3998 return 0;
3999}
Skip Montanaro6dead952003-09-25 14:50:04 +00004000_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004001ac_clean_files="$ac_clean_files conftest.out"
4002# Check that the compiler produces executables we can run. If not, either
4003# the compiler is broken, or we cross compile.
4004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4005$as_echo_n "checking whether we are cross compiling... " >&6; }
4006if test "$cross_compiling" != yes; then
4007 { { ac_try="$ac_link"
4008case "(($ac_try" in
4009 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4010 *) ac_try_echo=$ac_try;;
4011esac
4012eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4013$as_echo "$ac_try_echo"; } >&5
4014 (eval "$ac_link") 2>&5
4015 ac_status=$?
4016 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4017 test $ac_status = 0; }
4018 if { ac_try='./conftest$ac_cv_exeext'
4019 { { case "(($ac_try" in
4020 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4021 *) ac_try_echo=$ac_try;;
4022esac
4023eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4024$as_echo "$ac_try_echo"; } >&5
4025 (eval "$ac_try") 2>&5
4026 ac_status=$?
4027 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4028 test $ac_status = 0; }; }; then
4029 cross_compiling=no
4030 else
4031 if test "$cross_compiling" = maybe; then
4032 cross_compiling=yes
4033 else
4034 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4035$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004036as_fn_error $? "cannot run C compiled programs.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004037If you meant to cross compile, use \`--host'.
Matthias Klose3cef2a92012-03-14 23:39:33 +01004038See \`config.log' for more details" "$LINENO" 5; }
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004039 fi
4040 fi
4041fi
4042{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4043$as_echo "$cross_compiling" >&6; }
4044
4045rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4046ac_clean_files=$ac_clean_files_save
4047{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4048$as_echo_n "checking for suffix of object files... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004049if ${ac_cv_objext+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004050 $as_echo_n "(cached) " >&6
4051else
4052 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004053/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004054
Martin v. Löwis11437992002-04-12 09:54:03 +00004055int
4056main ()
4057{
4058
4059 ;
4060 return 0;
4061}
4062_ACEOF
4063rm -f conftest.o conftest.obj
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004064if { { ac_try="$ac_compile"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004065case "(($ac_try" in
4066 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4067 *) ac_try_echo=$ac_try;;
4068esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004069eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4070$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00004071 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004072 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004073 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4074 test $ac_status = 0; }; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004075 for ac_file in conftest.o conftest.obj conftest.*; do
4076 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004077 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004078 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004079 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4080 break;;
4081 esac
4082done
4083else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004084 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004085sed 's/^/| /' conftest.$ac_ext >&5
4086
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004087{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4088$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004089as_fn_error $? "cannot compute suffix of object files: cannot compile
Matthias Klose3cef2a92012-03-14 23:39:33 +01004090See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004091fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004092rm -f conftest.$ac_cv_objext conftest.$ac_ext
4093fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004094{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4095$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004096OBJEXT=$ac_cv_objext
4097ac_objext=$OBJEXT
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4099$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004100if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004101 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004102else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004103 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004104/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004105
Martin v. Löwis11437992002-04-12 09:54:03 +00004106int
4107main ()
4108{
4109#ifndef __GNUC__
4110 choke me
4111#endif
4112
4113 ;
4114 return 0;
4115}
4116_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004117if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004118 ac_compiler_gnu=yes
4119else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004120 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004121fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004122rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004123ac_cv_c_compiler_gnu=$ac_compiler_gnu
4124
4125fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004126{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4127$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4128if test $ac_compiler_gnu = yes; then
4129 GCC=yes
4130else
4131 GCC=
4132fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004133ac_test_CFLAGS=${CFLAGS+set}
4134ac_save_CFLAGS=$CFLAGS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4136$as_echo_n "checking whether $CC accepts -g... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004137if ${ac_cv_prog_cc_g+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004138 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004139else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004140 ac_save_c_werror_flag=$ac_c_werror_flag
4141 ac_c_werror_flag=yes
4142 ac_cv_prog_cc_g=no
4143 CFLAGS="-g"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004144 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004145/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004146
Martin v. Löwis11437992002-04-12 09:54:03 +00004147int
4148main ()
4149{
4150
4151 ;
4152 return 0;
4153}
4154_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004155if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004156 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004157else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004158 CFLAGS=""
4159 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004160/* end confdefs.h. */
4161
4162int
4163main ()
4164{
4165
4166 ;
4167 return 0;
4168}
4169_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004170if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004171
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004172else
4173 ac_c_werror_flag=$ac_save_c_werror_flag
Martin v. Löwiseba40652007-08-30 20:10:57 +00004174 CFLAGS="-g"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004175 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004176/* end confdefs.h. */
4177
4178int
4179main ()
4180{
4181
4182 ;
4183 return 0;
4184}
4185_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004186if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004187 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004188fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004189rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004190fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004191rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4192fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004193rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4194 ac_c_werror_flag=$ac_save_c_werror_flag
4195fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004196{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4197$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004198if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004199 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004200elif test $ac_cv_prog_cc_g = yes; then
4201 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004202 CFLAGS="-g -O2"
4203 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004204 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004205 fi
4206else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004207 if test "$GCC" = yes; then
4208 CFLAGS="-O2"
4209 else
4210 CFLAGS=
4211 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004212fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4214$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004215if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004216 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004217else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004218 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004219ac_save_CC=$CC
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004220cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004221/* end confdefs.h. */
4222#include <stdarg.h>
4223#include <stdio.h>
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004224struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004225/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4226struct buf { int x; };
4227FILE * (*rcsopen) (struct buf *, struct stat *, int);
4228static char *e (p, i)
4229 char **p;
4230 int i;
4231{
4232 return p[i];
4233}
4234static char *f (char * (*g) (char **, int), char **p, ...)
4235{
4236 char *s;
4237 va_list v;
4238 va_start (v,p);
4239 s = g (p, va_arg (v,int));
4240 va_end (v);
4241 return s;
4242}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004243
4244/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4245 function prototypes and stuff, but not '\xHH' hex character constants.
4246 These don't provoke an error unfortunately, instead are silently treated
Martin v. Löwiseba40652007-08-30 20:10:57 +00004247 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004248 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4249 array size at least. It's necessary to write '\x00'==0 to get something
Martin v. Löwiseba40652007-08-30 20:10:57 +00004250 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004251int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4252
Martin v. Löwiseba40652007-08-30 20:10:57 +00004253/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4254 inside strings and character constants. */
4255#define FOO(x) 'x'
4256int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4257
Skip Montanaro6dead952003-09-25 14:50:04 +00004258int test (int i, double x);
4259struct s1 {int (*f) (int a);};
4260struct s2 {int (*f) (double a);};
4261int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4262int argc;
4263char **argv;
4264int
4265main ()
4266{
4267return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4268 ;
4269 return 0;
4270}
4271_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00004272for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4273 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004274do
4275 CC="$ac_save_CC $ac_arg"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004276 if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004277 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004278fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004279rm -f core conftest.err conftest.$ac_objext
4280 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004281done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004282rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004283CC=$ac_save_CC
4284
4285fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004286# AC_CACHE_VAL
4287case "x$ac_cv_prog_cc_c89" in
4288 x)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4290$as_echo "none needed" >&6; } ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00004291 xno)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004292 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4293$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004294 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00004295 CC="$CC $ac_cv_prog_cc_c89"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4297$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004298esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004299if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004300
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004301fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004302
Martin v. Löwis11437992002-04-12 09:54:03 +00004303ac_ext=c
4304ac_cpp='$CPP $CPPFLAGS'
4305ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4306ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4307ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004308
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00004309if test ! -z "$preset_cflags"
4310then
4311 CFLAGS=$preset_cflags
4312fi
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004313
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004314
4315
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4317$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004318
Martin v. Löwiseba40652007-08-30 20:10:57 +00004319# Check whether --with-cxx_main was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004320if test "${with_cxx_main+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004321 withval=$with_cxx_main;
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004322
4323 case $withval in
4324 no) with_cxx_main=no
4325 MAINCC='$(CC)';;
4326 yes) with_cxx_main=yes
4327 MAINCC='$(CXX)';;
4328 *) with_cxx_main=yes
4329 MAINCC=$withval
4330 if test -z "$CXX"
4331 then
4332 CXX=$withval
4333 fi;;
4334 esac
4335else
4336
4337 with_cxx_main=no
4338 MAINCC='$(CC)'
4339
Martin v. Löwiseba40652007-08-30 20:10:57 +00004340fi
4341
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004342{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4343$as_echo "$with_cxx_main" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004344
4345preset_cxx="$CXX"
4346if test -z "$CXX"
4347then
4348 case "$CC" in
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004349 gcc) if test -n "$ac_tool_prefix"; then
4350 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4351set dummy ${ac_tool_prefix}g++; ac_word=$2
4352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4353$as_echo_n "checking for $ac_word... " >&6; }
4354if ${ac_cv_path_CXX+:} false; then :
4355 $as_echo_n "(cached) " >&6
4356else
4357 case $CXX in
4358 [\\/]* | ?:[\\/]*)
4359 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4360 ;;
4361 *)
4362 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4363for as_dir in notfound
4364do
4365 IFS=$as_save_IFS
4366 test -z "$as_dir" && as_dir=.
4367 for ac_exec_ext in '' $ac_executable_extensions; do
4368 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4369 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4370 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4371 break 2
4372 fi
4373done
4374 done
4375IFS=$as_save_IFS
4376
4377 ;;
4378esac
4379fi
4380CXX=$ac_cv_path_CXX
4381if test -n "$CXX"; then
4382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4383$as_echo "$CXX" >&6; }
4384else
4385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4386$as_echo "no" >&6; }
4387fi
4388
4389
4390fi
4391if test -z "$ac_cv_path_CXX"; then
4392 ac_pt_CXX=$CXX
4393 # Extract the first word of "g++", so it can be a program name with args.
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004394set dummy g++; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4396$as_echo_n "checking for $ac_word... " >&6; }
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004397if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004398 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004399else
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004400 case $ac_pt_CXX in
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004401 [\\/]* | ?:[\\/]*)
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004402 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 +00004403 ;;
4404 *)
4405 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4406for as_dir in notfound
4407do
4408 IFS=$as_save_IFS
4409 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004410 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004411 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004412 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004413 $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 +00004414 break 2
4415 fi
4416done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004417 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004418IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004419
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004420 ;;
4421esac
4422fi
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004423ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4424if test -n "$ac_pt_CXX"; then
4425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4426$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004427else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4429$as_echo "no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004430fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004431
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004432 if test "x$ac_pt_CXX" = x; then
4433 CXX="g++"
4434 else
4435 case $cross_compiling:$ac_tool_warned in
4436yes:)
4437{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4438$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4439ac_tool_warned=yes ;;
4440esac
4441 CXX=$ac_pt_CXX
4442 fi
4443else
4444 CXX="$ac_cv_path_CXX"
4445fi
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004446 ;;
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004447 cc) if test -n "$ac_tool_prefix"; then
4448 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4449set dummy ${ac_tool_prefix}c++; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4451$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004452if ${ac_cv_path_CXX+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004453 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004454else
4455 case $CXX in
4456 [\\/]* | ?:[\\/]*)
4457 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4458 ;;
4459 *)
4460 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4461for as_dir in notfound
4462do
4463 IFS=$as_save_IFS
4464 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004465 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004466 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004467 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004468 $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 +00004469 break 2
4470 fi
4471done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004472 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004473IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004474
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004475 ;;
4476esac
4477fi
4478CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00004479if test -n "$CXX"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4481$as_echo "$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004482else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4484$as_echo "no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004485fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004486
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004487
4488fi
4489if test -z "$ac_cv_path_CXX"; then
4490 ac_pt_CXX=$CXX
4491 # Extract the first word of "c++", so it can be a program name with args.
4492set dummy c++; ac_word=$2
4493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4494$as_echo_n "checking for $ac_word... " >&6; }
4495if ${ac_cv_path_ac_pt_CXX+:} false; then :
4496 $as_echo_n "(cached) " >&6
4497else
4498 case $ac_pt_CXX in
4499 [\\/]* | ?:[\\/]*)
4500 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4501 ;;
4502 *)
4503 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4504for as_dir in notfound
4505do
4506 IFS=$as_save_IFS
4507 test -z "$as_dir" && as_dir=.
4508 for ac_exec_ext in '' $ac_executable_extensions; do
4509 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4510 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4511 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4512 break 2
4513 fi
4514done
4515 done
4516IFS=$as_save_IFS
4517
4518 ;;
4519esac
4520fi
4521ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4522if test -n "$ac_pt_CXX"; then
4523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4524$as_echo "$ac_pt_CXX" >&6; }
4525else
4526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4527$as_echo "no" >&6; }
4528fi
4529
4530 if test "x$ac_pt_CXX" = x; then
4531 CXX="c++"
4532 else
4533 case $cross_compiling:$ac_tool_warned in
4534yes:)
4535{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4536$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4537ac_tool_warned=yes ;;
4538esac
4539 CXX=$ac_pt_CXX
4540 fi
4541else
4542 CXX="$ac_cv_path_CXX"
4543fi
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004544 ;;
4545 esac
4546 if test "$CXX" = "notfound"
4547 then
4548 CXX=""
4549 fi
4550fi
4551if test -z "$CXX"
4552then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004553 if test -n "$ac_tool_prefix"; then
4554 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4555 do
4556 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4557set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4559$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004560if ${ac_cv_prog_CXX+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004561 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004562else
4563 if test -n "$CXX"; then
4564 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4565else
4566as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4567for as_dir in $PATH
4568do
4569 IFS=$as_save_IFS
4570 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004571 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004572 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004573 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004574 $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 +00004575 break 2
4576 fi
4577done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004578 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004579IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004580
4581fi
4582fi
4583CXX=$ac_cv_prog_CXX
4584if test -n "$CXX"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4586$as_echo "$CXX" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004587else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004588 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4589$as_echo "no" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004590fi
4591
Martin v. Löwiseba40652007-08-30 20:10:57 +00004592
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004593 test -n "$CXX" && break
4594 done
4595fi
4596if test -z "$CXX"; then
4597 ac_ct_CXX=$CXX
4598 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4599do
4600 # Extract the first word of "$ac_prog", so it can be a program name with args.
4601set dummy $ac_prog; ac_word=$2
4602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4603$as_echo_n "checking for $ac_word... " >&6; }
4604if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4605 $as_echo_n "(cached) " >&6
4606else
4607 if test -n "$ac_ct_CXX"; then
4608 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4609else
4610as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4611for as_dir in $PATH
4612do
4613 IFS=$as_save_IFS
4614 test -z "$as_dir" && as_dir=.
4615 for ac_exec_ext in '' $ac_executable_extensions; do
4616 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4617 ac_cv_prog_ac_ct_CXX="$ac_prog"
4618 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4619 break 2
4620 fi
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004621done
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004622 done
4623IFS=$as_save_IFS
4624
4625fi
4626fi
4627ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4628if test -n "$ac_ct_CXX"; then
4629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4630$as_echo "$ac_ct_CXX" >&6; }
4631else
4632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4633$as_echo "no" >&6; }
4634fi
4635
4636
4637 test -n "$ac_ct_CXX" && break
4638done
4639
4640 if test "x$ac_ct_CXX" = x; then
4641 CXX="notfound"
4642 else
4643 case $cross_compiling:$ac_tool_warned in
4644yes:)
4645{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4646$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4647ac_tool_warned=yes ;;
4648esac
4649 CXX=$ac_ct_CXX
4650 fi
4651fi
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004652
4653 if test "$CXX" = "notfound"
4654 then
4655 CXX=""
4656 fi
4657fi
4658if test "$preset_cxx" != "$CXX"
4659then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004660 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004661
4662 By default, distutils will build C++ extension modules with \"$CXX\".
4663 If this is not intended, then set CXX on the configure command line.
4664 " >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004665$as_echo "$as_me: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004666
4667 By default, distutils will build C++ extension modules with \"$CXX\".
4668 If this is not intended, then set CXX on the configure command line.
4669 " >&2;}
4670fi
4671
doko@python.org4e63fbe2013-01-25 13:08:27 +01004672MULTIARCH=$($CC --print-multiarch 2>/dev/null)
4673
4674
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004675
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004676# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004677
4678ac_ext=c
4679ac_cpp='$CPP $CPPFLAGS'
4680ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4681ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4682ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4684$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004685# On Suns, sometimes $CPP names a directory.
4686if test -n "$CPP" && test -d "$CPP"; then
4687 CPP=
4688fi
4689if test -z "$CPP"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +01004690 if ${ac_cv_prog_CPP+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004691 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004692else
Martin v. Löwis11437992002-04-12 09:54:03 +00004693 # Double quotes because CPP needs to be expanded
4694 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4695 do
4696 ac_preproc_ok=false
4697for ac_c_preproc_warn_flag in '' yes
4698do
4699 # Use a header file that comes with gcc, so configuring glibc
4700 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004701 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4702 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004703 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004704 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004705 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004706/* end confdefs.h. */
4707#ifdef __STDC__
4708# include <limits.h>
4709#else
4710# include <assert.h>
4711#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004712 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004713_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004714if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004715
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004716else
Martin v. Löwis11437992002-04-12 09:54:03 +00004717 # Broken: fails on valid input.
4718continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004719fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004720rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004721
Martin v. Löwiseba40652007-08-30 20:10:57 +00004722 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004723 # can be detected and how.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004724 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004725/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004726#include <ac_nonexistent.h>
4727_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004728if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004729 # Broken: success on invalid input.
4730continue
4731else
Martin v. Löwis11437992002-04-12 09:54:03 +00004732 # Passes both tests.
4733ac_preproc_ok=:
4734break
4735fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004736rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004737
4738done
4739# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004740rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004741if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004742 break
4743fi
4744
4745 done
4746 ac_cv_prog_CPP=$CPP
4747
4748fi
4749 CPP=$ac_cv_prog_CPP
4750else
4751 ac_cv_prog_CPP=$CPP
4752fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004753{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4754$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004755ac_preproc_ok=false
4756for ac_c_preproc_warn_flag in '' yes
4757do
4758 # Use a header file that comes with gcc, so configuring glibc
4759 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004760 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4761 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004762 # On the NeXT, cc -E runs the code through the compiler's parser,
4763 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004764 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004765/* end confdefs.h. */
4766#ifdef __STDC__
4767# include <limits.h>
4768#else
4769# include <assert.h>
4770#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004771 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004772_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004773if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004774
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004775else
Martin v. Löwis11437992002-04-12 09:54:03 +00004776 # Broken: fails on valid input.
4777continue
4778fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004779rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004780
Martin v. Löwiseba40652007-08-30 20:10:57 +00004781 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004782 # can be detected and how.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004783 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004784/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004785#include <ac_nonexistent.h>
4786_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004787if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004788 # Broken: success on invalid input.
4789continue
4790else
Martin v. Löwis11437992002-04-12 09:54:03 +00004791 # Passes both tests.
4792ac_preproc_ok=:
4793break
4794fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004795rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004796
4797done
4798# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004799rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004800if $ac_preproc_ok; then :
4801
Martin v. Löwis11437992002-04-12 09:54:03 +00004802else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004803 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4804$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004805as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
Matthias Klose3cef2a92012-03-14 23:39:33 +01004806See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004807fi
4808
4809ac_ext=c
4810ac_cpp='$CPP $CPPFLAGS'
4811ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4812ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4813ac_compiler_gnu=$ac_cv_c_compiler_gnu
4814
4815
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4817$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004818if ${ac_cv_path_GREP+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004819 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004820else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004821 if test -z "$GREP"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004822 ac_path_GREP_found=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004823 # Loop through the user's path and test for each of PROGNAME-LIST
4824 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00004825for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4826do
4827 IFS=$as_save_IFS
4828 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004829 for ac_prog in grep ggrep; do
4830 for ac_exec_ext in '' $ac_executable_extensions; do
4831 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004832 as_fn_executable_p "$ac_path_GREP" || continue
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004833# Check for GNU ac_path_GREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004834 # Check for GNU $ac_path_GREP
4835case `"$ac_path_GREP" --version 2>&1` in
4836*GNU*)
4837 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4838*)
4839 ac_count=0
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004840 $as_echo_n 0123456789 >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004841 while :
4842 do
4843 cat "conftest.in" "conftest.in" >"conftest.tmp"
4844 mv "conftest.tmp" "conftest.in"
4845 cp "conftest.in" "conftest.nl"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004846 $as_echo 'GREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004847 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4848 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004849 as_fn_arith $ac_count + 1 && ac_count=$as_val
Martin v. Löwiseba40652007-08-30 20:10:57 +00004850 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4851 # Best one so far, save it but keep looking for a better one
4852 ac_cv_path_GREP="$ac_path_GREP"
4853 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00004854 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004855 # 10*(2^10) chars as input seems more than enough
4856 test $ac_count -gt 10 && break
4857 done
4858 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4859esac
4860
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004861 $ac_path_GREP_found && break 3
4862 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004863 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004864 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004865IFS=$as_save_IFS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004866 if test -z "$ac_cv_path_GREP"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004867 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 +00004868 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004869else
4870 ac_cv_path_GREP=$GREP
4871fi
4872
Martin v. Löwiseba40652007-08-30 20:10:57 +00004873fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004874{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4875$as_echo "$ac_cv_path_GREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00004876 GREP="$ac_cv_path_GREP"
4877
4878
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4880$as_echo_n "checking for egrep... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004881if ${ac_cv_path_EGREP+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004882 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +00004883else
4884 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4885 then ac_cv_path_EGREP="$GREP -E"
4886 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004887 if test -z "$EGREP"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004888 ac_path_EGREP_found=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004889 # Loop through the user's path and test for each of PROGNAME-LIST
4890 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00004891for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4892do
4893 IFS=$as_save_IFS
4894 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004895 for ac_prog in egrep; do
4896 for ac_exec_ext in '' $ac_executable_extensions; do
4897 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004898 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004899# Check for GNU ac_path_EGREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004900 # Check for GNU $ac_path_EGREP
4901case `"$ac_path_EGREP" --version 2>&1` in
4902*GNU*)
4903 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4904*)
4905 ac_count=0
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004906 $as_echo_n 0123456789 >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004907 while :
4908 do
4909 cat "conftest.in" "conftest.in" >"conftest.tmp"
4910 mv "conftest.tmp" "conftest.in"
4911 cp "conftest.in" "conftest.nl"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004912 $as_echo 'EGREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004913 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4914 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004915 as_fn_arith $ac_count + 1 && ac_count=$as_val
Martin v. Löwiseba40652007-08-30 20:10:57 +00004916 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4917 # Best one so far, save it but keep looking for a better one
4918 ac_cv_path_EGREP="$ac_path_EGREP"
4919 ac_path_EGREP_max=$ac_count
4920 fi
4921 # 10*(2^10) chars as input seems more than enough
4922 test $ac_count -gt 10 && break
4923 done
4924 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4925esac
4926
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004927 $ac_path_EGREP_found && break 3
4928 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004929 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004930 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004931IFS=$as_save_IFS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004932 if test -z "$ac_cv_path_EGREP"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004933 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 +00004934 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004935else
4936 ac_cv_path_EGREP=$EGREP
4937fi
4938
Martin v. Löwiseba40652007-08-30 20:10:57 +00004939 fi
4940fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004941{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4942$as_echo "$ac_cv_path_EGREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00004943 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00004944
4945
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4947$as_echo_n "checking for ANSI C header files... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004948if ${ac_cv_header_stdc+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004949 $as_echo_n "(cached) " >&6
4950else
4951 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00004952/* end confdefs.h. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004953#include <stdlib.h>
4954#include <stdarg.h>
4955#include <string.h>
4956#include <float.h>
4957
4958int
4959main ()
4960{
4961
4962 ;
4963 return 0;
4964}
4965_ACEOF
4966if ac_fn_c_try_compile "$LINENO"; then :
4967 ac_cv_header_stdc=yes
4968else
4969 ac_cv_header_stdc=no
4970fi
4971rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4972
4973if test $ac_cv_header_stdc = yes; then
4974 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4975 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4976/* end confdefs.h. */
4977#include <string.h>
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00004978
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00004979_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004980if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004981 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004982
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004983else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004984 ac_cv_header_stdc=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004985fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00004986rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004987
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004988fi
4989
4990if test $ac_cv_header_stdc = yes; then
4991 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4992 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4993/* end confdefs.h. */
4994#include <stdlib.h>
4995
4996_ACEOF
4997if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4998 $EGREP "free" >/dev/null 2>&1; then :
4999
5000else
5001 ac_cv_header_stdc=no
5002fi
5003rm -f conftest*
5004
5005fi
5006
5007if test $ac_cv_header_stdc = yes; then
5008 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5009 if test "$cross_compiling" = yes; then :
5010 :
5011else
5012 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5013/* end confdefs.h. */
5014#include <ctype.h>
5015#include <stdlib.h>
5016#if ((' ' & 0x0FF) == 0x020)
5017# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5018# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5019#else
5020# define ISLOWER(c) \
5021 (('a' <= (c) && (c) <= 'i') \
5022 || ('j' <= (c) && (c) <= 'r') \
5023 || ('s' <= (c) && (c) <= 'z'))
5024# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5025#endif
5026
5027#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5028int
5029main ()
5030{
5031 int i;
5032 for (i = 0; i < 256; i++)
5033 if (XOR (islower (i), ISLOWER (i))
5034 || toupper (i) != TOUPPER (i))
5035 return 2;
5036 return 0;
5037}
5038_ACEOF
5039if ac_fn_c_try_run "$LINENO"; then :
5040
5041else
5042 ac_cv_header_stdc=no
5043fi
5044rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5045 conftest.$ac_objext conftest.beam conftest.$ac_ext
5046fi
5047
5048fi
5049fi
5050{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5051$as_echo "$ac_cv_header_stdc" >&6; }
5052if test $ac_cv_header_stdc = yes; then
5053
5054$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5055
5056fi
5057
5058# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5059for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5060 inttypes.h stdint.h unistd.h
5061do :
5062 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5063ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5064"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00005065if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005066 cat >>confdefs.h <<_ACEOF
5067#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5068_ACEOF
5069
5070fi
5071
5072done
5073
5074
5075
5076 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 +01005077if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005078 MINIX=yes
5079else
5080 MINIX=
5081fi
5082
5083
5084 if test "$MINIX" = yes; then
5085
5086$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5087
5088
5089$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5090
5091
5092$as_echo "#define _MINIX 1" >>confdefs.h
5093
5094 fi
5095
5096
5097 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5098$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005099if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005100 $as_echo_n "(cached) " >&6
5101else
5102 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5103/* end confdefs.h. */
5104
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005105# define __EXTENSIONS__ 1
5106 $ac_includes_default
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005107int
5108main ()
5109{
5110
5111 ;
5112 return 0;
5113}
5114_ACEOF
5115if ac_fn_c_try_compile "$LINENO"; then :
5116 ac_cv_safe_to_define___extensions__=yes
5117else
5118 ac_cv_safe_to_define___extensions__=no
5119fi
5120rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5121fi
5122{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5123$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5124 test $ac_cv_safe_to_define___extensions__ = yes &&
5125 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5126
5127 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5128
5129 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5130
5131 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5132
5133 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5134
5135
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005136
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005137# Check for unsupported systems
5138case $ac_sys_system/$ac_sys_release in
5139atheos*|Linux*/1*)
5140 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5141 echo See README for details.
5142 exit 1;;
5143esac
5144
5145
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5147$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005148
5149# Check whether --with-suffix was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005150if test "${with_suffix+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005151 withval=$with_suffix;
5152 case $withval in
5153 no) EXEEXT=;;
5154 yes) EXEEXT=.exe;;
5155 *) EXEEXT=$withval;;
5156 esac
5157fi
5158
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005159{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5160$as_echo "$EXEEXT" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005161
5162# Test whether we're running on a non-case-sensitive system, in which
5163# case we give a warning if no ext is given
5164
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5166$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005167if test ! -d CaseSensitiveTestDir; then
5168mkdir CaseSensitiveTestDir
5169fi
5170
5171if test -d casesensitivetestdir
5172then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005173 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5174$as_echo "yes" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005175 BUILDEXEEXT=.exe
5176else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005177 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5178$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005179 BUILDEXEEXT=$EXEEXT
5180fi
5181rmdir CaseSensitiveTestDir
5182
5183case $MACHDEP in
5184bsdos*)
5185 case $CC in
5186 gcc) CC="$CC -D_HAVE_BSDI";;
5187 esac;;
5188esac
5189
5190case $ac_sys_system in
5191hp*|HP*)
5192 case $CC in
5193 cc|*/cc) CC="$CC -Ae";;
5194 esac;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005195SunOS*)
5196 # Some functions have a prototype only with that define, e.g. confstr
5197
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005198$as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005199
5200 ;;
5201esac
5202
5203
5204
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5206$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005207if test -z "$LIBRARY"
5208then
5209 LIBRARY='libpython$(VERSION).a'
5210fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005211{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5212$as_echo "$LIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005213
5214# LDLIBRARY is the name of the library to link against (as opposed to the
5215# name of the library into which to insert object files). BLDLIBRARY is also
5216# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5217# is blank as the main program is not linked directly against LDLIBRARY.
5218# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5219# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5220# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5221# DLLLIBRARY is the shared (i.e., DLL) library.
5222#
5223# RUNSHARED is used to run shared python without installed libraries
5224#
5225# INSTSONAME is the name of the shared library that will be use to install
5226# on the system - some systems like version suffix, others don't
5227
5228
5229
5230
5231
5232
5233LDLIBRARY="$LIBRARY"
5234BLDLIBRARY='$(LDLIBRARY)'
5235INSTSONAME='$(LDLIBRARY)'
5236DLLLIBRARY=''
5237LDLIBRARYDIR=''
5238RUNSHARED=''
5239
5240# LINKCC is the command that links the python executable -- default is $(CC).
5241# If CXX is set, and if it is needed to link a main function that was
5242# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5243# python might then depend on the C++ runtime
5244# This is altered for AIX in order to build the export list before
5245# linking.
5246
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5248$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005249if test -z "$LINKCC"
5250then
5251 LINKCC='$(PURIFY) $(MAINCC)'
5252 case $ac_sys_system in
5253 AIX*)
5254 exp_extra="\"\""
5255 if test $ac_sys_release -ge 5 -o \
5256 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5257 exp_extra="."
5258 fi
5259 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005260 QNX*)
5261 # qcc must be used because the other compilers do not
5262 # support -N.
5263 LINKCC=qcc;;
5264 esac
5265fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005266{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5267$as_echo "$LINKCC" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005268
5269# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5270# make sure we default having it set to "no": this is used by
5271# distutils.unixccompiler to know if it should add --enable-new-dtags
5272# to linker command lines, and failing to detect GNU ld simply results
5273# in the same bahaviour as before.
5274
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005275{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5276$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005277ac_prog=ld
5278if test "$GCC" = yes; then
5279 ac_prog=`$CC -print-prog-name=ld`
5280fi
5281case `"$ac_prog" -V 2>&1 < /dev/null` in
5282 *GNU*)
5283 GNULD=yes;;
5284 *)
5285 GNULD=no;;
5286esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005287{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5288$as_echo "$GNULD" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005289
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5291$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005292# Check whether --enable-shared was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005293if test "${enable_shared+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005294 enableval=$enable_shared;
5295fi
5296
5297
5298if test -z "$enable_shared"
5299then
5300 case $ac_sys_system in
5301 CYGWIN* | atheos*)
5302 enable_shared="yes";;
5303 *)
5304 enable_shared="no";;
5305 esac
5306fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005307{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5308$as_echo "$enable_shared" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005309
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5311$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005312# Check whether --enable-profiling was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005313if test "${enable_profiling+set}" = set; then :
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005314 enableval=$enable_profiling;
5315fi
5316
5317if test "x$enable_profiling" = xyes; then
5318 ac_save_cc="$CC"
Benjamin Petersonb9be7bb2013-03-26 08:55:37 -04005319 CC="$CC -pg"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005320 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005321/* end confdefs.h. */
5322int main() { return 0; }
5323_ACEOF
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005324if ac_fn_c_try_link "$LINENO"; then :
5325
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005326else
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005327 enable_profiling=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005328fi
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005329rm -f core conftest.err conftest.$ac_objext \
5330 conftest$ac_exeext conftest.$ac_ext
5331 CC="$ac_save_cc"
5332else
5333 enable_profiling=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005334fi
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005335{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5336$as_echo "$enable_profiling" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005337
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005338if test "x$enable_profiling" = xyes; then
5339 BASECFLAGS="-pg $BASECFLAGS"
5340 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005341fi
5342
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005343{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5344$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005345
5346# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5347# library that we build, but we do not want to link against it (we
5348# will find it with a -framework option). For this reason there is an
5349# extra variable BLDLIBRARY against which Python and the extension
5350# modules are linked, BLDLIBRARY. This is normally the same as
5351# LDLIBRARY, but empty for MacOSX framework builds.
5352if test "$enable_framework"
5353then
5354 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005355 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005356 BLDLIBRARY=''
5357else
5358 BLDLIBRARY='$(LDLIBRARY)'
5359fi
5360
5361# Other platforms follow
5362if test $enable_shared = "yes"; then
5363
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005364$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005365
5366 case $ac_sys_system in
5367 BeOS*)
5368 LDLIBRARY='libpython$(VERSION).so'
5369 ;;
5370 CYGWIN*)
5371 LDLIBRARY='libpython$(VERSION).dll.a'
5372 DLLLIBRARY='libpython$(VERSION).dll'
5373 ;;
5374 SunOS*)
5375 LDLIBRARY='libpython$(VERSION).so'
5376 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005377 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005378 INSTSONAME="$LDLIBRARY".$SOVERSION
5379 ;;
Charles-François Natali3de8c732011-07-24 22:33:35 +02005380 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005381 LDLIBRARY='libpython$(VERSION).so'
5382 BLDLIBRARY='-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 case $ac_sys_system in
5385 FreeBSD*)
5386 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
5387 ;;
5388 esac
5389 INSTSONAME="$LDLIBRARY".$SOVERSION
5390 ;;
5391 hp*|HP*)
5392 case `uname -m` in
5393 ia64)
5394 LDLIBRARY='libpython$(VERSION).so'
5395 ;;
5396 *)
5397 LDLIBRARY='libpython$(VERSION).sl'
5398 ;;
5399 esac
5400 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005401 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005402 ;;
5403 OSF*)
5404 LDLIBRARY='libpython$(VERSION).so'
5405 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005406 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005407 ;;
5408 atheos*)
5409 LDLIBRARY='libpython$(VERSION).so'
5410 BLDLIBRARY='-L. -lpython$(VERSION)'
5411 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
5412 ;;
5413 Darwin*)
5414 LDLIBRARY='libpython$(VERSION).dylib'
5415 BLDLIBRARY='-L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005416 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005417 ;;
Antoine Pitrouaabdceb2010-09-10 20:03:17 +00005418 AIX*)
5419 LDLIBRARY='libpython$(VERSION).so'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005420 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrouaabdceb2010-09-10 20:03:17 +00005421 ;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005422
5423 esac
5424else # shared is disabled
5425 case $ac_sys_system in
5426 CYGWIN*)
5427 BLDLIBRARY='$(LIBRARY)'
5428 LDLIBRARY='libpython$(VERSION).dll.a'
5429 ;;
5430 esac
5431fi
5432
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005433if test "$cross_compiling" = yes; then
5434 RUNSHARED=
5435fi
5436
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005437{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5438$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005439
5440if test -n "$ac_tool_prefix"; then
5441 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5442set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5444$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005445if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005446 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005447else
5448 if test -n "$RANLIB"; then
5449 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5450else
5451as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5452for as_dir in $PATH
5453do
5454 IFS=$as_save_IFS
5455 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005456 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005457 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005458 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005459 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005460 break 2
5461 fi
5462done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005463 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005464IFS=$as_save_IFS
5465
5466fi
5467fi
5468RANLIB=$ac_cv_prog_RANLIB
5469if test -n "$RANLIB"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005470 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5471$as_echo "$RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005472else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5474$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005475fi
5476
5477
5478fi
5479if test -z "$ac_cv_prog_RANLIB"; then
5480 ac_ct_RANLIB=$RANLIB
5481 # Extract the first word of "ranlib", so it can be a program name with args.
5482set dummy ranlib; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5484$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005485if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005486 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005487else
5488 if test -n "$ac_ct_RANLIB"; then
5489 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5490else
5491as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5492for as_dir in $PATH
5493do
5494 IFS=$as_save_IFS
5495 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005496 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005497 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005498 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005499 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005500 break 2
5501 fi
5502done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005503 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005504IFS=$as_save_IFS
5505
5506fi
5507fi
5508ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5509if test -n "$ac_ct_RANLIB"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005510 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5511$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005512else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5514$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005515fi
5516
5517 if test "x$ac_ct_RANLIB" = x; then
5518 RANLIB=":"
5519 else
5520 case $cross_compiling:$ac_tool_warned in
5521yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005522{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5523$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005524ac_tool_warned=yes ;;
5525esac
5526 RANLIB=$ac_ct_RANLIB
5527 fi
5528else
5529 RANLIB="$ac_cv_prog_RANLIB"
5530fi
5531
5532
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005533if test -n "$ac_tool_prefix"; then
5534 for ac_prog in ar aal
5535 do
5536 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5537set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5539$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005540if ${ac_cv_prog_AR+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005541 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005542else
5543 if test -n "$AR"; then
5544 ac_cv_prog_AR="$AR" # Let the user override the test.
5545else
5546as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5547for as_dir in $PATH
5548do
5549 IFS=$as_save_IFS
5550 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005551 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005552 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005553 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005554 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005555 break 2
5556 fi
5557done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005558 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005559IFS=$as_save_IFS
5560
5561fi
5562fi
5563AR=$ac_cv_prog_AR
5564if test -n "$AR"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005565 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5566$as_echo "$AR" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005567else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005568 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5569$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005570fi
5571
5572
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005573 test -n "$AR" && break
5574 done
5575fi
5576if test -z "$AR"; then
5577 ac_ct_AR=$AR
5578 for ac_prog in ar aal
5579do
5580 # Extract the first word of "$ac_prog", so it can be a program name with args.
5581set dummy $ac_prog; ac_word=$2
5582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5583$as_echo_n "checking for $ac_word... " >&6; }
5584if ${ac_cv_prog_ac_ct_AR+:} false; then :
5585 $as_echo_n "(cached) " >&6
5586else
5587 if test -n "$ac_ct_AR"; then
5588 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5589else
5590as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5591for as_dir in $PATH
5592do
5593 IFS=$as_save_IFS
5594 test -z "$as_dir" && as_dir=.
5595 for ac_exec_ext in '' $ac_executable_extensions; do
5596 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5597 ac_cv_prog_ac_ct_AR="$ac_prog"
5598 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5599 break 2
5600 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005601done
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005602 done
5603IFS=$as_save_IFS
5604
5605fi
5606fi
5607ac_ct_AR=$ac_cv_prog_ac_ct_AR
5608if test -n "$ac_ct_AR"; then
5609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5610$as_echo "$ac_ct_AR" >&6; }
5611else
5612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5613$as_echo "no" >&6; }
5614fi
5615
5616
5617 test -n "$ac_ct_AR" && break
5618done
5619
5620 if test "x$ac_ct_AR" = x; then
5621 AR="ar"
5622 else
5623 case $cross_compiling:$ac_tool_warned in
5624yes:)
5625{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5626$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5627ac_tool_warned=yes ;;
5628esac
5629 AR=$ac_ct_AR
5630 fi
5631fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005632
5633
5634# tweak ARFLAGS only if the user didn't set it on the command line
5635
5636if test -z "$ARFLAGS"
5637then
5638 ARFLAGS="rc"
5639fi
5640
5641
5642# Extract the first word of "svnversion", so it can be a program name with args.
5643set dummy svnversion; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5645$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005646if ${ac_cv_prog_SVNVERSION+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005647 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005648else
5649 if test -n "$SVNVERSION"; then
5650 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
5651else
5652as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5653for as_dir in $PATH
5654do
5655 IFS=$as_save_IFS
5656 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005657 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005658 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005659 ac_cv_prog_SVNVERSION="found"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005660 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005661 break 2
5662 fi
5663done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005664 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005665IFS=$as_save_IFS
5666
5667 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
5668fi
5669fi
5670SVNVERSION=$ac_cv_prog_SVNVERSION
5671if test -n "$SVNVERSION"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SVNVERSION" >&5
5673$as_echo "$SVNVERSION" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005674else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5676$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005677fi
5678
5679
5680if test $SVNVERSION = found
5681then
5682 SVNVERSION="svnversion \$(srcdir)"
5683else
5684 SVNVERSION="echo Unversioned directory"
5685fi
5686
Trent Nelsond86ceec2012-10-16 09:42:45 -04005687
Trent Nelsonabf20512012-10-17 04:32:49 -04005688if test "$abs_srcdir" != "$abs_builddir"; then
Trent Nelsond86ceec2012-10-16 09:42:45 -04005689 # If we're building out-of-tree make sure Include (in the current dir)
5690 # gets picked up before its $srcdir counterpart in order for Python-ast.h
5691 # and graminit.h to get picked up from the correct directory.
5692 # (A side effect of this is that these resources will automatically be
5693 # regenerated when building out-of-tree, regardless of whether or not
5694 # the $srcdir counterpart is up-to-date. This is an acceptable trade
5695 # off.)
5696 BASECPPFLAGS="-IInclude"
5697else
5698 BASECPPFLAGS=""
5699fi
5700
Georg Brandl3a5508e2011-03-06 10:42:21 +01005701
5702
5703
5704# Extract the first word of "hg", so it can be a program name with args.
5705set dummy hg; ac_word=$2
5706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5707$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005708if ${ac_cv_prog_HAS_HG+:} false; then :
Georg Brandl3a5508e2011-03-06 10:42:21 +01005709 $as_echo_n "(cached) " >&6
5710else
5711 if test -n "$HAS_HG"; then
5712 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
5713else
5714as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5715for as_dir in $PATH
5716do
5717 IFS=$as_save_IFS
5718 test -z "$as_dir" && as_dir=.
5719 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005720 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Georg Brandl3a5508e2011-03-06 10:42:21 +01005721 ac_cv_prog_HAS_HG="found"
5722 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5723 break 2
5724 fi
5725done
5726 done
5727IFS=$as_save_IFS
5728
5729 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
5730fi
5731fi
5732HAS_HG=$ac_cv_prog_HAS_HG
5733if test -n "$HAS_HG"; then
5734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
5735$as_echo "$HAS_HG" >&6; }
5736else
5737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5738$as_echo "no" >&6; }
5739fi
5740
5741
5742if test $HAS_HG = found
5743then
5744 HGVERSION="hg id -i \$(srcdir)"
5745 HGTAG="hg id -t \$(srcdir)"
5746 HGBRANCH="hg id -b \$(srcdir)"
5747else
5748 HGVERSION=""
5749 HGTAG=""
5750 HGBRANCH=""
5751fi
5752
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005753case $MACHDEP in
5754bsdos*|hp*|HP*)
5755 # install -d does not work on BSDI or HP-UX
5756 if test -z "$INSTALL"
5757 then
5758 INSTALL="${srcdir}/install-sh -c"
5759 fi
5760esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005761# Find a good install program. We prefer a C program (faster),
5762# so one script is as good as another. But avoid the broken or
5763# incompatible versions:
5764# SysV /etc/install, /usr/sbin/install
5765# SunOS /usr/etc/install
5766# IRIX /sbin/install
5767# AIX /bin/install
5768# AmigaOS /C/install, which installs bootblocks on floppy discs
5769# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5770# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5771# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5772# OS/2's system install, which has a completely different semantic
5773# ./install, which can be erroneously created by make from ./install.sh.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005774# Reject install programs that cannot install multiple files.
5775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5776$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005777if test -z "$INSTALL"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +01005778if ${ac_cv_path_install+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005779 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005780else
5781 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5782for as_dir in $PATH
5783do
5784 IFS=$as_save_IFS
5785 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005786 # Account for people who put trailing slashes in PATH elements.
5787case $as_dir/ in #((
5788 ./ | .// | /[cC]/* | \
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005789 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005790 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005791 /usr/ucb/* ) ;;
5792 *)
5793 # OSF1 and SCO ODT 3.0 have their own names for install.
5794 # Don't use installbsd from OSF since it installs stuff as root
5795 # by default.
5796 for ac_prog in ginstall scoinst install; do
5797 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005798 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005799 if test $ac_prog = install &&
5800 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5801 # AIX install. It has an incompatible calling convention.
5802 :
5803 elif test $ac_prog = install &&
5804 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5805 # program-specific install script used by HP pwplus--don't use.
5806 :
5807 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005808 rm -rf conftest.one conftest.two conftest.dir
5809 echo one > conftest.one
5810 echo two > conftest.two
5811 mkdir conftest.dir
5812 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5813 test -s conftest.one && test -s conftest.two &&
5814 test -s conftest.dir/conftest.one &&
5815 test -s conftest.dir/conftest.two
5816 then
5817 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5818 break 3
5819 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005820 fi
5821 fi
5822 done
5823 done
5824 ;;
5825esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005826
5827 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005828IFS=$as_save_IFS
5829
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005830rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005831
5832fi
5833 if test "${ac_cv_path_install+set}" = set; then
5834 INSTALL=$ac_cv_path_install
5835 else
5836 # As a last resort, use the slow shell script. Don't cache a
5837 # value for INSTALL within a source directory, because that will
5838 # break other packages using the cache if that directory is
5839 # removed, or if the value is a relative name.
5840 INSTALL=$ac_install_sh
5841 fi
5842fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005843{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5844$as_echo "$INSTALL" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005845
5846# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5847# It thinks the first close brace ends the variable substitution.
5848test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5849
5850test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5851
5852test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5853
Trent Nelsonf6407a12012-08-30 14:56:13 +00005854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
5855$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
5856if test -z "$MKDIR_P"; then
5857 if ${ac_cv_path_mkdir+:} false; then :
5858 $as_echo_n "(cached) " >&6
5859else
5860 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5861for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
5862do
5863 IFS=$as_save_IFS
5864 test -z "$as_dir" && as_dir=.
5865 for ac_prog in mkdir gmkdir; do
5866 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005867 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Trent Nelsonf6407a12012-08-30 14:56:13 +00005868 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
5869 'mkdir (GNU coreutils) '* | \
5870 'mkdir (coreutils) '* | \
5871 'mkdir (fileutils) '4.1*)
5872 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
5873 break 3;;
5874 esac
5875 done
5876 done
5877 done
5878IFS=$as_save_IFS
5879
5880fi
5881
5882 test -d ./--version && rmdir ./--version
5883 if test "${ac_cv_path_mkdir+set}" = set; then
5884 MKDIR_P="$ac_cv_path_mkdir -p"
5885 else
5886 # As a last resort, use the slow shell script. Don't cache a
5887 # value for MKDIR_P within a source directory, because that will
5888 # break other packages using the cache if that directory is
5889 # removed, or if the value is a relative name.
5890 MKDIR_P="$ac_install_sh -d"
5891 fi
5892fi
5893{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
5894$as_echo "$MKDIR_P" >&6; }
5895
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005896
5897# Not every filesystem supports hard links
5898
5899if test -z "$LN" ; then
5900 case $ac_sys_system in
5901 BeOS*) LN="ln -s";;
5902 CYGWIN*) LN="ln -s";;
5903 atheos*) LN="ln -s";;
5904 *) LN=ln;;
5905 esac
5906fi
5907
5908# Check for --with-pydebug
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
5910$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005911
5912# Check whether --with-pydebug was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005913if test "${with_pydebug+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005914 withval=$with_pydebug;
5915if test "$withval" != no
5916then
5917
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005918$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005919
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5921$as_echo "yes" >&6; };
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005922 Py_DEBUG='true'
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005923else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5924$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005925fi
5926else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5928$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005929fi
5930
5931
5932# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5933# merged with this chunk of code?
5934
5935# Optimizer/debugger flags
5936# ------------------------
5937# (The following bit of code is complicated enough - please keep things
5938# indented properly. Just pretend you're editing Python code. ;-)
5939
5940# There are two parallel sets of case statements below, one that checks to
5941# see if OPT was set and one that does BASECFLAGS setting based upon
5942# compiler and platform. BASECFLAGS tweaks need to be made even if the
5943# user set OPT.
5944
5945# tweak OPT based on compiler and platform, only if the user didn't set
5946# it on the command line
5947
Benjamin Petersond4b721b2010-03-23 20:58:37 +00005948if test "${OPT-unset}" = "unset"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005949then
5950 case $GCC in
5951 yes)
5952 if test "$CC" != 'g++' ; then
5953 STRICT_PROTO="-Wstrict-prototypes"
5954 fi
5955 # For gcc 4.x we need to use -fwrapv so lets check if its supported
5956 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
5957 WRAP="-fwrapv"
5958 fi
Stefan Krah503e5e12011-09-14 15:19:42 +02005959
5960 # Clang also needs -fwrapv
Stefan Krah2bc1e8f2011-12-08 22:26:06 +01005961 case $CC in
5962 *clang*) WRAP="-fwrapv"
5963 ;;
5964 esac
Stefan Krah503e5e12011-09-14 15:19:42 +02005965
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005966 case $ac_cv_prog_cc_g in
5967 yes)
5968 if test "$Py_DEBUG" = 'true' ; then
5969 # Optimization messes up debuggers, so turn it off for
5970 # debug builds.
Mark Dickinsond2f3e3f2010-05-05 22:23:58 +00005971 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005972 else
5973 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
5974 fi
5975 ;;
5976 *)
5977 OPT="-O3 -Wall $STRICT_PROTO"
5978 ;;
5979 esac
5980 case $ac_sys_system in
5981 SCO_SV*) OPT="$OPT -m486 -DSCO5"
5982 ;;
5983 esac
5984 ;;
5985
5986 *)
5987 OPT="-O"
5988 ;;
5989 esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005990fi
5991
5992
5993
5994# The -arch flags for universal builds on OSX
5995UNIVERSAL_ARCH_FLAGS=
5996
5997
5998# tweak BASECFLAGS based on compiler and platform
5999case $GCC in
6000yes)
6001 # Python violates C99 rules, by casting between incompatible
6002 # pointer types. GCC may generate bad code as a result of that,
6003 # so use -fno-strict-aliasing if supported.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006004 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -fno-strict-aliasing" >&5
6005$as_echo_n "checking whether $CC accepts -fno-strict-aliasing... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006006 ac_save_cc="$CC"
6007 CC="$CC -fno-strict-aliasing"
Matthias Klose3cef2a92012-03-14 23:39:33 +01006008 if ${ac_cv_no_strict_aliasing_ok+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006009 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00006010else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006011 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006012/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00006013
6014int
6015main ()
6016{
Mark Dickinson5e13e292010-05-11 08:55:06 +00006017
Gregory P. Smith373469a2009-11-01 21:03:38 +00006018 ;
6019 return 0;
6020}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006021_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006022if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006023 ac_cv_no_strict_aliasing_ok=yes
6024else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006025 ac_cv_no_strict_aliasing_ok=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006026fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00006027rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00006028fi
6029
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006030 CC="$ac_save_cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing_ok" >&5
6032$as_echo "$ac_cv_no_strict_aliasing_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006033 if test $ac_cv_no_strict_aliasing_ok = yes
6034 then
6035 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6036 fi
6037
6038 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
6039 # support. Without this, treatment of subnormals doesn't follow
6040 # the standard.
doko@python.orgd65e2ba2013-01-31 23:52:03 +01006041 case $host in
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006042 alpha*)
6043 BASECFLAGS="$BASECFLAGS -mieee"
6044 ;;
6045 esac
6046
6047 case $ac_sys_system in
6048 SCO_SV*)
6049 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
6050 ;;
6051 # is there any other compiler on Darwin besides gcc?
6052 Darwin*)
6053 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
6054 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006055 if test "${CC}" = gcc
6056 then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006057 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
6058$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006059 case "${UNIVERSALSDK}" in
6060 */MacOSX10.4u.sdk)
6061 # Build using 10.4 SDK, force usage of gcc when the
6062 # compiler is gcc, otherwise the user will get very
6063 # confusing error messages when building on OSX 10.6
6064 CC=gcc-4.0
6065 CPP=cpp-4.0
6066 ;;
6067 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
6069$as_echo "$CC" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006070 fi
6071
6072 # Calculate the right deployment target for this build.
6073 #
Ned Deilyc40b9032014-06-25 13:48:46 -07006074 cur_target_major=`sw_vers -productVersion | \
6075 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
6076 cur_target_minor=`sw_vers -productVersion | \
6077 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
6078 cur_target="${cur_target_major}.${cur_target_minor}"
6079 if test ${cur_target_major} -eq 10 && \
6080 test ${cur_target_minor} -ge 3
6081 then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006082 cur_target=10.3
Ronald Oussoren25967582009-09-06 10:00:26 +00006083 if test ${enable_universalsdk}; then
6084 if test "${UNIVERSAL_ARCHS}" = "all"; then
6085 # Ensure that the default platform for a
6086 # 4-way universal build is OSX 10.5,
6087 # that's the first OS release where
6088 # 4-way builds make sense.
6089 cur_target='10.5'
Ronald Oussoren23d92532009-09-07 06:12:00 +00006090
6091 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
6092 cur_target='10.5'
6093
6094 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
6095 cur_target='10.5'
6096
6097 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
6098 cur_target='10.5'
Ronald Oussoren25967582009-09-06 10:00:26 +00006099 fi
6100 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00006101 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren25967582009-09-06 10:00:26 +00006102 # On Intel macs default to a deployment
6103 # target of 10.4, that's the first OSX
6104 # release with Intel support.
6105 cur_target="10.4"
6106 fi
6107 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006108 fi
6109 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
6110
6111 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
6112 # environment with a value that is the same as what we'll use
6113 # in the Makefile to ensure that we'll get the same compiler
6114 # environment during configure and build time.
6115 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
6116 export MACOSX_DEPLOYMENT_TARGET
6117 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
6118
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006119 if test "${enable_universalsdk}"; then
6120 UNIVERSAL_ARCH_FLAGS=""
6121 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
6122 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
6123 ARCH_RUN_32BIT=""
Ronald Oussoren75912852010-04-08 08:13:31 +00006124 LIPO_32BIT_FLAGS=""
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006125
6126 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
6127 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
6128 LIPO_32BIT_FLAGS=""
6129 ARCH_RUN_32BIT="true"
6130
6131 elif test "$UNIVERSAL_ARCHS" = "all" ; then
6132 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
6133 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren92397ce2010-01-17 19:32:00 +00006134 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006135
6136 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
6137 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
6138 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren92397ce2010-01-17 19:32:00 +00006139 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006140
6141 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
6142 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
6143 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren9922f172010-02-11 13:19:34 +00006144 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006145
6146 else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006147 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 +00006148
6149 fi
6150
6151
Ronald Oussoren974eb5e2010-04-18 17:59:37 +00006152 CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
6153 if test "${UNIVERSALSDK}" != "/"
6154 then
6155 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
6156 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
6157 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006158 fi
6159
6160 fi
6161
6162
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006163 ;;
6164 OSF*)
6165 BASECFLAGS="$BASECFLAGS -mieee"
6166 ;;
6167 esac
6168 ;;
6169
6170*)
6171 case $ac_sys_system in
6172 OpenUNIX*|UnixWare*)
6173 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
6174 ;;
6175 OSF*)
6176 BASECFLAGS="$BASECFLAGS -ieee -std"
6177 ;;
6178 SCO_SV*)
6179 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
6180 ;;
6181 esac
6182 ;;
6183esac
6184
6185if test "$Py_DEBUG" = 'true'; then
6186 :
6187else
6188 OPT="-DNDEBUG $OPT"
6189fi
6190
6191if test "$ac_arch_flags"
6192then
6193 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
6194fi
6195
6196# disable check for icc since it seems to pass, but generates a warning
6197if test "$CC" = icc
6198then
6199 ac_cv_opt_olimit_ok=no
6200fi
6201
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -OPT:Olimit=0" >&5
6203$as_echo_n "checking whether $CC accepts -OPT:Olimit=0... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006204if ${ac_cv_opt_olimit_ok+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006205 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006206else
6207 ac_save_cc="$CC"
6208CC="$CC -OPT:Olimit=0"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006209cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006210/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00006211
6212int
6213main ()
6214{
Mark Dickinson5e13e292010-05-11 08:55:06 +00006215
Gregory P. Smith373469a2009-11-01 21:03:38 +00006216 ;
6217 return 0;
6218}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006219_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006220if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006221 ac_cv_opt_olimit_ok=yes
6222else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006223 ac_cv_opt_olimit_ok=no
Matthias Klosec511b472010-05-08 11:01:39 +00006224
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006225fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00006226rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006227CC="$ac_save_cc"
6228fi
6229
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006230{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_opt_olimit_ok" >&5
6231$as_echo "$ac_cv_opt_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006232if test $ac_cv_opt_olimit_ok = yes; then
6233 case $ac_sys_system in
6234 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
6235 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
6236 # environment?
6237 Darwin*)
6238 ;;
Trent Nelson34562e12012-10-17 18:01:12 -04006239 # XXX thankfully this useless troublemaker of a flag has been
6240 # eradicated in the 3.x line. For now, make sure it isn't picked
6241 # up by any of our other platforms that use CC.
6242 AIX*|SunOS*|HP-UX*|IRIX*)
6243 ;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006244 *)
6245 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
6246 ;;
6247 esac
6248else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006249 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Olimit 1500" >&5
6250$as_echo_n "checking whether $CC accepts -Olimit 1500... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006251 if ${ac_cv_olimit_ok+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006252 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006253else
6254 ac_save_cc="$CC"
6255 CC="$CC -Olimit 1500"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006256 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006257/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00006258
6259int
6260main ()
6261{
Mark Dickinson5e13e292010-05-11 08:55:06 +00006262
Gregory P. Smith373469a2009-11-01 21:03:38 +00006263 ;
6264 return 0;
6265}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006266_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006267if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006268 ac_cv_olimit_ok=yes
6269else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006270 ac_cv_olimit_ok=no
Matthias Klosec511b472010-05-08 11:01:39 +00006271
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006272fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00006273rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006274 CC="$ac_save_cc"
6275fi
6276
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_olimit_ok" >&5
6278$as_echo "$ac_cv_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006279 if test $ac_cv_olimit_ok = yes; then
Stefan Krah67473262012-11-29 00:17:05 +01006280 case $ac_sys_system in
6281 # Issue #16534: On HP-UX ac_cv_olimit_ok=yes is a false positive.
6282 HP-UX*)
6283 ;;
6284 *)
6285 BASECFLAGS="$BASECFLAGS -Olimit 1500"
6286 ;;
6287 esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006288 fi
6289fi
6290
6291# Check whether GCC supports PyArg_ParseTuple format
6292if test "$GCC" = "yes"
6293then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006294 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
6295$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006296 save_CFLAGS=$CFLAGS
Benjamin Petersonc8759662013-05-11 13:00:05 -05006297 CFLAGS="$CFLAGS -Werror -Wformat"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006298 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006299/* end confdefs.h. */
6300
6301 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006302int
6303main ()
6304{
6305
6306 ;
6307 return 0;
6308}
Matthias Klosec511b472010-05-08 11:01:39 +00006309
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006310_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006311if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006312
Matthias Klosec511b472010-05-08 11:01:39 +00006313
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006314$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006315
Matthias Klosec511b472010-05-08 11:01:39 +00006316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006317$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00006318
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006319else
Matthias Klosec511b472010-05-08 11:01:39 +00006320
6321 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006322$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006323
6324fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006325rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6326 CFLAGS=$save_CFLAGS
6327fi
6328
6329# On some compilers, pthreads are available without further options
6330# (e.g. MacOS X). On some of these systems, the compiler will not
6331# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
6332# So we have to see first whether pthreads are available without
6333# options before we can check whether -Kpthread improves anything.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
6335$as_echo_n "checking whether pthreads are available without options... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006336if ${ac_cv_pthread_is_default+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006337 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006338else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006339 if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006340 ac_cv_pthread_is_default=no
6341else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006342 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006343/* end confdefs.h. */
6344
Stefan Krahae66ca62012-11-22 22:36:57 +01006345#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006346#include <pthread.h>
6347
6348void* routine(void* p){return NULL;}
6349
6350int main(){
6351 pthread_t p;
6352 if(pthread_create(&p,NULL,routine,NULL)!=0)
6353 return 1;
6354 (void)pthread_detach(p);
6355 return 0;
6356}
6357
6358_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006359if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006360
6361 ac_cv_pthread_is_default=yes
6362 ac_cv_kthread=no
6363 ac_cv_pthread=no
6364
6365else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006366 ac_cv_pthread_is_default=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006367fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006368rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6369 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006370fi
6371
6372
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006373fi
6374
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006375{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
6376$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006377
6378
6379if test $ac_cv_pthread_is_default = yes
6380then
6381 ac_cv_kpthread=no
6382else
6383# -Kpthread, if available, provides the right #defines
6384# and linker options to make pthread_create available
6385# Some compilers won't report that they do not support -Kpthread,
6386# so we need to run a program to see whether it really made the
6387# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
6389$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006390if ${ac_cv_kpthread+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006391 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006392else
6393 ac_save_cc="$CC"
6394CC="$CC -Kpthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006395if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006396 ac_cv_kpthread=no
6397else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006398 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006399/* end confdefs.h. */
6400
Stefan Krahae66ca62012-11-22 22:36:57 +01006401#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006402#include <pthread.h>
6403
6404void* routine(void* p){return NULL;}
6405
6406int main(){
6407 pthread_t p;
6408 if(pthread_create(&p,NULL,routine,NULL)!=0)
6409 return 1;
6410 (void)pthread_detach(p);
6411 return 0;
6412}
6413
6414_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006415if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006416 ac_cv_kpthread=yes
6417else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006418 ac_cv_kpthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006419fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006420rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6421 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006422fi
6423
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006424CC="$ac_save_cc"
6425fi
6426
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006427{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
6428$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006429fi
6430
6431if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
6432then
6433# -Kthread, if available, provides the right #defines
6434# and linker options to make pthread_create available
6435# Some compilers won't report that they do not support -Kthread,
6436# so we need to run a program to see whether it really made the
6437# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
6439$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006440if ${ac_cv_kthread+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006441 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006442else
6443 ac_save_cc="$CC"
6444CC="$CC -Kthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006445if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006446 ac_cv_kthread=no
6447else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006448 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006449/* end confdefs.h. */
6450
Stefan Krahae66ca62012-11-22 22:36:57 +01006451#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006452#include <pthread.h>
6453
6454void* routine(void* p){return NULL;}
6455
6456int main(){
6457 pthread_t p;
6458 if(pthread_create(&p,NULL,routine,NULL)!=0)
6459 return 1;
6460 (void)pthread_detach(p);
6461 return 0;
6462}
6463
6464_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006465if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006466 ac_cv_kthread=yes
6467else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006468 ac_cv_kthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006469fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006470rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6471 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006472fi
6473
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006474CC="$ac_save_cc"
6475fi
6476
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006477{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
6478$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006479fi
6480
6481if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
6482then
6483# -pthread, if available, provides the right #defines
6484# and linker options to make pthread_create available
6485# Some compilers won't report that they do not support -pthread,
6486# so we need to run a program to see whether it really made the
6487# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
6489$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.orgfa3f9a32013-01-25 15:32:31 +01006490if ${ac_cv_pthread+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006491 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006492else
6493 ac_save_cc="$CC"
6494CC="$CC -pthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006495if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006496 ac_cv_pthread=no
6497else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006498 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006499/* end confdefs.h. */
6500
Stefan Krahae66ca62012-11-22 22:36:57 +01006501#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006502#include <pthread.h>
6503
6504void* routine(void* p){return NULL;}
6505
6506int main(){
6507 pthread_t p;
6508 if(pthread_create(&p,NULL,routine,NULL)!=0)
6509 return 1;
6510 (void)pthread_detach(p);
6511 return 0;
6512}
6513
6514_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006515if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006516 ac_cv_pthread=yes
6517else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006518 ac_cv_pthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006519fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006520rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6521 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006522fi
6523
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006524CC="$ac_save_cc"
6525fi
6526
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006527{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
6528$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006529fi
6530
6531# If we have set a CC compiler flag for thread support then
6532# check if it works for CXX, too.
6533ac_cv_cxx_thread=no
6534if test ! -z "$CXX"
6535then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
6537$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006538ac_save_cxx="$CXX"
6539
6540if test "$ac_cv_kpthread" = "yes"
6541then
6542 CXX="$CXX -Kpthread"
6543 ac_cv_cxx_thread=yes
6544elif test "$ac_cv_kthread" = "yes"
6545then
6546 CXX="$CXX -Kthread"
6547 ac_cv_cxx_thread=yes
6548elif test "$ac_cv_pthread" = "yes"
6549then
6550 CXX="$CXX -pthread"
6551 ac_cv_cxx_thread=yes
6552fi
6553
6554if test $ac_cv_cxx_thread = yes
6555then
6556 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
6557 $CXX -c conftest.$ac_ext 2>&5
6558 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
6559 && test -s conftest$ac_exeext && ./conftest$ac_exeext
6560 then
6561 ac_cv_cxx_thread=yes
6562 else
6563 ac_cv_cxx_thread=no
6564 fi
6565 rm -fr conftest*
6566fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006567{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
6568$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006569fi
6570CXX="$ac_save_cxx"
6571
6572
6573# checks for header files
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6575$as_echo_n "checking for ANSI C header files... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006576if ${ac_cv_header_stdc+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006577 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006578else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006579 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006580/* end confdefs.h. */
6581#include <stdlib.h>
6582#include <stdarg.h>
6583#include <string.h>
6584#include <float.h>
6585
6586int
6587main ()
6588{
6589
6590 ;
6591 return 0;
6592}
6593_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006594if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006595 ac_cv_header_stdc=yes
6596else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006597 ac_cv_header_stdc=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006598fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006599rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6600
6601if test $ac_cv_header_stdc = yes; then
6602 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006603 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006604/* end confdefs.h. */
6605#include <string.h>
6606
6607_ACEOF
6608if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006609 $EGREP "memchr" >/dev/null 2>&1; then :
6610
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006611else
6612 ac_cv_header_stdc=no
6613fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006614rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006615
6616fi
6617
6618if test $ac_cv_header_stdc = yes; then
6619 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006620 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006621/* end confdefs.h. */
6622#include <stdlib.h>
6623
6624_ACEOF
6625if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006626 $EGREP "free" >/dev/null 2>&1; then :
6627
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006628else
6629 ac_cv_header_stdc=no
6630fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006631rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006632
6633fi
6634
6635if test $ac_cv_header_stdc = yes; then
6636 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006637 if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006638 :
6639else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006640 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006641/* end confdefs.h. */
6642#include <ctype.h>
6643#include <stdlib.h>
6644#if ((' ' & 0x0FF) == 0x020)
6645# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6646# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6647#else
6648# define ISLOWER(c) \
6649 (('a' <= (c) && (c) <= 'i') \
6650 || ('j' <= (c) && (c) <= 'r') \
6651 || ('s' <= (c) && (c) <= 'z'))
6652# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6653#endif
6654
6655#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6656int
6657main ()
6658{
6659 int i;
6660 for (i = 0; i < 256; i++)
6661 if (XOR (islower (i), ISLOWER (i))
6662 || toupper (i) != TOUPPER (i))
6663 return 2;
6664 return 0;
6665}
6666_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006667if ac_fn_c_try_run "$LINENO"; then :
6668
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006669else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006670 ac_cv_header_stdc=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006671fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006672rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6673 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006674fi
6675
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006676fi
6677fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006678{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6679$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006680if test $ac_cv_header_stdc = yes; then
6681
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006682$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006683
6684fi
6685
doko@ubuntu.comf27ec3e2014-04-17 20:11:19 +02006686for ac_header in asm/types.h conio.h direct.h dlfcn.h errno.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00006687fcntl.h grp.h \
doko@ubuntu.comf27ec3e2014-04-17 20:11:19 +02006688ieeefp.h io.h langinfo.h libintl.h poll.h process.h pthread.h \
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00006689shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006690unistd.h utime.h \
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00006691sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
6692sys/lock.h sys/mkdev.h sys/modem.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00006693sys/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 +00006694sys/termio.h sys/time.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00006695sys/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 +00006696sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimes3aa138f2013-06-18 13:25:24 +02006697bluetooth/bluetooth.h linux/tipc.h spawn.h util.h alloca.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006698do :
6699 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6700ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006701if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006702 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006703#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006704_ACEOF
6705
6706fi
6707
Guido van Rossum627b2d71993-12-24 10:39:16 +00006708done
6709
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006710ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006711for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006712 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6714$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006715if eval \${$as_ac_Header+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006716 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006717else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006718 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006719/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006720#include <sys/types.h>
6721#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006722
Martin v. Löwis11437992002-04-12 09:54:03 +00006723int
6724main ()
6725{
6726if ((DIR *) 0)
6727return 0;
6728 ;
6729 return 0;
6730}
6731_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006732if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006733 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006734else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006735 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006736fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006737rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006738fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006739eval ac_res=\$$as_ac_Header
6740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6741$as_echo "$ac_res" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006742if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006743 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006744#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006745_ACEOF
6746
6747ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006748fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006749
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006750done
6751# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6752if test $ac_header_dirent = dirent.h; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006753 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6754$as_echo_n "checking for library containing opendir... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006755if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006756 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006757else
Martin v. Löwis11437992002-04-12 09:54:03 +00006758 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006759cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006760/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006761
Martin v. Löwiseba40652007-08-30 20:10:57 +00006762/* Override any GCC internal prototype to avoid an error.
6763 Use char because int might match the return type of a GCC
6764 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006765#ifdef __cplusplus
6766extern "C"
6767#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006768char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006769int
6770main ()
6771{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006772return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006773 ;
6774 return 0;
6775}
6776_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006777for ac_lib in '' dir; do
6778 if test -z "$ac_lib"; then
6779 ac_res="none required"
6780 else
6781 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00006782 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00006783 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006784 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006785 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00006786fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006787rm -f core conftest.err conftest.$ac_objext \
6788 conftest$ac_exeext
Matthias Klose3cef2a92012-03-14 23:39:33 +01006789 if ${ac_cv_search_opendir+:} false; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006790 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00006791fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006792done
Matthias Klose3cef2a92012-03-14 23:39:33 +01006793if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006794
Martin v. Löwiseba40652007-08-30 20:10:57 +00006795else
6796 ac_cv_search_opendir=no
6797fi
6798rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006799LIBS=$ac_func_search_save_LIBS
6800fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006801{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6802$as_echo "$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006803ac_res=$ac_cv_search_opendir
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006804if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006805 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006806
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006807fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006808
Michael W. Hudson54241132001-12-07 15:38:26 +00006809else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006810 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6811$as_echo_n "checking for library containing opendir... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006812if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006813 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006814else
6815 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006816cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006817/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006818
Martin v. Löwiseba40652007-08-30 20:10:57 +00006819/* Override any GCC internal prototype to avoid an error.
6820 Use char because int might match the return type of a GCC
6821 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006822#ifdef __cplusplus
6823extern "C"
6824#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006825char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006826int
6827main ()
6828{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006829return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006830 ;
6831 return 0;
6832}
6833_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006834for ac_lib in '' x; do
6835 if test -z "$ac_lib"; then
6836 ac_res="none required"
6837 else
6838 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00006839 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00006840 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006841 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006842 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00006843fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006844rm -f core conftest.err conftest.$ac_objext \
6845 conftest$ac_exeext
Matthias Klose3cef2a92012-03-14 23:39:33 +01006846 if ${ac_cv_search_opendir+:} false; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006847 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00006848fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006849done
Matthias Klose3cef2a92012-03-14 23:39:33 +01006850if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006851
Martin v. Löwiseba40652007-08-30 20:10:57 +00006852else
6853 ac_cv_search_opendir=no
6854fi
6855rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006856LIBS=$ac_func_search_save_LIBS
6857fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006858{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6859$as_echo "$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006860ac_res=$ac_cv_search_opendir
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006861if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006862 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006863
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006864fi
6865
6866fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006867
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
6869$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006870if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006871 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006872else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006873 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006874/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006875#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006876int
6877main ()
6878{
6879return makedev(0, 0);
6880 ;
6881 return 0;
6882}
6883_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006884if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006885 ac_cv_header_sys_types_h_makedev=yes
6886else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006887 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006888fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006889rm -f core conftest.err conftest.$ac_objext \
6890 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006891
6892fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006893{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
6894$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006895
6896if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006897ac_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 +01006898if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006899
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006900$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006901
6902fi
6903
6904
6905
6906 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006907 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 +01006908if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006909
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006910$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006911
6912fi
6913
6914
6915 fi
6916fi
6917
Michael W. Hudson54241132001-12-07 15:38:26 +00006918
Martin v. Löwis11017b12006-01-14 18:12:57 +00006919# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00006920for ac_header in linux/netlink.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006921do :
6922 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 +00006923#ifdef HAVE_ASM_TYPES_H
6924#include <asm/types.h>
6925#endif
6926#ifdef HAVE_SYS_SOCKET_H
6927#include <sys/socket.h>
6928#endif
6929
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006930"
Matthias Klose3cef2a92012-03-14 23:39:33 +01006931if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00006932 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006933#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006934_ACEOF
6935
6936fi
6937
6938done
6939
6940
Guido van Rossum627b2d71993-12-24 10:39:16 +00006941# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006942was_it_defined=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
6944$as_echo_n "checking for clock_t in time.h... " >&6; }
6945cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006946/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006947#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006948
6949_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006950if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006951 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00006952 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006953else
Martin v. Löwis11437992002-04-12 09:54:03 +00006954
6955
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006956$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00006957
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006958
Guido van Rossum627b2d71993-12-24 10:39:16 +00006959fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006960rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006961
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006962{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
6963$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006964
Neal Norwitz11690112002-07-30 01:08:28 +00006965# Check whether using makedev requires defining _OSF_SOURCE
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
6967$as_echo_n "checking for makedev... " >&6; }
6968cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006969/* end confdefs.h. */
Jesus Cea616de772010-04-28 10:32:30 +00006970
6971#if defined(MAJOR_IN_MKDEV)
6972#include <sys/mkdev.h>
6973#elif defined(MAJOR_IN_SYSMACROS)
6974#include <sys/sysmacros.h>
6975#else
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006976#include <sys/types.h>
Jesus Cea616de772010-04-28 10:32:30 +00006977#endif
Neal Norwitz11690112002-07-30 01:08:28 +00006978int
6979main ()
6980{
6981 makedev(0, 0)
6982 ;
6983 return 0;
6984}
6985_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006986if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006987 ac_cv_has_makedev=yes
6988else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006989 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006990fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006991rm -f core conftest.err conftest.$ac_objext \
6992 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006993if test "$ac_cv_has_makedev" = "no"; then
6994 # we didn't link, try if _OSF_SOURCE will allow us to link
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006995 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006996/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006997
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006998#define _OSF_SOURCE 1
6999#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00007000
Neal Norwitz11690112002-07-30 01:08:28 +00007001int
7002main ()
7003{
7004 makedev(0, 0)
7005 ;
7006 return 0;
7007}
7008_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007009if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007010 ac_cv_has_makedev=yes
7011else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007012 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007013fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007014rm -f core conftest.err conftest.$ac_objext \
7015 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00007016 if test "$ac_cv_has_makedev" = "yes"; then
7017
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007018$as_echo "#define _OSF_SOURCE 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007019
7020 fi
7021fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007022{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
7023$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007024if test "$ac_cv_has_makedev" = "yes"; then
7025
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007026$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007027
7028fi
7029
Martin v. Löwis399a6892002-10-04 10:22:02 +00007030# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
7031# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
7032# defined, but the compiler does not support pragma redefine_extname,
7033# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
7034# structures (such as rlimit64) without declaring them. As a
7035# work-around, disable LFS on such configurations
7036
7037use_lfs=yes
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
7039$as_echo_n "checking Solaris LFS bug... " >&6; }
7040cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007041/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00007042
7043#define _LARGEFILE_SOURCE 1
7044#define _FILE_OFFSET_BITS 64
7045#include <sys/resource.h>
7046
Martin v. Löwis399a6892002-10-04 10:22:02 +00007047int
7048main ()
7049{
7050struct rlimit foo;
7051 ;
7052 return 0;
7053}
7054_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007055if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00007056 sol_lfs_bug=no
7057else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007058 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00007059fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007060rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007061{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
7062$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00007063if test "$sol_lfs_bug" = "yes"; then
7064 use_lfs=no
7065fi
7066
7067if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00007068# Two defines needed to enable largefile support on various platforms
7069# These may affect some typedefs
Georg Brandl94800df2011-02-25 11:09:02 +00007070case $ac_sys_system/$ac_sys_release in
7071AIX*)
7072
7073$as_echo "#define _LARGE_FILES 1" >>confdefs.h
7074
7075 ;;
7076esac
Guido van Rossum810cc512001-09-09 23:51:39 +00007077
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007078$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007079
7080
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007081$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00007082
Martin v. Löwis399a6892002-10-04 10:22:02 +00007083fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007084
Guido van Rossum84e7b241996-08-19 21:59:00 +00007085# Add some code to confdefs.h so that the test for off_t works on SCO
7086cat >> confdefs.h <<\EOF
7087#if defined(SCO_DS)
7088#undef _OFF_T
7089#endif
7090EOF
7091
Guido van Rossumef2255b2000-03-10 22:30:29 +00007092# Type availability checks
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007093ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007094if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007095
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007096else
Martin v. Löwis11437992002-04-12 09:54:03 +00007097
7098cat >>confdefs.h <<_ACEOF
7099#define mode_t int
7100_ACEOF
7101
7102fi
7103
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007104ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007105if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007106
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007107else
Martin v. Löwis11437992002-04-12 09:54:03 +00007108
7109cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007110#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00007111_ACEOF
7112
7113fi
7114
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007115ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007116if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007117
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007118else
Martin v. Löwis11437992002-04-12 09:54:03 +00007119
7120cat >>confdefs.h <<_ACEOF
7121#define pid_t int
7122_ACEOF
7123
7124fi
7125
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007126
Martin v. Löwis11437992002-04-12 09:54:03 +00007127cat >>confdefs.h <<_ACEOF
Matthias Klosecbf54b12010-05-08 11:04:18 +00007128#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00007129_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007130
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007131ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007132if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007133
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007134else
Martin v. Löwis11437992002-04-12 09:54:03 +00007135
7136cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007137#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007138_ACEOF
7139
7140fi
7141
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
7143$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007144if ${ac_cv_type_uid_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007145 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007146else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007147 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007148/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007149#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007150
7151_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007152if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007153 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007154 ac_cv_type_uid_t=yes
7155else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007156 ac_cv_type_uid_t=no
7157fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00007158rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007159
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007160fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007161{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
7162$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007163if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007164
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007165$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007166
7167
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007168$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007169
7170fi
7171
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007172
7173# There are two separate checks for each of the exact-width integer types we
7174# need. First we check whether the type is available using the usual
7175# AC_CHECK_TYPE macro with the default includes (which includes <inttypes.h>
7176# and <stdint.h> where available). We then also use the special type checks of
7177# the form AC_TYPE_UINT32_T, which in the case that uint32_t is not available
7178# directly, #define's uint32_t to be a suitable type.
7179
7180ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
7181if test "x$ac_cv_type_uint32_t" = xyes; then :
7182
7183$as_echo "#define HAVE_UINT32_T 1" >>confdefs.h
7184
7185fi
7186
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007187ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
7188case $ac_cv_c_uint32_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007189 no|yes) ;; #(
7190 *)
7191
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007192$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007193
7194
7195cat >>confdefs.h <<_ACEOF
7196#define uint32_t $ac_cv_c_uint32_t
7197_ACEOF
7198;;
7199 esac
7200
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007201
7202ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
7203if test "x$ac_cv_type_uint64_t" = xyes; then :
7204
7205$as_echo "#define HAVE_UINT64_T 1" >>confdefs.h
7206
7207fi
7208
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007209ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
7210case $ac_cv_c_uint64_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007211 no|yes) ;; #(
7212 *)
7213
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007214$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007215
7216
7217cat >>confdefs.h <<_ACEOF
7218#define uint64_t $ac_cv_c_uint64_t
7219_ACEOF
7220;;
7221 esac
7222
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007223
7224ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
7225if test "x$ac_cv_type_int32_t" = xyes; then :
7226
7227$as_echo "#define HAVE_INT32_T 1" >>confdefs.h
7228
7229fi
7230
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007231ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
7232case $ac_cv_c_int32_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007233 no|yes) ;; #(
7234 *)
7235
7236cat >>confdefs.h <<_ACEOF
7237#define int32_t $ac_cv_c_int32_t
7238_ACEOF
7239;;
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007240esac
7241
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007242
7243ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
7244if test "x$ac_cv_type_int64_t" = xyes; then :
7245
7246$as_echo "#define HAVE_INT64_T 1" >>confdefs.h
7247
7248fi
7249
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007250ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
7251case $ac_cv_c_int64_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007252 no|yes) ;; #(
7253 *)
7254
7255cat >>confdefs.h <<_ACEOF
7256#define int64_t $ac_cv_c_int64_t
7257_ACEOF
7258;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007259esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00007260
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007261
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007262ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007263if test "x$ac_cv_type_ssize_t" = xyes; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007264
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007265$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00007266
7267fi
7268
Jack Jansendd19cf82001-12-06 22:36:17 +00007269
Michael W. Hudson54241132001-12-07 15:38:26 +00007270# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007271# ANSI C requires sizeof(char) == 1, so no need to check it
Martin v. Löwiseba40652007-08-30 20:10:57 +00007272# The cast to long int works around a bug in the HP C Compiler
7273# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7274# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7275# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
7277$as_echo_n "checking size of int... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007278if ${ac_cv_sizeof_int+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007279 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007280else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007281 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 +00007282
Martin v. Löwis11437992002-04-12 09:54:03 +00007283else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007284 if test "$ac_cv_type_int" = yes; then
7285 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7286$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007287as_fn_error 77 "cannot compute sizeof (int)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007288See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007289 else
7290 ac_cv_sizeof_int=0
7291 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007292fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007293
Martin v. Löwis11437992002-04-12 09:54:03 +00007294fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007295{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
7296$as_echo "$ac_cv_sizeof_int" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007297
7298
7299
Martin v. Löwis11437992002-04-12 09:54:03 +00007300cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007301#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007302_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007303
7304
Martin v. Löwiseba40652007-08-30 20:10:57 +00007305# The cast to long int works around a bug in the HP C Compiler
7306# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7307# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7308# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
7310$as_echo_n "checking size of long... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007311if ${ac_cv_sizeof_long+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007312 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007313else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007314 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 +00007315
Martin v. Löwis11437992002-04-12 09:54:03 +00007316else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007317 if test "$ac_cv_type_long" = yes; then
7318 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7319$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007320as_fn_error 77 "cannot compute sizeof (long)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007321See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007322 else
7323 ac_cv_sizeof_long=0
7324 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007325fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007326
Martin v. Löwis11437992002-04-12 09:54:03 +00007327fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007328{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
7329$as_echo "$ac_cv_sizeof_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007330
7331
7332
Martin v. Löwis11437992002-04-12 09:54:03 +00007333cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007334#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007335_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007336
7337
Martin v. Löwiseba40652007-08-30 20:10:57 +00007338# The cast to long int works around a bug in the HP C Compiler
7339# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7340# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7341# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
7343$as_echo_n "checking size of void *... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007344if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007345 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007346else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007347 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 +00007348
Martin v. Löwis11437992002-04-12 09:54:03 +00007349else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007350 if test "$ac_cv_type_void_p" = yes; then
7351 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7352$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007353as_fn_error 77 "cannot compute sizeof (void *)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007354See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007355 else
7356 ac_cv_sizeof_void_p=0
7357 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007358fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007359
Martin v. Löwis11437992002-04-12 09:54:03 +00007360fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007361{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
7362$as_echo "$ac_cv_sizeof_void_p" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007363
7364
7365
Martin v. Löwis11437992002-04-12 09:54:03 +00007366cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007367#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00007368_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007369
7370
Martin v. Löwiseba40652007-08-30 20:10:57 +00007371# The cast to long int works around a bug in the HP C Compiler
7372# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7373# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7374# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
7376$as_echo_n "checking size of short... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007377if ${ac_cv_sizeof_short+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007378 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007379else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007380 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 +00007381
Martin v. Löwis11437992002-04-12 09:54:03 +00007382else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007383 if test "$ac_cv_type_short" = yes; then
7384 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7385$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007386as_fn_error 77 "cannot compute sizeof (short)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007387See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007388 else
7389 ac_cv_sizeof_short=0
7390 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007391fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007392
Martin v. Löwis11437992002-04-12 09:54:03 +00007393fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007394{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
7395$as_echo "$ac_cv_sizeof_short" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007396
7397
7398
Martin v. Löwis11437992002-04-12 09:54:03 +00007399cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007400#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007401_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007402
7403
Martin v. Löwiseba40652007-08-30 20:10:57 +00007404# The cast to long int works around a bug in the HP C Compiler
7405# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7406# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7407# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
7409$as_echo_n "checking size of float... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007410if ${ac_cv_sizeof_float+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007411 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007412else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007413 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 +00007414
Martin v. Löwis11437992002-04-12 09:54:03 +00007415else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007416 if test "$ac_cv_type_float" = yes; then
7417 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7418$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007419as_fn_error 77 "cannot compute sizeof (float)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007420See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007421 else
7422 ac_cv_sizeof_float=0
7423 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007424fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007425
Martin v. Löwis11437992002-04-12 09:54:03 +00007426fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007427{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
7428$as_echo "$ac_cv_sizeof_float" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007429
7430
7431
Martin v. Löwis11437992002-04-12 09:54:03 +00007432cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007433#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007434_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007435
7436
Martin v. Löwiseba40652007-08-30 20:10:57 +00007437# The cast to long int works around a bug in the HP C Compiler
7438# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7439# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7440# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
7442$as_echo_n "checking size of double... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007443if ${ac_cv_sizeof_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007444 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007445else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007446 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 +00007447
Martin v. Löwis11437992002-04-12 09:54:03 +00007448else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007449 if test "$ac_cv_type_double" = yes; then
7450 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7451$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007452as_fn_error 77 "cannot compute sizeof (double)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007453See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007454 else
7455 ac_cv_sizeof_double=0
7456 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007457fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007458
Martin v. Löwis11437992002-04-12 09:54:03 +00007459fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007460{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
7461$as_echo "$ac_cv_sizeof_double" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007462
7463
7464
Martin v. Löwis11437992002-04-12 09:54:03 +00007465cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007466#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007467_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007468
7469
Martin v. Löwiseba40652007-08-30 20:10:57 +00007470# The cast to long int works around a bug in the HP C Compiler
7471# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7472# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7473# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
7475$as_echo_n "checking size of fpos_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007476if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007477 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007478else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007479 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 +00007480
Martin v. Löwis11437992002-04-12 09:54:03 +00007481else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007482 if test "$ac_cv_type_fpos_t" = yes; then
7483 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7484$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007485as_fn_error 77 "cannot compute sizeof (fpos_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007486See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007487 else
7488 ac_cv_sizeof_fpos_t=0
7489 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007490fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007491
Martin v. Löwis11437992002-04-12 09:54:03 +00007492fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007493{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
7494$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007495
7496
7497
Martin v. Löwis11437992002-04-12 09:54:03 +00007498cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007499#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007500_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007501
Michael W. Hudson54241132001-12-07 15:38:26 +00007502
Martin v. Löwiseba40652007-08-30 20:10:57 +00007503# The cast to long int works around a bug in the HP C Compiler
7504# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7505# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7506# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
7508$as_echo_n "checking size of size_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007509if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007510 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007511else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007512 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 +00007513
Martin v. Löwis18e16552006-02-15 17:27:45 +00007514else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007515 if test "$ac_cv_type_size_t" = yes; then
7516 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7517$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007518as_fn_error 77 "cannot compute sizeof (size_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007519See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007520 else
7521 ac_cv_sizeof_size_t=0
7522 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00007523fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007524
Martin v. Löwis18e16552006-02-15 17:27:45 +00007525fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007526{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
7527$as_echo "$ac_cv_sizeof_size_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007528
7529
7530
Martin v. Löwis18e16552006-02-15 17:27:45 +00007531cat >>confdefs.h <<_ACEOF
7532#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
7533_ACEOF
7534
7535
Christian Heimes951cc0f2008-01-31 23:08:23 +00007536# The cast to long int works around a bug in the HP C Compiler
7537# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7538# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7539# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
7541$as_echo_n "checking size of pid_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007542if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007543 $as_echo_n "(cached) " >&6
Christian Heimes951cc0f2008-01-31 23:08:23 +00007544else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007545 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 +00007546
Christian Heimes951cc0f2008-01-31 23:08:23 +00007547else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007548 if test "$ac_cv_type_pid_t" = yes; then
7549 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7550$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007551as_fn_error 77 "cannot compute sizeof (pid_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007552See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes951cc0f2008-01-31 23:08:23 +00007553 else
7554 ac_cv_sizeof_pid_t=0
7555 fi
7556fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007557
Christian Heimes951cc0f2008-01-31 23:08:23 +00007558fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007559{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
7560$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes951cc0f2008-01-31 23:08:23 +00007561
7562
7563
7564cat >>confdefs.h <<_ACEOF
7565#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
7566_ACEOF
7567
7568
Michael W. Hudson54241132001-12-07 15:38:26 +00007569
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
7571$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007572have_long_long=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007573cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007574/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007575
Martin v. Löwis11437992002-04-12 09:54:03 +00007576int
7577main ()
7578{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007579long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007580 ;
7581 return 0;
7582}
7583_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007584if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007585
7586
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007587$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007588
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007589 have_long_long=yes
7590
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007591fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007592rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007593{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
7594$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007595if test "$have_long_long" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00007596# The cast to long int works around a bug in the HP C Compiler
7597# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7598# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7599# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
7601$as_echo_n "checking size of long long... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007602if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007603 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007604else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007605 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007606
Martin v. Löwis11437992002-04-12 09:54:03 +00007607else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007608 if test "$ac_cv_type_long_long" = yes; then
7609 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7610$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007611as_fn_error 77 "cannot compute sizeof (long long)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007612See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007613 else
7614 ac_cv_sizeof_long_long=0
7615 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007616fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007617
Martin v. Löwis11437992002-04-12 09:54:03 +00007618fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007619{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
7620$as_echo "$ac_cv_sizeof_long_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007621
7622
7623
Martin v. Löwis11437992002-04-12 09:54:03 +00007624cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007625#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007626_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007627
Michael W. Hudson54241132001-12-07 15:38:26 +00007628
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007629fi
7630
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
7632$as_echo_n "checking for long double support... " >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007633have_long_double=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007634cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007635/* end confdefs.h. */
7636
7637int
7638main ()
7639{
Matthias Klosec511b472010-05-08 11:01:39 +00007640long double x; x = (long double)0;
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007641 ;
7642 return 0;
7643}
7644_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007645if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007646
7647
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007648$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007649
7650 have_long_double=yes
7651
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007652fi
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007653rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007654{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
7655$as_echo "$have_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007656if test "$have_long_double" = yes ; then
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007657# The cast to long int works around a bug in the HP C Compiler
7658# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7659# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7660# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
7662$as_echo_n "checking size of long double... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007663if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007664 $as_echo_n "(cached) " >&6
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007665else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007666 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 +00007667
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007668else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007669 if test "$ac_cv_type_long_double" = yes; then
7670 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7671$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007672as_fn_error 77 "cannot compute sizeof (long double)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007673See \`config.log' for more details" "$LINENO" 5; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007674 else
7675 ac_cv_sizeof_long_double=0
7676 fi
7677fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007678
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007679fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007680{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
7681$as_echo "$ac_cv_sizeof_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007682
7683
7684
7685cat >>confdefs.h <<_ACEOF
7686#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
7687_ACEOF
7688
7689
7690fi
7691
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
7693$as_echo_n "checking for _Bool support... " >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007694have_c99_bool=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007695cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007696/* end confdefs.h. */
7697
7698int
7699main ()
7700{
7701_Bool x; x = (_Bool)0;
7702 ;
7703 return 0;
7704}
7705_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007706if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007707
7708
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007709$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007710
7711 have_c99_bool=yes
7712
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007713fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007714rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007715{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7716$as_echo "$have_c99_bool" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007717if test "$have_c99_bool" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00007718# The cast to long int works around a bug in the HP C Compiler
7719# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7720# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7721# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7723$as_echo_n "checking size of _Bool... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007724if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007725 $as_echo_n "(cached) " >&6
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007726else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007727 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 +00007728
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007729else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007730 if test "$ac_cv_type__Bool" = yes; then
7731 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7732$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007733as_fn_error 77 "cannot compute sizeof (_Bool)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007734See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007735 else
7736 ac_cv_sizeof__Bool=0
7737 fi
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007738fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007739
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007740fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007741{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7742$as_echo "$ac_cv_sizeof__Bool" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007743
7744
7745
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007746cat >>confdefs.h <<_ACEOF
7747#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7748_ACEOF
7749
7750
7751fi
7752
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007753ac_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 +00007754 #include <stdint.h>
7755 #endif
Antoine Pitrou7be5a652010-10-10 08:14:41 +00007756 #ifdef HAVE_INTTYPES_H
7757 #include <inttypes.h>
7758 #endif
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007759"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007760if test "x$ac_cv_type_uintptr_t" = xyes; then :
Martin v. Löwisebe26702006-10-02 14:55:51 +00007761
7762cat >>confdefs.h <<_ACEOF
7763#define HAVE_UINTPTR_T 1
7764_ACEOF
7765
Martin v. Löwiseba40652007-08-30 20:10:57 +00007766# The cast to long int works around a bug in the HP C Compiler
7767# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7768# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7769# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7771$as_echo_n "checking size of uintptr_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007772if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007773 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007774else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007775 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 +00007776
Martin v. Löwis11437992002-04-12 09:54:03 +00007777else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007778 if test "$ac_cv_type_uintptr_t" = yes; then
7779 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7780$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007781as_fn_error 77 "cannot compute sizeof (uintptr_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007782See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007783 else
7784 ac_cv_sizeof_uintptr_t=0
7785 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007786fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007787
Martin v. Löwis11437992002-04-12 09:54:03 +00007788fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007789{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7790$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007791
7792
7793
Martin v. Löwis11437992002-04-12 09:54:03 +00007794cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007795#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007796_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007797
Michael W. Hudson54241132001-12-07 15:38:26 +00007798
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007799fi
7800
Martin v. Löwisebe26702006-10-02 14:55:51 +00007801
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007802# The cast to long int works around a bug in the HP C Compiler
7803# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7804# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7805# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
7807$as_echo_n "checking size of off_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007808if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007809 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007810else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007811 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007812#ifdef HAVE_SYS_TYPES_H
7813#include <sys/types.h>
7814#endif
7815
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007816"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007817
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007818else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007819 if test "$ac_cv_type_off_t" = yes; then
7820 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7821$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007822as_fn_error 77 "cannot compute sizeof (off_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007823See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007824 else
7825 ac_cv_sizeof_off_t=0
7826 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007827fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007828
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007829fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007830{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
7831$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007832
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007833
7834
Martin v. Löwis11437992002-04-12 09:54:03 +00007835cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007836#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007837_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007838
Michael W. Hudson54241132001-12-07 15:38:26 +00007839
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007840
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
7842$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson0ef0b912009-12-31 21:11:48 +00007843if test "$have_long_long" = yes
7844then
7845if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007846 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007847
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007848$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007849
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7851$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007852else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7854$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007855fi
Mark Dickinson0ef0b912009-12-31 21:11:48 +00007856else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7858$as_echo "no" >&6; }
Mark Dickinson0ef0b912009-12-31 21:11:48 +00007859fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007860
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007861# The cast to long int works around a bug in the HP C Compiler
7862# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7863# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7864# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
7866$as_echo_n "checking size of time_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007867if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007868 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007869else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007870 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007871#ifdef HAVE_SYS_TYPES_H
7872#include <sys/types.h>
7873#endif
7874#ifdef HAVE_TIME_H
7875#include <time.h>
7876#endif
7877
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007878"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007879
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007880else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007881 if test "$ac_cv_type_time_t" = yes; then
7882 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7883$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007884as_fn_error 77 "cannot compute sizeof (time_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007885See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007886 else
7887 ac_cv_sizeof_time_t=0
7888 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007889fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007890
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007891fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007892{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
7893$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007894
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007895
7896
Martin v. Löwis11437992002-04-12 09:54:03 +00007897cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007898#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007899_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007900
Michael W. Hudson54241132001-12-07 15:38:26 +00007901
7902
Trent Mick635f6fb2000-08-23 21:33:05 +00007903# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007904ac_save_cc="$CC"
7905if test "$ac_cv_kpthread" = "yes"
7906then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00007907elif test "$ac_cv_kthread" = "yes"
7908then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00007909elif test "$ac_cv_pthread" = "yes"
7910then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007911fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
7913$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007914have_pthread_t=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007915cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007916/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00007917
7918 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007919int
7920main ()
7921{
Guido van Rossum12580492000-09-24 16:47:19 +00007922pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007923 ;
7924 return 0;
7925}
Matthias Klosec511b472010-05-08 11:01:39 +00007926
Martin v. Löwis11437992002-04-12 09:54:03 +00007927_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007928if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00007929 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00007930fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007931rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007932{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
7933$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007934if test "$have_pthread_t" = yes ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007935 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007936# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7937# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7938# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
7940$as_echo_n "checking size of pthread_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007941if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007942 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007943else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007944 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007945#ifdef HAVE_PTHREAD_H
7946#include <pthread.h>
7947#endif
7948
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007949"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007950
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007951else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007952 if test "$ac_cv_type_pthread_t" = yes; then
7953 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7954$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007955as_fn_error 77 "cannot compute sizeof (pthread_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007956See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007957 else
7958 ac_cv_sizeof_pthread_t=0
7959 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00007960fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007961
Trent Mick635f6fb2000-08-23 21:33:05 +00007962fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007963{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
7964$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007965
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007966
7967
Martin v. Löwis11437992002-04-12 09:54:03 +00007968cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007969#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007970_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007971
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007972
Trent Mick635f6fb2000-08-23 21:33:05 +00007973fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007974CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00007975
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-toolbox-glue" >&5
7977$as_echo_n "checking for --enable-toolbox-glue... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007978# Check whether --enable-toolbox-glue was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007979if test "${enable_toolbox_glue+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007980 enableval=$enable_toolbox_glue;
7981fi
Jack Jansene578a632001-08-15 01:27:14 +00007982
7983
7984if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +00007985then
Jack Jansene578a632001-08-15 01:27:14 +00007986 case $ac_sys_system/$ac_sys_release in
7987 Darwin/*)
7988 enable_toolbox_glue="yes";;
7989 *)
7990 enable_toolbox_glue="no";;
7991 esac
7992fi
7993case "$enable_toolbox_glue" in
7994yes)
Jack Jansene578a632001-08-15 01:27:14 +00007995 extra_machdep_objs="Python/mactoolboxglue.o"
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007996 extra_undefs="-u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +00007997
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007998$as_echo "#define USE_TOOLBOX_OBJECT_GLUE 1" >>confdefs.h
Jack Jansene578a632001-08-15 01:27:14 +00007999
8000 ;;
8001*)
Jack Jansene578a632001-08-15 01:27:14 +00008002 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00008003 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00008004 ;;
8005esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008006{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_toolbox_glue" >&5
8007$as_echo "$enable_toolbox_glue" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008008
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008009
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00008010
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008011case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +00008012 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008013 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8014 ;;
8015 Darwin/*)
8016 OTHER_LIBTOOL_OPT=""
8017 ;;
8018esac
8019
8020
Ronald Oussoren25967582009-09-06 10:00:26 +00008021
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008022case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +00008023 Darwin/[01567]\..*)
Ronald Oussoren988117f2006-04-29 11:31:35 +00008024 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8025 if test "${enable_universalsdk}"; then
8026 :
8027 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00008028 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Ronald Oussoren988117f2006-04-29 11:31:35 +00008029 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008030 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008031 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008032 Darwin/*)
Ronald Oussorena55af9a2010-01-17 16:25:57 +00008033 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008034 if test ${gcc_version} '<' 4.0
8035 then
8036 LIBTOOL_CRUFT="-lcc_dynamic"
8037 else
8038 LIBTOOL_CRUFT=""
8039 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008040 if test "$cross_compiling" = yes; then :
Ronald Oussoren23d92532009-09-07 06:12:00 +00008041 ac_osx_32bit=yes
Ronald Oussoren25967582009-09-06 10:00:26 +00008042else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008043 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren25967582009-09-06 10:00:26 +00008044/* end confdefs.h. */
Ronald Oussoren23d92532009-09-07 06:12:00 +00008045
Ronald Oussoren25967582009-09-06 10:00:26 +00008046 #include <unistd.h>
8047 int main(int argc, char*argv[])
8048 {
8049 if (sizeof(long) == 4) {
8050 return 0;
8051 } else {
8052 return 1;
8053 }
Ronald Oussoren84ddd722009-09-08 07:17:10 +00008054 }
Ronald Oussoren23d92532009-09-07 06:12:00 +00008055
Ronald Oussoren25967582009-09-06 10:00:26 +00008056_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008057if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren25967582009-09-06 10:00:26 +00008058 ac_osx_32bit=yes
8059else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008060 ac_osx_32bit=no
Ronald Oussoren25967582009-09-06 10:00:26 +00008061fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008062rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8063 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren25967582009-09-06 10:00:26 +00008064fi
8065
8066
Ronald Oussoren25967582009-09-06 10:00:26 +00008067 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00008068 case `/usr/bin/arch` in
Ronald Oussoren25967582009-09-06 10:00:26 +00008069 i386)
8070 MACOSX_DEFAULT_ARCH="i386"
8071 ;;
8072 ppc)
8073 MACOSX_DEFAULT_ARCH="ppc"
8074 ;;
8075 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008076 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren25967582009-09-06 10:00:26 +00008077 ;;
8078 esac
8079 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00008080 case `/usr/bin/arch` in
Ronald Oussoren25967582009-09-06 10:00:26 +00008081 i386)
8082 MACOSX_DEFAULT_ARCH="x86_64"
8083 ;;
8084 ppc)
8085 MACOSX_DEFAULT_ARCH="ppc64"
8086 ;;
8087 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008088 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren25967582009-09-06 10:00:26 +00008089 ;;
8090 esac
8091
8092 #ARCH_RUN_32BIT="true"
8093 fi
8094
8095 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00008096 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008097 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008098esac
8099
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
8101$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008102if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008103then
Skip Montanarodecc6a42003-01-01 20:07:49 +00008104 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00008105 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008106 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008107
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008108$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008109
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8111$as_echo "yes" >&6; }
Ronald Oussoren450d5612009-06-08 21:12:41 +00008112 if test $enable_shared = "yes"
8113 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008114 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 +00008115 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008116else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8118$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008119fi
8120
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
8122$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008123case $ac_sys_system/$ac_sys_release in
8124 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008125
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008126$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008127
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
8129$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008130 ;;
8131 *)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8133$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008134 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008135esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008136
Guido van Rossum0a516c91994-09-12 10:58:40 +00008137# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008138
Michael W. Hudson54241132001-12-07 15:38:26 +00008139
8140
8141
8142
Ronald Oussoren75912852010-04-08 08:13:31 +00008143
Guido van Rossum0a516c91994-09-12 10:58:40 +00008144# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00008145# -- usually .so, .sl on HP-UX, .dll on Cygwin
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
8147$as_echo_n "checking SO... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008148if test -z "$SO"
8149then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008150 case $ac_sys_system in
Neal Norwitz58e28882006-05-19 07:00:58 +00008151 hp*|HP*)
8152 case `uname -m` in
8153 ia64) SO=.so;;
8154 *) SO=.sl;;
8155 esac
8156 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00008157 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00008158 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008159 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +00008160else
8161 # this might also be a termcap variable, see #610332
8162 echo
8163 echo '====================================================================='
8164 echo '+ +'
8165 echo '+ WARNING: You have set SO in your environment. +'
8166 echo '+ Do you really mean to change the extension for shared libraries? +'
8167 echo '+ Continuing in 10 seconds to let you to ponder. +'
8168 echo '+ +'
8169 echo '====================================================================='
8170 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +00008171fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008172{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
8173$as_echo "$SO" >&6; }
Neal Norwitz58e28882006-05-19 07:00:58 +00008174
Ronald Oussoren79f90492009-01-02 10:44:46 +00008175
Neal Norwitz58e28882006-05-19 07:00:58 +00008176cat >>confdefs.h <<_ACEOF
8177#define SHLIB_EXT "$SO"
8178_ACEOF
8179
Guido van Rossum0a516c91994-09-12 10:58:40 +00008180# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00008181# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008182# (Shared libraries in this instance are shared modules to be loaded into
8183# Python, as opposed to building Python itself as a shared library.)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
8185$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008186if test -z "$LDSHARED"
8187then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008188 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008189 AIX*)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008190 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00008191 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008192 ;;
8193 BeOS*)
8194 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +00008195 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008196 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00008197 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00008198 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008199 SunOS/5*)
Ronald Oussoren75912852010-04-08 08:13:31 +00008200 if test "$GCC" = "yes" ; then
8201 LDSHARED='$(CC) -shared'
8202 LDCXXSHARED='$(CXX) -shared'
8203 else
8204 LDSHARED='$(CC) -G'
8205 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a662000-05-26 12:22:54 +00008206 fi ;;
Thomas Hellerdc96a772008-04-04 10:07:55 +00008207 hp*|HP*)
Ronald Oussoren75912852010-04-08 08:13:31 +00008208 if test "$GCC" = "yes" ; then
8209 LDSHARED='$(CC) -shared'
8210 LDCXXSHARED='$(CXX) -shared'
8211 else
8212 LDSHARED='ld -b'
Thomas Hellerdc96a772008-04-04 10:07:55 +00008213 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +00008214 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +00008215 Darwin/1.3*)
Stefan Krah3a3e2032010-11-28 15:30:05 +00008216 LDSHARED='$(CC) -bundle'
8217 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00008218 if test "$enable_framework" ; then
8219 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008220 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8221 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008222 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008223 else
8224 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00008225 LDSHARED="$LDSHARED -undefined suppress"
Ronald Oussoren75912852010-04-08 08:13:31 +00008226 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00008227 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008228 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Stefan Krah3a3e2032010-11-28 15:30:05 +00008229 LDSHARED='$(CC) -bundle'
8230 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00008231 if test "$enable_framework" ; then
8232 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008233 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8234 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008235 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008236 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00008237 # No framework, use the Python app as bundle-loader
8238 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00008239 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008240 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008241 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008242 Darwin/*)
8243 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
8244 # This allows an extension to be used in any Python
Ronald Oussoren38f1b982007-09-02 09:46:07 +00008245
Ned Deilyc40b9032014-06-25 13:48:46 -07008246 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
8247 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
8248 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
8249 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
8250 if test ${dep_target_major} -eq 10 && \
8251 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00008252 then
Ned Deilyc40b9032014-06-25 13:48:46 -07008253 # building for OS X 10.0 through 10.2
Stefan Krah3a3e2032010-11-28 15:30:05 +00008254 LDSHARED='$(CC) -bundle'
8255 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00008256 if test "$enable_framework" ; then
8257 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008258 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8259 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008260 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008261 else
8262 # No framework, use the Python app as bundle-loader
8263 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
8264 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008265 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008266 fi
Ned Deilyc40b9032014-06-25 13:48:46 -07008267 else
8268 # building for OS X 10.3 and later
8269 if test "${enable_universalsdk}"; then
8270 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
8271 fi
8272 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
8273 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
8274 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00008275 fi
8276 ;;
Ronald Oussoren75912852010-04-08 08:13:31 +00008277 Linux*|GNU*|QNX*)
8278 LDSHARED='$(CC) -shared'
8279 LDCXXSHARED='$(CXX) -shared';;
8280 BSD/OS*/4*)
8281 LDSHARED="gcc -shared"
8282 LDCXXSHARED="g++ -shared";;
Martin v. Löwis222c5152006-06-03 07:37:13 +00008283 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00008284 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00008285 then
Stefan Krah3a3e2032010-11-28 15:30:05 +00008286 LDSHARED='$(CC) -shared'
8287 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00008288 else
Stefan Krah3a3e2032010-11-28 15:30:05 +00008289 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00008290 fi;;
Martin v. Löwis222c5152006-06-03 07:37:13 +00008291 OpenBSD*)
8292 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8293 then
Stefan Krah3a3e2032010-11-28 15:30:05 +00008294 LDSHARED='$(CC) -shared $(CCSHARED)'
8295 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Martin v. Löwis222c5152006-06-03 07:37:13 +00008296 else
8297 case `uname -r` in
8298 [01].* | 2.[0-7] | 2.[0-7].*)
8299 LDSHARED="ld -Bshareable ${LDFLAGS}"
8300 ;;
8301 *)
Stefan Krah3a3e2032010-11-28 15:30:05 +00008302 LDSHARED='$(CC) -shared $(CCSHARED)'
8303 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Martin v. Löwis222c5152006-06-03 07:37:13 +00008304 ;;
8305 esac
8306 fi;;
Ronald Oussoren75912852010-04-08 08:13:31 +00008307 NetBSD*|DragonFly*)
Antoine Pitroucb402772011-01-02 20:51:34 +00008308 LDSHARED='$(CC) -shared'
8309 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008310 OpenUNIX*|UnixWare*)
Ronald Oussoren75912852010-04-08 08:13:31 +00008311 if test "$GCC" = "yes" ; then
8312 LDSHARED='$(CC) -shared'
8313 LDCXXSHARED='$(CXX) -shared'
8314 else
8315 LDSHARED='$(CC) -G'
8316 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00008317 fi;;
Ronald Oussoren75912852010-04-08 08:13:31 +00008318 SCO_SV*)
8319 LDSHARED='$(CC) -Wl,-G,-Bexport'
8320 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
8321 CYGWIN*)
8322 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
8323 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
8324 atheos*)
8325 LDSHARED="gcc -shared"
8326 LDCXXSHARED="g++ -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008327 *) LDSHARED="ld";;
8328 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008329fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008330{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
8331$as_echo "$LDSHARED" >&6; }
Ronald Oussoren75912852010-04-08 08:13:31 +00008332LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008333BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00008334# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008335# library (module) -- this is only needed for a few systems
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
8337$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008338if test -z "$CCSHARED"
8339then
Guido van Rossum07397971997-04-29 21:49:50 +00008340 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008341 SunOS*) if test "$GCC" = yes;
Martin v. Löwiseb623572007-03-12 10:50:39 +00008342 then CCSHARED="-fPIC";
8343 elif test `uname -p` = sparc;
8344 then CCSHARED="-xcode=pic32";
8345 else CCSHARED="-Kpic";
8346 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00008347 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00008348 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00008349 else CCSHARED="+z";
8350 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008351 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008352 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008353 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008354 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008355 if test "$GCC" = "yes"
8356 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008357 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008358 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008359 SCO_SV*)
8360 if test "$GCC" = "yes"
8361 then CCSHARED="-fPIC"
8362 else CCSHARED="-Kpic -belf"
8363 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008364 IRIX*/6*) case $CC in
8365 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00008366 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008367 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008368 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008369 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008370fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008371{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
8372$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008373# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008374# the python executable -- this is only needed for a few systems
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
8376$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008377if test -z "$LINKFORSHARED"
8378then
Guido van Rossum07397971997-04-29 21:49:50 +00008379 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008380 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008381 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00008382 LINKFORSHARED="-Wl,-E -Wl,+s";;
8383# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008384 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008385 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008386 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00008387 Darwin/*)
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008388 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
8389 # which is
Jack Jansene578a632001-08-15 01:27:14 +00008390 # not used by the core itself but which needs to be in the core so
8391 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +00008392 # -prebind is no longer used, because it actually seems to give a
8393 # slowdown in stead of a speedup, maybe due to the large number of
8394 # dynamic loads Python does.
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008395
8396 LINKFORSHARED="$extra_undefs"
Jack Jansene578a632001-08-15 01:27:14 +00008397 if test "$enable_framework"
8398 then
Jack Jansenda49e192005-01-07 13:08:22 +00008399 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008400 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008401 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008402 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008403 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00008404 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008405 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00008406 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8407 then
8408 LINKFORSHARED="-Wl,--export-dynamic"
8409 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008410 SunOS/5*) case $CC in
8411 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00008412 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00008413 then
8414 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008415 fi;;
8416 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00008417 CYGWIN*)
8418 if test $enable_shared = "no"
8419 then
8420 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
8421 fi;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00008422 QNX*)
8423 # -Wl,-E causes the symbols to be added to the dynamic
8424 # symbol table so that they can be found when a module
8425 # is loaded. -N 2048K causes the stack size to be set
8426 # to 2048 kilobytes so that the stack doesn't overflow
8427 # when running test_compile.py.
8428 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008429 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008430fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008431{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
8432$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008433
Michael W. Hudson54241132001-12-07 15:38:26 +00008434
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00008435
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
8437$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008438if test ! "$LIBRARY" = "$LDLIBRARY"
8439then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00008440 case $ac_sys_system in
8441 CYGWIN*)
8442 # Cygwin needs CCSHARED when building extension DLLs
8443 # but not when building the interpreter DLL.
8444 CFLAGSFORSHARED='';;
8445 *)
8446 CFLAGSFORSHARED='$(CCSHARED)'
8447 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008448fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008449{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
8450$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008451
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008452# SHLIBS are libraries (except -lc and -lm) to link to the python shared
8453# library (with --enable-shared).
8454# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008455# symbols, this must be set to $(LIBS) (expanded by make). We do this even
8456# if it is not required, since it creates a dependency of the shared library
8457# to LIBS. This, in turn, means that applications linking the shared libpython
8458# don't need to link LIBS explicitly. The default should be only changed
8459# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008460
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
8462$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008463case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008464 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008465 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008466esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008467{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
8468$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008469
8470
Guido van Rossum627b2d71993-12-24 10:39:16 +00008471# checks for libraries
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
8473$as_echo_n "checking for dlopen in -ldl... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008474if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008475 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008476else
Martin v. Löwis11437992002-04-12 09:54:03 +00008477 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008478LIBS="-ldl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008479cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008480/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008481
Martin v. Löwiseba40652007-08-30 20:10:57 +00008482/* Override any GCC internal prototype to avoid an error.
8483 Use char because int might match the return type of a GCC
8484 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008485#ifdef __cplusplus
8486extern "C"
8487#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008488char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008489int
8490main ()
8491{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008492return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008493 ;
8494 return 0;
8495}
8496_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008497if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008498 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008499else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008500 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008501fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008502rm -f core conftest.err conftest.$ac_objext \
8503 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008504LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008505fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008506{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
8507$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008508if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008509 cat >>confdefs.h <<_ACEOF
8510#define HAVE_LIBDL 1
8511_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008512
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008513 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00008514
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008515fi
8516 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
8518$as_echo_n "checking for shl_load in -ldld... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008519if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008520 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008521else
Martin v. Löwis11437992002-04-12 09:54:03 +00008522 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008523LIBS="-ldld $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008524cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008525/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008526
Martin v. Löwiseba40652007-08-30 20:10:57 +00008527/* Override any GCC internal prototype to avoid an error.
8528 Use char because int might match the return type of a GCC
8529 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008530#ifdef __cplusplus
8531extern "C"
8532#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008533char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008534int
8535main ()
8536{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008537return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008538 ;
8539 return 0;
8540}
8541_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008542if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008543 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008544else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008545 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008546fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008547rm -f core conftest.err conftest.$ac_objext \
8548 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008549LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008550fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008551{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
8552$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008553if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008554 cat >>confdefs.h <<_ACEOF
8555#define HAVE_LIBDLD 1
8556_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008557
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008558 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008559
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008560fi
8561 # Dynamic linking for HP-UX
Victor Stinner7c906672015-01-06 13:53:37 +01008562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for RAND_egd in -lcrypto" >&5
8563$as_echo_n "checking for RAND_egd in -lcrypto... " >&6; }
8564if ${ac_cv_lib_crypto_RAND_egd+:} false; then :
8565 $as_echo_n "(cached) " >&6
8566else
8567 ac_check_lib_save_LIBS=$LIBS
8568LIBS="-lcrypto $LIBS"
8569cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8570/* end confdefs.h. */
8571
8572/* Override any GCC internal prototype to avoid an error.
8573 Use char because int might match the return type of a GCC
8574 builtin and then its argument prototype would still apply. */
8575#ifdef __cplusplus
8576extern "C"
8577#endif
8578char RAND_egd ();
8579int
8580main ()
8581{
8582return RAND_egd ();
8583 ;
8584 return 0;
8585}
8586_ACEOF
8587if ac_fn_c_try_link "$LINENO"; then :
8588 ac_cv_lib_crypto_RAND_egd=yes
8589else
8590 ac_cv_lib_crypto_RAND_egd=no
8591fi
8592rm -f core conftest.err conftest.$ac_objext \
8593 conftest$ac_exeext conftest.$ac_ext
8594LIBS=$ac_check_lib_save_LIBS
8595fi
8596{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_RAND_egd" >&5
8597$as_echo "$ac_cv_lib_crypto_RAND_egd" >&6; }
8598if test "x$ac_cv_lib_crypto_RAND_egd" = xyes; then :
8599
8600$as_echo "#define HAVE_RAND_EGD 1" >>confdefs.h
8601
8602fi
8603
Martin v. Löwis519adae2003-09-20 10:47:47 +00008604
Ronald Oussoren79f90492009-01-02 10:44:46 +00008605# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00008606if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008607 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
8608$as_echo_n "checking for library containing sem_init... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008609if ${ac_cv_search_sem_init+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008610 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008611else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008612 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008613cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008614/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008615
Martin v. Löwiseba40652007-08-30 20:10:57 +00008616/* Override any GCC internal prototype to avoid an error.
8617 Use char because int might match the return type of a GCC
8618 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008619#ifdef __cplusplus
8620extern "C"
8621#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008622char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008623int
8624main ()
8625{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008626return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008627 ;
8628 return 0;
8629}
8630_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00008631for ac_lib in '' pthread rt posix4; do
8632 if test -z "$ac_lib"; then
8633 ac_res="none required"
8634 else
8635 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00008636 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00008637 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008638 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008639 ac_cv_search_sem_init=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00008640fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008641rm -f core conftest.err conftest.$ac_objext \
8642 conftest$ac_exeext
Matthias Klose3cef2a92012-03-14 23:39:33 +01008643 if ${ac_cv_search_sem_init+:} false; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008644 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00008645fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008646done
Matthias Klose3cef2a92012-03-14 23:39:33 +01008647if ${ac_cv_search_sem_init+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008648
Martin v. Löwiseba40652007-08-30 20:10:57 +00008649else
8650 ac_cv_search_sem_init=no
8651fi
8652rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008653LIBS=$ac_func_search_save_LIBS
8654fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008655{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
8656$as_echo "$ac_cv_search_sem_init" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008657ac_res=$ac_cv_search_sem_init
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008658if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008659 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008660
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008661fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00008662 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00008663 # posix4 on Solaris 2.6
8664 # pthread (first!) on Linux
8665fi
8666
Martin v. Löwis19d17342003-06-14 21:03:05 +00008667# check if we need libintl for locale functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
8669$as_echo_n "checking for textdomain in -lintl... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008670if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008671 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00008672else
8673 ac_check_lib_save_LIBS=$LIBS
8674LIBS="-lintl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008675cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008676/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008677
Martin v. Löwiseba40652007-08-30 20:10:57 +00008678/* Override any GCC internal prototype to avoid an error.
8679 Use char because int might match the return type of a GCC
8680 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008681#ifdef __cplusplus
8682extern "C"
8683#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00008684char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008685int
8686main ()
8687{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008688return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008689 ;
8690 return 0;
8691}
8692_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008693if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008694 ac_cv_lib_intl_textdomain=yes
8695else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008696 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00008697fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008698rm -f core conftest.err conftest.$ac_objext \
8699 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00008700LIBS=$ac_check_lib_save_LIBS
8701fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008702{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
8703$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008704if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008705
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008706$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00008707
8708fi
8709
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008710
8711# checks for system dependent C++ extensions support
8712case "$ac_sys_system" in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008713 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
8714$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
8715 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008716/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00008717
Georg Brandl94800df2011-02-25 11:09:02 +00008718 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008719int
8720main ()
8721{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008722loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00008723 ;
8724 return 0;
8725}
Matthias Klosec511b472010-05-08 11:01:39 +00008726
Martin v. Löwis11437992002-04-12 09:54:03 +00008727_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008728if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008729
Matthias Klosec511b472010-05-08 11:01:39 +00008730
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008731$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008732
Matthias Klosec511b472010-05-08 11:01:39 +00008733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008734$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00008735
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008736else
Matthias Klosec511b472010-05-08 11:01:39 +00008737
8738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008739$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00008740
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008741fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008742rm -f core conftest.err conftest.$ac_objext \
8743 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008744 *) ;;
8745esac
8746
Guido van Rossum70c7f481998-03-26 18:44:10 +00008747# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008748# BeOS' sockets are stashed in libnet.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
8750$as_echo_n "checking for t_open in -lnsl... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008751if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008752 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008753else
Martin v. Löwis11437992002-04-12 09:54:03 +00008754 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008755LIBS="-lnsl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008756cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008757/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008758
Martin v. Löwiseba40652007-08-30 20:10:57 +00008759/* Override any GCC internal prototype to avoid an error.
8760 Use char because int might match the return type of a GCC
8761 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008762#ifdef __cplusplus
8763extern "C"
8764#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008765char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008766int
8767main ()
8768{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008769return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008770 ;
8771 return 0;
8772}
8773_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008774if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008775 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008776else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008777 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008778fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008779rm -f core conftest.err conftest.$ac_objext \
8780 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008781LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008782fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008783{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
8784$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008785if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008786 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008787fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00008788 # SVR4
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8790$as_echo_n "checking for socket in -lsocket... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008791if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008792 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008793else
Martin v. Löwis11437992002-04-12 09:54:03 +00008794 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008795LIBS="-lsocket $LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008796cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008797/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008798
Martin v. Löwiseba40652007-08-30 20:10:57 +00008799/* Override any GCC internal prototype to avoid an error.
8800 Use char because int might match the return type of a GCC
8801 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008802#ifdef __cplusplus
8803extern "C"
8804#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008805char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008806int
8807main ()
8808{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008809return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008810 ;
8811 return 0;
8812}
8813_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008814if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008815 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008816else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008817 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008818fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008819rm -f core conftest.err conftest.$ac_objext \
8820 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008821LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008822fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008823{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8824$as_echo "$ac_cv_lib_socket_socket" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008825if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00008826 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00008827fi
8828 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00008829
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +00008830case "$ac_sys_system" in
8831BeOS*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lnet" >&5
8833$as_echo_n "checking for socket in -lnet... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008834if ${ac_cv_lib_net_socket+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008835 $as_echo_n "(cached) " >&6
Guido van Rossumad678af1998-10-02 14:42:15 +00008836else
Martin v. Löwis11437992002-04-12 09:54:03 +00008837 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00008838LIBS="-lnet $LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008839cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008840/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008841
Martin v. Löwiseba40652007-08-30 20:10:57 +00008842/* Override any GCC internal prototype to avoid an error.
8843 Use char because int might match the return type of a GCC
8844 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008845#ifdef __cplusplus
8846extern "C"
8847#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008848char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008849int
8850main ()
8851{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008852return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008853 ;
8854 return 0;
8855}
8856_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008857if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008858 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +00008859else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008860 ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +00008861fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008862rm -f core conftest.err conftest.$ac_objext \
8863 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008864LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00008865fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008866{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_net_socket" >&5
8867$as_echo "$ac_cv_lib_net_socket" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008868if test "x$ac_cv_lib_net_socket" = xyes; then :
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008869 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008870fi
8871 # BeOS
8872;;
8873esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00008874
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
8876$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008877
Martin v. Löwiseba40652007-08-30 20:10:57 +00008878# Check whether --with-libs was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008879if test "${with_libs+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008880 withval=$with_libs;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008881{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8882$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00008883LIBS="$withval $LIBS"
8884
8885else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8887$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008888fi
8889
Guido van Rossum7f43da71994-08-01 12:15:30 +00008890
Benjamin Peterson64e8f6e2014-12-15 00:00:23 -05008891
8892
8893
8894
8895
8896
8897
8898if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
8899 if test -n "$ac_tool_prefix"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008900 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8901set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8903$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008904if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008905 $as_echo_n "(cached) " >&6
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008906else
8907 case $PKG_CONFIG in
8908 [\\/]* | ?:[\\/]*)
8909 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8910 ;;
8911 *)
8912 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8913for as_dir in $PATH
8914do
8915 IFS=$as_save_IFS
8916 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008917 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01008918 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008919 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008920 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008921 break 2
8922 fi
8923done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008924 done
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008925IFS=$as_save_IFS
8926
8927 ;;
8928esac
8929fi
8930PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8931if test -n "$PKG_CONFIG"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8933$as_echo "$PKG_CONFIG" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008934else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8936$as_echo "no" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008937fi
8938
8939
8940fi
8941if test -z "$ac_cv_path_PKG_CONFIG"; then
8942 ac_pt_PKG_CONFIG=$PKG_CONFIG
8943 # Extract the first word of "pkg-config", so it can be a program name with args.
8944set dummy pkg-config; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8946$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008947if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008948 $as_echo_n "(cached) " >&6
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008949else
8950 case $ac_pt_PKG_CONFIG in
8951 [\\/]* | ?:[\\/]*)
8952 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8953 ;;
8954 *)
8955 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8956for as_dir in $PATH
8957do
8958 IFS=$as_save_IFS
8959 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008960 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01008961 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008962 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008963 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008964 break 2
8965 fi
8966done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008967 done
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008968IFS=$as_save_IFS
8969
8970 ;;
8971esac
8972fi
8973ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8974if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
8976$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008977else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8979$as_echo "no" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008980fi
8981
8982 if test "x$ac_pt_PKG_CONFIG" = x; then
8983 PKG_CONFIG=""
8984 else
8985 case $cross_compiling:$ac_tool_warned in
8986yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008987{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8988$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008989ac_tool_warned=yes ;;
8990esac
8991 PKG_CONFIG=$ac_pt_PKG_CONFIG
8992 fi
8993else
8994 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8995fi
8996
Benjamin Peterson64e8f6e2014-12-15 00:00:23 -05008997fi
8998if test -n "$PKG_CONFIG"; then
8999 _pkg_min_version=0.9.0
9000 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
9001$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
9002 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9004$as_echo "yes" >&6; }
9005 else
9006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9007$as_echo "no" >&6; }
9008 PKG_CONFIG=""
9009 fi
9010fi
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009011
9012# Check for use of the system expat library
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
9014$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009015
9016# Check whether --with-system_expat was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009017if test "${with_system_expat+set}" = set; then :
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009018 withval=$with_system_expat;
Benjamin Petersonf2d1b2a2010-10-31 16:53:53 +00009019else
9020 with_system_expat="no"
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009021fi
9022
9023
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009024{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
9025$as_echo "$with_system_expat" >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009026
9027# Check for use of the system libffi library
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
9029$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009030
9031# Check whether --with-system_ffi was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009032if test "${with_system_ffi+set}" = set; then :
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009033 withval=$with_system_ffi;
Benjamin Petersonf2d1b2a2010-10-31 16:53:53 +00009034else
9035 with_system_ffi="no"
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009036fi
9037
9038
9039if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009040 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
9041else
9042 LIBFFI_INCLUDEDIR=""
9043fi
9044
9045
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009046{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
9047$as_echo "$with_system_ffi" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +00009048
Ned Deilya2a9f572013-10-25 00:30:10 -07009049# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
9050
9051
9052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
9053$as_echo_n "checking for --with-tcltk-includes... " >&6; }
9054
9055# Check whether --with-tcltk-includes was given.
9056if test "${with_tcltk_includes+set}" = set; then :
9057 withval=$with_tcltk_includes;
9058else
9059 with_tcltk_includes="default"
9060fi
9061
9062{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
9063$as_echo "$with_tcltk_includes" >&6; }
9064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
9065$as_echo_n "checking for --with-tcltk-libs... " >&6; }
9066
9067# Check whether --with-tcltk-libs was given.
9068if test "${with_tcltk_libs+set}" = set; then :
9069 withval=$with_tcltk_libs;
9070else
9071 with_tcltk_libs="default"
9072fi
9073
9074{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
9075$as_echo "$with_tcltk_libs" >&6; }
9076if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
9077then
9078 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
9079 then
9080 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
9081 fi
9082 TCLTK_INCLUDES=""
9083 TCLTK_LIBS=""
9084else
9085 TCLTK_INCLUDES="$with_tcltk_includes"
9086 TCLTK_LIBS="$with_tcltk_libs"
9087fi
9088
Benjamin Peterson867475c2009-04-29 20:36:25 +00009089# Check for --with-dbmliborder
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
9091$as_echo_n "checking for --with-dbmliborder... " >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +00009092
9093# Check whether --with-dbmliborder was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009094if test "${with_dbmliborder+set}" = set; then :
Benjamin Peterson867475c2009-04-29 20:36:25 +00009095 withval=$with_dbmliborder;
9096if test x$with_dbmliborder = xyes
9097then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009098as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Benjamin Peterson867475c2009-04-29 20:36:25 +00009099else
9100 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
9101 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
9102 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009103 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Benjamin Peterson867475c2009-04-29 20:36:25 +00009104 fi
9105 done
9106fi
9107fi
9108
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009109{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
9110$as_echo "$with_dbmliborder" >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +00009111
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009112# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009113
9114
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
9116$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009117
Martin v. Löwiseba40652007-08-30 20:10:57 +00009118# Check whether --with-signal-module was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009119if test "${with_signal_module+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009120 withval=$with_signal_module;
9121fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009122
9123
9124if test -z "$with_signal_module"
9125then with_signal_module="yes"
9126fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009127{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
9128$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009129
9130if test "${with_signal_module}" = "yes"; then
9131 USE_SIGNAL_MODULE=""
9132 SIGNAL_OBJS=""
9133else
9134 USE_SIGNAL_MODULE="#"
9135 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9136fi
9137
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009138# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009139
Barry Warsawc0d24d82000-06-29 16:12:00 +00009140USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009141
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dec-threads" >&5
9143$as_echo_n "checking for --with-dec-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009144
Guido van Rossumec2f0731997-01-22 20:54:01 +00009145
Martin v. Löwiseba40652007-08-30 20:10:57 +00009146# Check whether --with-dec-threads was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009147if test "${with_dec_threads+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009148 withval=$with_dec_threads;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009149{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9150$as_echo "$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +00009151LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00009152if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00009153 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00009154fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009155else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009156 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9157$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009158fi
9159
Martin v. Löwis11437992002-04-12 09:54:03 +00009160
9161# Templates for things AC_DEFINEd more than once.
9162# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009163
9164
Martin v. Löwis11437992002-04-12 09:54:03 +00009165
9166
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
9168$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009169
Martin v. Löwiseba40652007-08-30 20:10:57 +00009170# Check whether --with-threads was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009171if test "${with_threads+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009172 withval=$with_threads;
9173fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009174
9175
Barry Warsawc0d24d82000-06-29 16:12:00 +00009176# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009177
Martin v. Löwiseba40652007-08-30 20:10:57 +00009178# Check whether --with-thread was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009179if test "${with_thread+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009180 withval=$with_thread; with_threads=$with_thread
9181fi
9182
Barry Warsawc0d24d82000-06-29 16:12:00 +00009183
9184if test -z "$with_threads"
9185then with_threads="yes"
9186fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009187{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
9188$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d82000-06-29 16:12:00 +00009189
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009190
Barry Warsawc0d24d82000-06-29 16:12:00 +00009191if test "$with_threads" = "no"
9192then
9193 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009194elif test "$ac_cv_pthread_is_default" = yes
9195then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009196 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009197
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009198 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009199 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009200
9201 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009202 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009203elif test "$ac_cv_kpthread" = "yes"
9204then
9205 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009206 if test "$ac_cv_cxx_thread" = "yes"; then
9207 CXX="$CXX -Kpthread"
9208 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009209 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009210
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009211 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009212 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009213elif test "$ac_cv_kthread" = "yes"
9214then
9215 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009216 if test "$ac_cv_cxx_thread" = "yes"; then
9217 CXX="$CXX -Kthread"
9218 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009219 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009220
9221 posix_threads=yes
9222 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009223elif test "$ac_cv_pthread" = "yes"
9224then
9225 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009226 if test "$ac_cv_cxx_thread" = "yes"; then
9227 CXX="$CXX -pthread"
9228 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009229 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009230
9231 posix_threads=yes
9232 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009233else
9234 if test ! -z "$with_threads" -a -d "$with_threads"
9235 then LDFLAGS="$LDFLAGS -L$with_threads"
9236 fi
9237 if test ! -z "$withval" -a -d "$withval"
9238 then LDFLAGS="$LDFLAGS -L$withval"
9239 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009240
9241 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00009242 # define _POSIX_THREADS in unistd.h. Some apparently don't
9243 # (e.g. gnu pth with pthread emulation)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009244 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
9245$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
9246 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009247/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009248
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009249#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009250#ifdef _POSIX_THREADS
9251yes
9252#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009253
9254_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009255if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009256 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009257 unistd_defines_pthreads=yes
9258else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009259 unistd_defines_pthreads=no
9260fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009261rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009262
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
9264$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009265
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009266 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009267
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009268 ac_fn_c_check_header_mongrel "$LINENO" "cthreads.h" "ac_cv_header_cthreads_h" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01009269if test "x$ac_cv_header_cthreads_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009270 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00009271
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009272 $as_echo "#define C_THREADS 1" >>confdefs.h
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009273
Martin v. Löwis11437992002-04-12 09:54:03 +00009274
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009275$as_echo "#define HURD_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009276
9277 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009278 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009279else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009280
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009281 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 +01009282if test "x$ac_cv_header_mach_cthreads_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009283 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00009284
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009285 $as_echo "#define C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009286
Martin v. Löwis11437992002-04-12 09:54:03 +00009287
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009288$as_echo "#define MACH_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009289
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009290 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009291else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009292
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009293 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pth" >&5
9294$as_echo_n "checking for --with-pth... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009295
Martin v. Löwiseba40652007-08-30 20:10:57 +00009296# Check whether --with-pth was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009297if test "${with_pth+set}" = set; then :
9298 withval=$with_pth; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9299$as_echo "$withval" >&6; }
9300 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009301
9302
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009303$as_echo "#define HAVE_PTH 1" >>confdefs.h
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009304
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009305 LIBS="-lpth $LIBS"
9306 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009307else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009308 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9309$as_echo "no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009310
9311 # Just looking for pthread_create in libpthread is not enough:
9312 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
9313 # So we really have to include pthread.h, and then link.
9314 _libs=$LIBS
9315 LIBS="$LIBS -lpthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009316 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
9317$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
9318 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009319/* end confdefs.h. */
Stefan Krahae66ca62012-11-22 22:36:57 +01009320
9321#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009322#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00009323
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009324void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00009325int
9326main ()
9327{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009328
9329pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00009330 ;
9331 return 0;
9332}
9333_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009334if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009335
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9337$as_echo "yes" >&6; }
9338 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00009339
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009340 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009341 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009342else
Martin v. Löwis11437992002-04-12 09:54:03 +00009343
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009344 LIBS=$_libs
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009345 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Matthias Klose3cef2a92012-03-14 23:39:33 +01009346if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009347 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00009348
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009349 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009350 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00009351else
Guido van Rossumad678af1998-10-02 14:42:15 +00009352
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009353 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 +01009354if test "x$ac_cv_header_atheos_threads_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009355 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009356
9357
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009358$as_echo "#define ATHEOS_THREADS 1" >>confdefs.h
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009359
9360 THREADOBJ="Python/thread.o"
9361else
9362
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009363 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 +01009364if test "x$ac_cv_header_kernel_OS_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009365 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009366
9367
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009368$as_echo "#define BEOS_THREADS 1" >>confdefs.h
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009369
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009370 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009371else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009372
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009373 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
9374$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009375if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009376 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009377else
Martin v. Löwis11437992002-04-12 09:54:03 +00009378 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009379LIBS="-lpthreads $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009380cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009381/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009382
Martin v. Löwiseba40652007-08-30 20:10:57 +00009383/* Override any GCC internal prototype to avoid an error.
9384 Use char because int might match the return type of a GCC
9385 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009386#ifdef __cplusplus
9387extern "C"
9388#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009389char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009390int
9391main ()
9392{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009393return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009394 ;
9395 return 0;
9396}
9397_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009398if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009399 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00009400else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009401 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00009402fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009403rm -f core conftest.err conftest.$ac_objext \
9404 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009405LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009406fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009407{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
9408$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009409if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009410 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00009411
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009412 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009413 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009414 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00009415else
Greg Steinadf63d62000-07-05 10:38:09 +00009416
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009417 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
9418$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009419if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009420 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00009421else
Martin v. Löwis11437992002-04-12 09:54:03 +00009422 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009423LIBS="-lc_r $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009424cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009425/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009426
Martin v. Löwiseba40652007-08-30 20:10:57 +00009427/* Override any GCC internal prototype to avoid an error.
9428 Use char because int might match the return type of a GCC
9429 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009430#ifdef __cplusplus
9431extern "C"
9432#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009433char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009434int
9435main ()
9436{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009437return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009438 ;
9439 return 0;
9440}
9441_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009442if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009443 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00009444else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009445 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00009446fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009447rm -f core conftest.err conftest.$ac_objext \
9448 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009449LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00009450fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009451{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
9452$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009453if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009454 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00009455
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009456 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009457 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009458 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009459else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009460
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009461 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
9462$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009463if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009464 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009465else
Martin v. Löwis11437992002-04-12 09:54:03 +00009466 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009467LIBS="-lpthread $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009468cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009469/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009470
Martin v. Löwiseba40652007-08-30 20:10:57 +00009471/* Override any GCC internal prototype to avoid an error.
9472 Use char because int might match the return type of a GCC
9473 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009474#ifdef __cplusplus
9475extern "C"
9476#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009477char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009478int
9479main ()
9480{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009481return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009482 ;
9483 return 0;
9484}
9485_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009486if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009487 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009488else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009489 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009490fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009491rm -f core conftest.err conftest.$ac_objext \
9492 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009493LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009494fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009495{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
9496$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009497if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009498 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009499
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009500 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009501 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009502 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009503else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009504
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009505 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
9506$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009507if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009508 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00009509else
Martin v. Löwis11437992002-04-12 09:54:03 +00009510 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009511LIBS="-lcma $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009512cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009513/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009514
Martin v. Löwiseba40652007-08-30 20:10:57 +00009515/* Override any GCC internal prototype to avoid an error.
9516 Use char because int might match the return type of a GCC
9517 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009518#ifdef __cplusplus
9519extern "C"
9520#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009521char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009522int
9523main ()
9524{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009525return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009526 ;
9527 return 0;
9528}
9529_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009530if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009531 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00009532else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009533 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00009534fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009535rm -f core conftest.err conftest.$ac_objext \
9536 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009537LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009538fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009539{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
9540$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009541if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009542 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00009543
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009544 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009545 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009546 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00009547else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00009548
Martin v. Löwis130fb172001-07-19 11:00:41 +00009549 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00009550fi
9551
Guido van Rossum627b2d71993-12-24 10:39:16 +00009552
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009553fi
9554
Guido van Rossum0be3e491997-05-22 20:33:33 +00009555fi
9556
Guido van Rossum49545951997-12-02 19:28:29 +00009557fi
9558
Guido van Rossumb93a8621998-05-07 13:27:32 +00009559fi
9560
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009561
Michael W. Hudson54241132001-12-07 15:38:26 +00009562fi
9563
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009564
9565fi
9566
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009567fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009568rm -f core conftest.err conftest.$ac_objext \
9569 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009570fi
9571
Martin v. Löwis11437992002-04-12 09:54:03 +00009572fi
9573
9574
9575fi
9576
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009577
Michael W. Hudson54241132001-12-07 15:38:26 +00009578
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009579 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
9580$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009581if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009582 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009583else
Martin v. Löwis11437992002-04-12 09:54:03 +00009584 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009585LIBS="-lmpc $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009586cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009587/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009588
Martin v. Löwiseba40652007-08-30 20:10:57 +00009589/* Override any GCC internal prototype to avoid an error.
9590 Use char because int might match the return type of a GCC
9591 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009592#ifdef __cplusplus
9593extern "C"
9594#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009595char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009596int
9597main ()
9598{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009599return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009600 ;
9601 return 0;
9602}
9603_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009604if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009605 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009606else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009607 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009608fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009609rm -f core conftest.err conftest.$ac_objext \
9610 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009611LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009612fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009613{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
9614$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009615if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009616 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009617
Martin v. Löwis130fb172001-07-19 11:00:41 +00009618 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009619 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009620 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009621fi
9622
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009623
Neal Norwitza978ab02002-11-02 16:58:05 +00009624 if test "$posix_threads" != "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009625 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
9626$as_echo_n "checking for thr_create in -lthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009627if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009628 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009629else
Martin v. Löwis11437992002-04-12 09:54:03 +00009630 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009631LIBS="-lthread $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009632cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009633/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009634
Martin v. Löwiseba40652007-08-30 20:10:57 +00009635/* Override any GCC internal prototype to avoid an error.
9636 Use char because int might match the return type of a GCC
9637 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009638#ifdef __cplusplus
9639extern "C"
9640#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009641char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009642int
9643main ()
9644{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009645return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009646 ;
9647 return 0;
9648}
9649_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009650if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009651 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009652else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009653 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009654fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009655rm -f core conftest.err conftest.$ac_objext \
9656 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009657LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009658fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009659{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
9660$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009661if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009662 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009663
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009664 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009665 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009666 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009667fi
9668
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009669 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009670
Martin v. Löwis130fb172001-07-19 11:00:41 +00009671 if test "$USE_THREAD_MODULE" != "#"
9672 then
9673 # If the above checks didn't disable threads, (at least) OSF1
9674 # needs this '-threads' argument during linking.
9675 case $ac_sys_system in
9676 OSF1) LDLAST=-threads;;
9677 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00009678 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009679fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009680
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009681if test "$posix_threads" = "yes"; then
9682 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009683
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009684$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009685
9686 fi
9687
9688 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
9689 case $ac_sys_system/$ac_sys_release in
Charles-François Natali4929eb92011-07-21 19:41:04 +02009690 SunOS/5.6)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009691$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009692
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009693 ;;
9694 SunOS/5.8)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009695$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009696
9697 ;;
Charles-François Natali4929eb92011-07-21 19:41:04 +02009698 AIX/*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009699$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimescba36bb2008-01-30 22:54:18 +00009700
9701 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009702 esac
9703
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009704 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
9705$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009706 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009707 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009708else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009709 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009710 ac_cv_pthread_system_supported=no
9711else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009712 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009713/* end confdefs.h. */
Stefan Krahae66ca62012-11-22 22:36:57 +01009714
9715 #include <stdio.h>
9716 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009717 void *foo(void *parm) {
9718 return NULL;
9719 }
9720 main() {
9721 pthread_attr_t attr;
9722 pthread_t id;
9723 if (pthread_attr_init(&attr)) exit(-1);
9724 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
9725 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
9726 exit(0);
9727 }
9728_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009729if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009730 ac_cv_pthread_system_supported=yes
9731else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009732 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009733fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009734rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9735 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009736fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009737
Martin v. Löwiseba40652007-08-30 20:10:57 +00009738
Guido van Rossum627b2d71993-12-24 10:39:16 +00009739fi
9740
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
9742$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009743 if test "$ac_cv_pthread_system_supported" = "yes"; then
9744
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009745$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009746
9747 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009748 for ac_func in pthread_sigmask
9749do :
9750 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Matthias Klose3cef2a92012-03-14 23:39:33 +01009751if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009752 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009753#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009754_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00009755 case $ac_sys_system in
9756 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009757
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009758$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00009759
9760 ;;
9761 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009762fi
9763done
9764
Christian Heimes0d604cf2013-08-21 13:26:05 +02009765 for ac_func in pthread_atfork
9766do :
9767 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
9768if test "x$ac_cv_func_pthread_atfork" = xyes; then :
9769 cat >>confdefs.h <<_ACEOF
9770#define HAVE_PTHREAD_ATFORK 1
9771_ACEOF
9772
9773fi
9774done
9775
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009776fi
9777
9778
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009779# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00009780
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
9782$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009783# Check whether --enable-ipv6 was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009784if test "${enable_ipv6+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009785 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009786 no)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9788$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009789 ipv6=no
9790 ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009791 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9792$as_echo "yes" >&6; }
9793 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009794
9795 ipv6=yes
9796 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009797 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009798else
Martin v. Löwis11437992002-04-12 09:54:03 +00009799
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009800 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009801/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009802 /* AF_INET6 available check */
9803#include <sys/types.h>
9804#include <sys/socket.h>
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009805int
9806main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009807{
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009808int domain = AF_INET6;
9809 ;
9810 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009811}
Martin v. Löwis11437992002-04-12 09:54:03 +00009812_ACEOF
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009813if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +00009814
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009815 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9816$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009817 ipv6=yes
Matthias Klosec511b472010-05-08 11:01:39 +00009818
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009819else
Matthias Klosec511b472010-05-08 11:01:39 +00009820
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9822$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009823 ipv6=no
Matthias Klosec511b472010-05-08 11:01:39 +00009824
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009825fi
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009826rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009827
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009828if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009829 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
9830$as_echo_n "checking if RFC2553 API is available... " >&6; }
9831 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009832/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00009833
9834 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009835#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009836int
9837main ()
9838{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009839struct sockaddr_in6 x;
Matthias Klosec511b472010-05-08 11:01:39 +00009840 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00009841 ;
9842 return 0;
9843}
Matthias Klosec511b472010-05-08 11:01:39 +00009844
Martin v. Löwis11437992002-04-12 09:54:03 +00009845_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009846if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +00009847
9848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009849$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00009850 ipv6=yes
9851
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009852else
Matthias Klosec511b472010-05-08 11:01:39 +00009853
9854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009855$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00009856 ipv6=no
9857
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009858fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009859rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009860fi
9861
9862if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009863 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009864
9865fi
9866
Martin v. Löwiseba40652007-08-30 20:10:57 +00009867fi
9868
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009869
9870ipv6type=unknown
9871ipv6lib=none
9872ipv6trylibc=no
9873
9874if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009875 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
9876$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00009877 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
9878 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009879 case $i in
9880 inria)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009881 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009882/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009883
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009884#include <netinet/in.h>
9885#ifdef IPV6_INRIA_VERSION
9886yes
9887#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009888_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009889if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009890 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009891 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009892fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009893rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009894
9895 ;;
9896 kame)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009897 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009898/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009899
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009900#include <netinet/in.h>
9901#ifdef __KAME__
9902yes
9903#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009904_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009905if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009906 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009907 ipv6type=$i;
9908 ipv6lib=inet6
9909 ipv6libdir=/usr/local/v6/lib
9910 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009911fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009912rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009913
9914 ;;
9915 linux-glibc)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009916 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009917/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009918
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009919#include <features.h>
9920#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
9921yes
9922#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009923_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009924if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009925 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009926 ipv6type=$i;
9927 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009928fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009929rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009930
9931 ;;
9932 linux-inet6)
9933 if test -d /usr/inet6; then
9934 ipv6type=$i
9935 ipv6lib=inet6
9936 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00009937 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009938 fi
9939 ;;
9940 solaris)
9941 if test -f /etc/netconfig; then
Antoine Pitrou31e85952011-01-03 18:57:14 +00009942 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009943 ipv6type=$i
9944 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009945 fi
9946 fi
9947 ;;
9948 toshiba)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009949 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009950/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009951
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009952#include <sys/param.h>
9953#ifdef _TOSHIBA_INET6
9954yes
9955#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009956_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009957if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009958 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009959 ipv6type=$i;
9960 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009961 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009962fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009963rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009964
9965 ;;
9966 v6d)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009967 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009968/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009969
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009970#include </usr/local/v6/include/sys/v6config.h>
9971#ifdef __V6D__
9972yes
9973#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009974_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009975if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009976 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009977 ipv6type=$i;
9978 ipv6lib=v6;
9979 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009980 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009981fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009982rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009983
9984 ;;
9985 zeta)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009986 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009987/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009988
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009989#include <sys/param.h>
9990#ifdef _ZETA_MINAMI_INET6
9991yes
9992#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009993_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009994if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009995 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009996 ipv6type=$i;
9997 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009998 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009999fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000010000rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010001
10002 ;;
10003 esac
10004 if test "$ipv6type" != "unknown"; then
10005 break
10006 fi
10007 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10009$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010010fi
10011
10012if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10013 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10014 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10015 echo "using lib$ipv6lib"
10016 else
10017 if test $ipv6trylibc = "yes"; then
10018 echo "using libc"
10019 else
10020 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10021 echo "You need to fetch lib$ipv6lib.a from appropriate"
10022 echo 'ipv6 kit and compile beforehand.'
10023 exit 1
10024 fi
10025 fi
10026fi
10027
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
10029$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
10030cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010031/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +000010032
10033 #include <Carbon/Carbon.h>
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010034int
10035main ()
10036{
10037FSIORefNum fRef = 0
10038 ;
10039 return 0;
10040}
Mark Dickinson0712b562010-05-08 19:13:21 +000010041
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010042_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010043if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +000010044
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010045
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010046$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010047
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10049$as_echo "yes" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010050
Mark Dickinson0712b562010-05-08 19:13:21 +000010051else
10052
10053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10054$as_echo "no" >&6; }
10055
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010056fi
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010057rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10058
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010059# Check for --with-doc-strings
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10061$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010062
Martin v. Löwiseba40652007-08-30 20:10:57 +000010063# Check whether --with-doc-strings was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010064if test "${with_doc_strings+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000010065 withval=$with_doc_strings;
10066fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010067
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010068
10069if test -z "$with_doc_strings"
10070then with_doc_strings="yes"
10071fi
10072if test "$with_doc_strings" != "no"
10073then
10074
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010075$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010076
10077fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010078{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10079$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010080
Neil Schemenauera35c6882001-02-27 04:45:05 +000010081# Check for Python-specific malloc support
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
10083$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010084
Martin v. Löwiseba40652007-08-30 20:10:57 +000010085# Check whether --with-tsc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010086if test "${with_tsc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000010087 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010088if test "$withval" != no
10089then
10090
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010091$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010092
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10094$as_echo "yes" >&6; }
10095else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10096$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010097fi
10098else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10100$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010101fi
10102
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010103
10104# Check for Python-specific malloc support
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10106$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010107
Martin v. Löwiseba40652007-08-30 20:10:57 +000010108# Check whether --with-pymalloc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010109if test "${with_pymalloc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000010110 withval=$with_pymalloc;
10111fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010112
Neil Schemenauera35c6882001-02-27 04:45:05 +000010113
Neil Schemenauer16c22972002-03-22 15:34:49 +000010114if test -z "$with_pymalloc"
10115then with_pymalloc="yes"
10116fi
10117if test "$with_pymalloc" != "no"
10118then
Martin v. Löwis11437992002-04-12 09:54:03 +000010119
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010120$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000010121
10122fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010123{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
10124$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000010125
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010126# Check for Valgrind support
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
10128$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010129
10130# Check whether --with-valgrind was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010131if test "${with_valgrind+set}" = set; then :
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010132 withval=$with_valgrind;
10133else
10134 with_valgrind=no
10135fi
10136
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010137{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
10138$as_echo "$with_valgrind" >&6; }
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010139if test "$with_valgrind" != no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010140 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 +010010141if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010142
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010143$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010144
10145else
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010146 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010147
10148fi
10149
10150
10151fi
10152
Barry Warsawef82cd72000-06-30 16:21:01 +000010153# Check for --with-wctype-functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-wctype-functions" >&5
10155$as_echo_n "checking for --with-wctype-functions... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010156
Martin v. Löwiseba40652007-08-30 20:10:57 +000010157# Check whether --with-wctype-functions was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010158if test "${with_wctype_functions+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000010159 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000010160if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000010161then
10162
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010163$as_echo "#define WANT_WCTYPE_FUNCTIONS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010164
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010165 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10166$as_echo "yes" >&6; }
10167else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10168$as_echo "no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000010169fi
10170else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010171 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10172$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010173fi
10174
Barry Warsawef82cd72000-06-30 16:21:01 +000010175
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010176# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000010177
Guido van Rossum98935bf2001-09-05 19:13:16 +000010178DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000010179
Guido van Rossume97ee181999-12-20 21:27:22 +000010180# the dlopen() function means we might want to use dynload_shlib.o. some
10181# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000010182for ac_func in dlopen
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010183do :
10184 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010185if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010186 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010187#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010188_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000010189
Guido van Rossume97ee181999-12-20 21:27:22 +000010190fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010191done
Guido van Rossume97ee181999-12-20 21:27:22 +000010192
Michael W. Hudson54241132001-12-07 15:38:26 +000010193
Guido van Rossume97ee181999-12-20 21:27:22 +000010194# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
10195# loading of modules.
10196
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
10198$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010199if test -z "$DYNLOADFILE"
10200then
10201 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000010202 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
10203 if test "$ac_cv_func_dlopen" = yes
10204 then DYNLOADFILE="dynload_shlib.o"
10205 else DYNLOADFILE="dynload_aix.o"
10206 fi
10207 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000010208 BeOS*) DYNLOADFILE="dynload_beos.o";;
10209 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Anthony Baxter82201742006-04-09 15:07:40 +000010210 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
10211 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010212 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000010213 *)
10214 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
10215 # out any dynamic loading
10216 if test "$ac_cv_func_dlopen" = yes
10217 then DYNLOADFILE="dynload_shlib.o"
10218 else DYNLOADFILE="dynload_stub.o"
10219 fi
10220 ;;
10221 esac
10222fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010223{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
10224$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010225if test "$DYNLOADFILE" != "dynload_stub.o"
10226then
Martin v. Löwis11437992002-04-12 09:54:03 +000010227
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010228$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000010229
10230fi
10231
Neil Schemenauer4e425612001-06-19 15:44:15 +000010232# MACHDEP_OBJS can be set to platform-specific object files needed by Python
10233
Michael W. Hudson54241132001-12-07 15:38:26 +000010234
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010235{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
10236$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010237if test -z "$MACHDEP_OBJS"
10238then
Jack Jansene578a632001-08-15 01:27:14 +000010239 MACHDEP_OBJS=$extra_machdep_objs
10240else
10241 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000010242fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010243{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
10244$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010245
Guido van Rossum627b2d71993-12-24 10:39:16 +000010246# checks for library functions
Martin v. Löwisaef18b12008-03-24 13:31:16 +000010247for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
10248 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
doko@ubuntu.coma50b0de2015-04-13 21:55:59 +020010249 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
10250 getentropy \
Martin v. Löwis50ea4562009-11-27 13:56:01 +000010251 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Benjamin Petersond16e01c2014-02-04 10:20:26 -050010252 initgroups kill killpg lchmod lchown lstat mkfifo mknod mktime mmap \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000010253 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000010254 putenv readlink realpath \
Jesse Noller355b1262009-04-02 00:03:28 +000010255 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
10256 setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000010257 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Martin v. Löwis50ea4562009-11-27 13:56:01 +000010258 setlocale setregid setreuid setresuid setresgid \
10259 setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +000010260 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000010261 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Neal Norwitz05a45592006-03-20 06:30:08 +000010262 truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010263do :
10264 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10265ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010266if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010267 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010268#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010269_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010270
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010271fi
10272done
10273
Michael W. Hudson54241132001-12-07 15:38:26 +000010274
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010275# For some functions, having a definition is not sufficient, since
10276# we want to take their address.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
10278$as_echo_n "checking for chroot... " >&6; }
10279cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010280/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010281#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010282int
10283main ()
10284{
10285void *x=chroot
10286 ;
10287 return 0;
10288}
10289_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010290if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010291
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010292$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010293
Matthias Klosec511b472010-05-08 11:01:39 +000010294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010295$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010296else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10298$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010299
10300fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010301rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
10303$as_echo_n "checking for link... " >&6; }
10304cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010305/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010306#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010307int
10308main ()
10309{
10310void *x=link
10311 ;
10312 return 0;
10313}
10314_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010315if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010316
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010317$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010318
Matthias Klosec511b472010-05-08 11:01:39 +000010319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010320$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010321else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10323$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010324
10325fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010326rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
10328$as_echo_n "checking for symlink... " >&6; }
10329cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010330/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010331#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010332int
10333main ()
10334{
10335void *x=symlink
10336 ;
10337 return 0;
10338}
10339_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010340if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010341
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010342$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010343
Matthias Klosec511b472010-05-08 11:01:39 +000010344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010345$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010346else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10348$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010349
10350fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010351rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
10353$as_echo_n "checking for fchdir... " >&6; }
10354cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010355/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010356#include <unistd.h>
10357int
10358main ()
10359{
10360void *x=fchdir
10361 ;
10362 return 0;
10363}
10364_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010365if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010366
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010367$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010368
Matthias Klosec511b472010-05-08 11:01:39 +000010369 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010370$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010371else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10373$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010374
10375fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010376rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
10378$as_echo_n "checking for fsync... " >&6; }
10379cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010380/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010381#include <unistd.h>
10382int
10383main ()
10384{
10385void *x=fsync
10386 ;
10387 return 0;
10388}
10389_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010390if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010391
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010392$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010393
Matthias Klosec511b472010-05-08 11:01:39 +000010394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010395$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010396else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10398$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010399
10400fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010401rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010402{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
10403$as_echo_n "checking for fdatasync... " >&6; }
10404cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010405/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010406#include <unistd.h>
10407int
10408main ()
10409{
10410void *x=fdatasync
10411 ;
10412 return 0;
10413}
10414_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010415if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010416
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010417$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010418
Matthias Klosec511b472010-05-08 11:01:39 +000010419 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010420$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010421else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10423$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010424
10425fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010426rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010427{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
10428$as_echo_n "checking for epoll... " >&6; }
10429cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010430/* end confdefs.h. */
10431#include <sys/epoll.h>
10432int
10433main ()
10434{
10435void *x=epoll_create
10436 ;
10437 return 0;
10438}
10439_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010440if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010441
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010442$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010443
Matthias Klosec511b472010-05-08 11:01:39 +000010444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010445$as_echo "yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010446else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010447 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10448$as_echo "no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010449
10450fi
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010451rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
10453$as_echo_n "checking for kqueue... " >&6; }
10454cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010455/* end confdefs.h. */
10456
10457#include <sys/types.h>
10458#include <sys/event.h>
10459
10460int
10461main ()
10462{
10463int x=kqueue()
10464 ;
10465 return 0;
10466}
10467_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010468if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010469
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010470$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010471
Matthias Klosec511b472010-05-08 11:01:39 +000010472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010473$as_echo "yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010474else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10476$as_echo "no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010477
10478fi
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010479rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010480# On some systems (eg. FreeBSD 5), we would find a definition of the
10481# functions ctermid_r, setgroups in the library, but no prototype
10482# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
10483# address to avoid compiler warnings and potential miscompilations
10484# because of the missing prototypes.
10485
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
10487$as_echo_n "checking for ctermid_r... " >&6; }
10488cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010489/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010490
Martin v. Löwisd5843682002-11-21 20:41:28 +000010491#include <stdio.h>
10492
Martin v. Löwisd5843682002-11-21 20:41:28 +000010493int
10494main ()
10495{
10496void* p = ctermid_r
10497 ;
10498 return 0;
10499}
10500_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010501if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010502
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010503$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010504
Matthias Klosec511b472010-05-08 11:01:39 +000010505 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010506$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010507else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10509$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010510
10511fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010512rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10513
Antoine Pitroub170f172010-09-10 18:47:36 +000010514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
10515$as_echo_n "checking for flock declaration... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010516if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010517 $as_echo_n "(cached) " >&6
10518else
10519 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010520/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010521#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010522int
10523main ()
10524{
10525void* p = flock
Antoine Pitroub170f172010-09-10 18:47:36 +000010526
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010527 ;
10528 return 0;
10529}
10530_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010531if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010532 ac_cv_flock_decl=yes
10533else
10534 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010535
10536fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010537rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitrou85729812010-09-07 14:55:24 +000010538
Antoine Pitroub170f172010-09-10 18:47:36 +000010539fi
10540{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
10541$as_echo "$ac_cv_flock_decl" >&6; }
10542if test "x${ac_cv_flock_decl}" = xyes; then
10543 for ac_func in flock
10544do :
10545 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010546if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010547 cat >>confdefs.h <<_ACEOF
10548#define HAVE_FLOCK 1
Antoine Pitrou85729812010-09-07 14:55:24 +000010549_ACEOF
Antoine Pitroub170f172010-09-10 18:47:36 +000010550
Antoine Pitrou85729812010-09-07 14:55:24 +000010551else
Antoine Pitroub170f172010-09-10 18:47:36 +000010552 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitrou85729812010-09-07 14:55:24 +000010553$as_echo_n "checking for flock in -lbsd... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010554if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitrou85729812010-09-07 14:55:24 +000010555 $as_echo_n "(cached) " >&6
10556else
10557 ac_check_lib_save_LIBS=$LIBS
10558LIBS="-lbsd $LIBS"
10559cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10560/* end confdefs.h. */
10561
10562/* Override any GCC internal prototype to avoid an error.
10563 Use char because int might match the return type of a GCC
10564 builtin and then its argument prototype would still apply. */
10565#ifdef __cplusplus
10566extern "C"
10567#endif
10568char flock ();
10569int
10570main ()
10571{
10572return flock ();
10573 ;
10574 return 0;
10575}
10576_ACEOF
10577if ac_fn_c_try_link "$LINENO"; then :
10578 ac_cv_lib_bsd_flock=yes
10579else
10580 ac_cv_lib_bsd_flock=no
10581fi
10582rm -f core conftest.err conftest.$ac_objext \
10583 conftest$ac_exeext conftest.$ac_ext
10584LIBS=$ac_check_lib_save_LIBS
10585fi
10586{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
10587$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010588if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010589 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitrou85729812010-09-07 14:55:24 +000010590
10591
10592$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
10593
10594
10595fi
10596
10597
10598fi
Antoine Pitroub170f172010-09-10 18:47:36 +000010599done
10600
Antoine Pitrou85729812010-09-07 14:55:24 +000010601fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010602
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
10604$as_echo_n "checking for getpagesize... " >&6; }
10605cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010606/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010607
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010608#include <unistd.h>
10609
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010610int
10611main ()
10612{
10613void* p = getpagesize
10614 ;
10615 return 0;
10616}
10617_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010618if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010619
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010620$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010621
Matthias Klosec511b472010-05-08 11:01:39 +000010622 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010623$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010624else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010625 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10626$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010627
10628fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010629rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010630
Charles-François Natali93a11752011-11-27 13:01:35 +010010631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
10632$as_echo_n "checking for broken unsetenv... " >&6; }
10633cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10634/* end confdefs.h. */
10635
10636#include <stdlib.h>
10637
10638int
10639main ()
10640{
10641int res = unsetenv("DUMMY")
10642 ;
10643 return 0;
10644}
10645_ACEOF
10646if ac_fn_c_try_compile "$LINENO"; then :
10647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10648$as_echo "no" >&6; }
10649else
10650
10651$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
10652
10653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10654$as_echo "yes" >&6; }
10655
10656fi
10657rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10658
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010659for ac_prog in true
10660do
10661 # Extract the first word of "$ac_prog", so it can be a program name with args.
10662set dummy $ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10664$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010665if ${ac_cv_prog_TRUE+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010666 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010667else
10668 if test -n "$TRUE"; then
10669 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
10670else
10671as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10672for as_dir in $PATH
10673do
10674 IFS=$as_save_IFS
10675 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010676 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +010010677 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010678 ac_cv_prog_TRUE="$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010679 $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 +000010680 break 2
10681 fi
10682done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010683 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000010684IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010685
10686fi
10687fi
10688TRUE=$ac_cv_prog_TRUE
10689if test -n "$TRUE"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
10691$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010692else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10694$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010695fi
10696
Martin v. Löwiseba40652007-08-30 20:10:57 +000010697
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010698 test -n "$TRUE" && break
10699done
10700test -n "$TRUE" || TRUE="/bin/true"
10701
10702
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
10704$as_echo_n "checking for inet_aton in -lc... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010705if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010706 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010707else
10708 ac_check_lib_save_LIBS=$LIBS
10709LIBS="-lc $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010710cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010711/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010712
Martin v. Löwiseba40652007-08-30 20:10:57 +000010713/* Override any GCC internal prototype to avoid an error.
10714 Use char because int might match the return type of a GCC
10715 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010716#ifdef __cplusplus
10717extern "C"
10718#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010719char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010720int
10721main ()
10722{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010723return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010724 ;
10725 return 0;
10726}
10727_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010728if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010729 ac_cv_lib_c_inet_aton=yes
10730else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010731 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010732fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010733rm -f core conftest.err conftest.$ac_objext \
10734 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010735LIBS=$ac_check_lib_save_LIBS
10736fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010737{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
10738$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010739if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010740 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010741else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010742 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
10743$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010744if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010745 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010746else
10747 ac_check_lib_save_LIBS=$LIBS
10748LIBS="-lresolv $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010749cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010750/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010751
Martin v. Löwiseba40652007-08-30 20:10:57 +000010752/* Override any GCC internal prototype to avoid an error.
10753 Use char because int might match the return type of a GCC
10754 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010755#ifdef __cplusplus
10756extern "C"
10757#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010758char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010759int
10760main ()
10761{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010762return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010763 ;
10764 return 0;
10765}
10766_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010767if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010768 ac_cv_lib_resolv_inet_aton=yes
10769else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010770 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010771fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010772rm -f core conftest.err conftest.$ac_objext \
10773 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010774LIBS=$ac_check_lib_save_LIBS
10775fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010776{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
10777$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010778if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010779 cat >>confdefs.h <<_ACEOF
10780#define HAVE_LIBRESOLV 1
10781_ACEOF
10782
10783 LIBS="-lresolv $LIBS"
10784
10785fi
10786
10787
10788fi
10789
10790
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010791# On Tru64, chflags seems to be present, but calling it will
10792# exit Python
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
10794$as_echo_n "checking for chflags... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010795if ${ac_cv_have_chflags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010796 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010797else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010798 if test "$cross_compiling" = yes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010799 ac_cv_have_chflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010800else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010801 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010802/* end confdefs.h. */
Ned Deily43e10542011-06-27 23:41:53 -070010803
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010804#include <sys/stat.h>
10805#include <unistd.h>
10806int main(int argc, char*argv[])
10807{
10808 if(chflags(argv[0], 0) != 0)
10809 return 1;
10810 return 0;
10811}
Ned Deily43e10542011-06-27 23:41:53 -070010812
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010813_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010814if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010815 ac_cv_have_chflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010816else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010817 ac_cv_have_chflags=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010818fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010819rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10820 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000010821fi
10822
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010823
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010824fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010825{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
10826$as_echo "$ac_cv_have_chflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000010827if test "$ac_cv_have_chflags" = cross ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010828 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010829if test "x$ac_cv_func_chflags" = xyes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010830 ac_cv_have_chflags="yes"
10831else
10832 ac_cv_have_chflags="no"
10833fi
10834
10835fi
10836if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010837
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010838$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010839
10840fi
10841
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
10843$as_echo_n "checking for lchflags... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010844if ${ac_cv_have_lchflags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010845 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010846else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010847 if test "$cross_compiling" = yes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010848 ac_cv_have_lchflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010849else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010850 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010851/* end confdefs.h. */
Ned Deily43e10542011-06-27 23:41:53 -070010852
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010853#include <sys/stat.h>
10854#include <unistd.h>
10855int main(int argc, char*argv[])
10856{
10857 if(lchflags(argv[0], 0) != 0)
10858 return 1;
10859 return 0;
10860}
Ned Deily43e10542011-06-27 23:41:53 -070010861
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010862_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010863if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010864 ac_cv_have_lchflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010865else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010866 ac_cv_have_lchflags=no
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010867fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010868rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10869 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010870fi
10871
10872
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010873fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010874{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
10875$as_echo "$ac_cv_have_lchflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000010876if test "$ac_cv_have_lchflags" = cross ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010877 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010878if test "x$ac_cv_func_lchflags" = xyes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010879 ac_cv_have_lchflags="yes"
10880else
10881 ac_cv_have_lchflags="no"
10882fi
10883
10884fi
10885if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010886
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010887$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010888
10889fi
10890
Ronald Oussorenf8752642006-07-06 10:13:35 +000010891case $ac_sys_system/$ac_sys_release in
10892Darwin/*)
10893 _CUR_CFLAGS="${CFLAGS}"
10894 _CUR_LDFLAGS="${LDFLAGS}"
10895 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
10896 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
10897 ;;
10898esac
10899
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
10901$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010902if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010903 $as_echo_n "(cached) " >&6
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010904else
10905 ac_check_lib_save_LIBS=$LIBS
10906LIBS="-lz $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010907cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010908/* end confdefs.h. */
10909
Martin v. Löwiseba40652007-08-30 20:10:57 +000010910/* Override any GCC internal prototype to avoid an error.
10911 Use char because int might match the return type of a GCC
10912 builtin and then its argument prototype would still apply. */
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010913#ifdef __cplusplus
10914extern "C"
10915#endif
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010916char inflateCopy ();
10917int
10918main ()
10919{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010920return inflateCopy ();
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010921 ;
10922 return 0;
10923}
10924_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010925if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010926 ac_cv_lib_z_inflateCopy=yes
10927else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010928 ac_cv_lib_z_inflateCopy=no
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010929fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010930rm -f core conftest.err conftest.$ac_objext \
10931 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010932LIBS=$ac_check_lib_save_LIBS
10933fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010934{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
10935$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010936if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010937
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010938$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010939
10940fi
10941
10942
Ronald Oussorenf8752642006-07-06 10:13:35 +000010943case $ac_sys_system/$ac_sys_release in
10944Darwin/*)
10945 CFLAGS="${_CUR_CFLAGS}"
10946 LDFLAGS="${_CUR_LDFLAGS}"
10947 ;;
10948esac
10949
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
10951$as_echo_n "checking for hstrerror... " >&6; }
10952cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010953/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010954
Martin v. Löwise9416172003-05-03 10:12:45 +000010955#include <netdb.h>
10956
Martin v. Löwise9416172003-05-03 10:12:45 +000010957int
10958main ()
10959{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010960void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010961 ;
10962 return 0;
10963}
10964_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010965if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010966
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010967$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010968
Matthias Klosec511b472010-05-08 11:01:39 +000010969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010970$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010971else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10973$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010974
10975fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010976rm -f core conftest.err conftest.$ac_objext \
10977 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010978
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
10980$as_echo_n "checking for inet_aton... " >&6; }
10981cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010982/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010983
Martin v. Löwis86d66262006-02-17 08:40:11 +000010984#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010985#include <sys/socket.h>
10986#include <netinet/in.h>
10987#include <arpa/inet.h>
10988
Martin v. Löwise9416172003-05-03 10:12:45 +000010989int
10990main ()
10991{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010992void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010993 ;
10994 return 0;
10995}
10996_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010997if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010998
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010999$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011000
Matthias Klosec511b472010-05-08 11:01:39 +000011001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011002$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011003else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11005$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011006
11007fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011008rm -f core conftest.err conftest.$ac_objext \
11009 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011010
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
11012$as_echo_n "checking for inet_pton... " >&6; }
11013cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011014/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011015
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011016#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011017#include <sys/socket.h>
11018#include <netinet/in.h>
11019#include <arpa/inet.h>
11020
Martin v. Löwise9416172003-05-03 10:12:45 +000011021int
11022main ()
11023{
11024void* p = inet_pton
11025 ;
11026 return 0;
11027}
11028_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011029if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011030
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011031$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011032
Matthias Klosec511b472010-05-08 11:01:39 +000011033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011034$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011035else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011036 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11037$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011038
11039fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011040rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000011041
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011042# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
11044$as_echo_n "checking for setgroups... " >&6; }
11045cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011046/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011047
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011048#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011049#ifdef HAVE_GRP_H
11050#include <grp.h>
11051#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000011052
Martin v. Löwisd5843682002-11-21 20:41:28 +000011053int
11054main ()
11055{
11056void* p = setgroups
11057 ;
11058 return 0;
11059}
11060_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011061if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011062
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011063$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011064
Matthias Klosec511b472010-05-08 11:01:39 +000011065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011066$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011067else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11069$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011070
11071fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011072rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000011073
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011074# check for openpty and forkpty
11075
11076for ac_func in openpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011077do :
11078 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011079if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011080 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011081#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011082_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011083
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011084else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011085 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
11086$as_echo_n "checking for openpty in -lutil... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011087if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011088 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011089else
Martin v. Löwis11437992002-04-12 09:54:03 +000011090 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011091LIBS="-lutil $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011092cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011093/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011094
Martin v. Löwiseba40652007-08-30 20:10:57 +000011095/* Override any GCC internal prototype to avoid an error.
11096 Use char because int might match the return type of a GCC
11097 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011098#ifdef __cplusplus
11099extern "C"
11100#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011101char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011102int
11103main ()
11104{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011105return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011106 ;
11107 return 0;
11108}
11109_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011110if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011111 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011112else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011113 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011114fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011115rm -f core conftest.err conftest.$ac_objext \
11116 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011117LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011118fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011119{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
11120$as_echo "$ac_cv_lib_util_openpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011121if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011122 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011123 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011124else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011125 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
11126$as_echo_n "checking for openpty in -lbsd... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011127if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011128 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011129else
11130 ac_check_lib_save_LIBS=$LIBS
11131LIBS="-lbsd $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011132cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011133/* end confdefs.h. */
11134
Martin v. Löwiseba40652007-08-30 20:10:57 +000011135/* Override any GCC internal prototype to avoid an error.
11136 Use char because int might match the return type of a GCC
11137 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011138#ifdef __cplusplus
11139extern "C"
11140#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011141char openpty ();
11142int
11143main ()
11144{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011145return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011146 ;
11147 return 0;
11148}
11149_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011150if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011151 ac_cv_lib_bsd_openpty=yes
11152else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011153 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011154fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011155rm -f core conftest.err conftest.$ac_objext \
11156 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011157LIBS=$ac_check_lib_save_LIBS
11158fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011159{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
11160$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011161if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011162 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011163 LIBS="$LIBS -lbsd"
11164fi
11165
11166
11167fi
11168
Fred Drake8cef4cf2000-06-28 16:40:38 +000011169
11170fi
11171done
11172
11173for ac_func in forkpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011174do :
11175 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011176if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011177 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011178#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011179_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011180
Fred Drake8cef4cf2000-06-28 16:40:38 +000011181else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011182 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
11183$as_echo_n "checking for forkpty in -lutil... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011184if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011185 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011186else
Martin v. Löwis11437992002-04-12 09:54:03 +000011187 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011188LIBS="-lutil $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011189cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011190/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011191
Martin v. Löwiseba40652007-08-30 20:10:57 +000011192/* Override any GCC internal prototype to avoid an error.
11193 Use char because int might match the return type of a GCC
11194 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011195#ifdef __cplusplus
11196extern "C"
11197#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011198char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011199int
11200main ()
11201{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011202return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011203 ;
11204 return 0;
11205}
11206_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011207if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011208 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011209else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011210 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011211fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011212rm -f core conftest.err conftest.$ac_objext \
11213 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011214LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011215fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011216{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
11217$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011218if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011219 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011220 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011221else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011222 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
11223$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011224if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011225 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011226else
11227 ac_check_lib_save_LIBS=$LIBS
11228LIBS="-lbsd $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011229cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011230/* end confdefs.h. */
11231
Martin v. Löwiseba40652007-08-30 20:10:57 +000011232/* Override any GCC internal prototype to avoid an error.
11233 Use char because int might match the return type of a GCC
11234 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011235#ifdef __cplusplus
11236extern "C"
11237#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011238char forkpty ();
11239int
11240main ()
11241{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011242return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011243 ;
11244 return 0;
11245}
11246_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011247if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011248 ac_cv_lib_bsd_forkpty=yes
11249else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011250 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011251fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011252rm -f core conftest.err conftest.$ac_objext \
11253 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011254LIBS=$ac_check_lib_save_LIBS
11255fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011256{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
11257$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011258if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011259 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011260 LIBS="$LIBS -lbsd"
11261fi
11262
11263
11264fi
11265
Fred Drake8cef4cf2000-06-28 16:40:38 +000011266
11267fi
11268done
11269
Jack Jansendd19cf82001-12-06 22:36:17 +000011270
Brett Cannonaa5778d2008-03-18 04:09:00 +000011271# Stuff for expat.
Brett Cannonaa5778d2008-03-18 04:09:00 +000011272for ac_func in memmove
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011273do :
11274 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011275if test "x$ac_cv_func_memmove" = xyes; then :
Brett Cannonaa5778d2008-03-18 04:09:00 +000011276 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011277#define HAVE_MEMMOVE 1
Brett Cannonaa5778d2008-03-18 04:09:00 +000011278_ACEOF
11279
11280fi
11281done
11282
11283
Michael W. Hudson54241132001-12-07 15:38:26 +000011284# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000011285for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011286do :
11287 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11288ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011289if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011290 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011291#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011292_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000011293
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011294fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000011295done
11296
Michael W. Hudson54241132001-12-07 15:38:26 +000011297
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011298ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011299if test "x$ac_cv_func_dup2" = xyes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011300 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000011301
Martin v. Löwis1142de32002-03-29 16:28:31 +000011302else
Martin v. Löwiseba40652007-08-30 20:10:57 +000011303 case " $LIBOBJS " in
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011304 *" dup2.$ac_objext "* ) ;;
11305 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Martin v. Löwiseba40652007-08-30 20:10:57 +000011306 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011307esac
11308
Martin v. Löwis1142de32002-03-29 16:28:31 +000011309fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011310
11311ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011312if test "x$ac_cv_func_getcwd" = xyes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011313 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
11314
11315else
11316 case " $LIBOBJS " in
11317 *" getcwd.$ac_objext "* ) ;;
11318 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
11319 ;;
11320esac
11321
11322fi
11323
11324ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011325if test "x$ac_cv_func_strdup" = xyes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011326 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
11327
11328else
11329 case " $LIBOBJS " in
11330 *" strdup.$ac_objext "* ) ;;
11331 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
11332 ;;
11333esac
11334
11335fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000011336
11337
11338for ac_func in getpgrp
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011339do :
11340 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011341if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011342 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011343#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011344_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011345 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011346/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011347#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011348int
11349main ()
11350{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011351getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011352 ;
11353 return 0;
11354}
11355_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011356if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011357
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011358$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011359
Guido van Rossum627b2d71993-12-24 10:39:16 +000011360fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011361rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011362
Guido van Rossum627b2d71993-12-24 10:39:16 +000011363fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011364done
Guido van Rossum627b2d71993-12-24 10:39:16 +000011365
Jack Jansen150753c2003-03-29 22:07:47 +000011366for ac_func in setpgrp
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011367do :
11368 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011369if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000011370 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011371#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000011372_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011373 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011374/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000011375#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000011376int
11377main ()
11378{
11379setpgrp(0,0);
11380 ;
11381 return 0;
11382}
11383_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011384if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011385
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011386$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011387
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011388fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011389rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000011390
11391fi
11392done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011393
Thomas Wouters3a584202000-08-05 23:28:51 +000011394for ac_func in gettimeofday
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011395do :
11396 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011397if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011398 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011399#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011400_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011401 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011402/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011403#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011404int
11405main ()
11406{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011407gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011408 ;
11409 return 0;
11410}
11411_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011412if ac_fn_c_try_compile "$LINENO"; then :
11413
Guido van Rossum627b2d71993-12-24 10:39:16 +000011414else
Skip Montanaro6dead952003-09-25 14:50:04 +000011415
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011416$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011417
Martin v. Löwis11437992002-04-12 09:54:03 +000011418
Guido van Rossum627b2d71993-12-24 10:39:16 +000011419fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011420rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011421
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011422fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011423done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011424
Michael W. Hudson54241132001-12-07 15:38:26 +000011425
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011426{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
11427$as_echo_n "checking for major... " >&6; }
11428cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011429/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011430
Neal Norwitz6eb37f02003-02-23 23:28:15 +000011431#if defined(MAJOR_IN_MKDEV)
11432#include <sys/mkdev.h>
11433#elif defined(MAJOR_IN_SYSMACROS)
11434#include <sys/sysmacros.h>
11435#else
11436#include <sys/types.h>
11437#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011438
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011439int
11440main ()
11441{
11442
11443 makedev(major(0),minor(0));
11444
11445 ;
11446 return 0;
11447}
11448_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011449if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011450
11451
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011452$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011453
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011454 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11455$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011456
11457else
Skip Montanaro6dead952003-09-25 14:50:04 +000011458
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11460$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011461
11462fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011463rm -f core conftest.err conftest.$ac_objext \
11464 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011465
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011466# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000011467# for [no]getaddrinfo in netdb.h.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
11469$as_echo_n "checking for getaddrinfo... " >&6; }
11470cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011471/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011472
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011473#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011474#include <sys/socket.h>
11475#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011476#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011477
Martin v. Löwis11437992002-04-12 09:54:03 +000011478int
11479main ()
11480{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011481getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000011482 ;
11483 return 0;
11484}
11485_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011486if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011487 have_getaddrinfo=yes
11488else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011489 have_getaddrinfo=no
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011490fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011491rm -f core conftest.err conftest.$ac_objext \
11492 conftest$ac_exeext conftest.$ac_ext
11493{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
11494$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011495if test $have_getaddrinfo = yes
11496then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011497 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
11498$as_echo_n "checking getaddrinfo bug... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011499 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011500 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011501else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011502 if test "$cross_compiling" = yes; then :
doko@python.orgd65e2ba2013-01-31 23:52:03 +010011503
11504if test "${enable_ipv6+set}" = set; then
11505 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
11506else
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011507 ac_cv_buggy_getaddrinfo=yes
doko@python.orgd65e2ba2013-01-31 23:52:03 +010011508fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011509else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011510 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011511/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011512
Stefan Krah0afe4e42012-11-22 23:56:51 +010011513#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011514#include <sys/types.h>
11515#include <netdb.h>
11516#include <string.h>
11517#include <sys/socket.h>
11518#include <netinet/in.h>
11519
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011520int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011521{
11522 int passive, gaierr, inet4 = 0, inet6 = 0;
11523 struct addrinfo hints, *ai, *aitop;
11524 char straddr[INET6_ADDRSTRLEN], strport[16];
11525
11526 for (passive = 0; passive <= 1; passive++) {
11527 memset(&hints, 0, sizeof(hints));
11528 hints.ai_family = AF_UNSPEC;
11529 hints.ai_flags = passive ? AI_PASSIVE : 0;
11530 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000011531 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011532 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
11533 (void)gai_strerror(gaierr);
11534 goto bad;
11535 }
11536 for (ai = aitop; ai; ai = ai->ai_next) {
11537 if (ai->ai_addr == NULL ||
11538 ai->ai_addrlen == 0 ||
11539 getnameinfo(ai->ai_addr, ai->ai_addrlen,
11540 straddr, sizeof(straddr), strport, sizeof(strport),
11541 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
11542 goto bad;
11543 }
11544 switch (ai->ai_family) {
11545 case AF_INET:
11546 if (strcmp(strport, "54321") != 0) {
11547 goto bad;
11548 }
11549 if (passive) {
11550 if (strcmp(straddr, "0.0.0.0") != 0) {
11551 goto bad;
11552 }
11553 } else {
11554 if (strcmp(straddr, "127.0.0.1") != 0) {
11555 goto bad;
11556 }
11557 }
11558 inet4++;
11559 break;
11560 case AF_INET6:
11561 if (strcmp(strport, "54321") != 0) {
11562 goto bad;
11563 }
11564 if (passive) {
11565 if (strcmp(straddr, "::") != 0) {
11566 goto bad;
11567 }
11568 } else {
11569 if (strcmp(straddr, "::1") != 0) {
11570 goto bad;
11571 }
11572 }
11573 inet6++;
11574 break;
11575 case AF_UNSPEC:
11576 goto bad;
11577 break;
11578 default:
11579 /* another family support? */
11580 break;
11581 }
11582 }
11583 }
11584
11585 if (!(inet4 == 0 || inet4 == 2))
11586 goto bad;
11587 if (!(inet6 == 0 || inet6 == 2))
11588 goto bad;
11589
11590 if (aitop)
11591 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011592 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011593
11594 bad:
11595 if (aitop)
11596 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011597 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011598}
11599
Martin v. Löwis11437992002-04-12 09:54:03 +000011600_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011601if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011602 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011603else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011604 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011605fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011606rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11607 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011608fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011609
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011610fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011611
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011612fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011613
Benjamin Peterson75fed812010-11-01 01:47:19 +000011614{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
11615$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
11616
Mark Dickinson0ef0b912009-12-31 21:11:48 +000011617if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011618then
11619 if test $ipv6 = yes
11620 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011621 echo 'Fatal: You must get working getaddrinfo() function.'
11622 echo ' or you can specify "--disable-ipv6"'.
11623 exit 1
11624 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011625else
Martin v. Löwis11437992002-04-12 09:54:03 +000011626
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011627$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011628
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011629fi
Benjamin Peterson75fed812010-11-01 01:47:19 +000011630
Jack Jansen9a66b6d2001-08-08 13:56:14 +000011631for ac_func in getnameinfo
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011632do :
11633 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011634if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011635 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011636#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011637_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011638
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011639fi
11640done
11641
Michael W. Hudson54241132001-12-07 15:38:26 +000011642
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011643# checks for structures
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
11645$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011646if ${ac_cv_header_time+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011647 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011648else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011649 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011650/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011651#include <sys/types.h>
11652#include <sys/time.h>
11653#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011654
Martin v. Löwis11437992002-04-12 09:54:03 +000011655int
11656main ()
11657{
11658if ((struct tm *) 0)
11659return 0;
11660 ;
11661 return 0;
11662}
11663_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011664if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011665 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011666else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011667 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011668fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011669rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011670fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011671{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
11672$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011673if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011674
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011675$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011676
11677fi
11678
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
11680$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011681if ${ac_cv_struct_tm+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011682 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011683else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011684 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011685/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011686#include <sys/types.h>
11687#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011688
Martin v. Löwis11437992002-04-12 09:54:03 +000011689int
11690main ()
11691{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011692struct tm tm;
11693 int *p = &tm.tm_sec;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011694 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000011695 ;
11696 return 0;
11697}
11698_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011699if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011700 ac_cv_struct_tm=time.h
11701else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011702 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011703fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011704rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011705fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011706{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
11707$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011708if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011709
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011710$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011711
11712fi
11713
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011714ac_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 +000011715#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000011716
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011717"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011718if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011719
11720cat >>confdefs.h <<_ACEOF
11721#define HAVE_STRUCT_TM_TM_ZONE 1
11722_ACEOF
11723
11724
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011725fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011726
Martin v. Löwis11437992002-04-12 09:54:03 +000011727if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
11728
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011729$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011730
11731else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011732 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
11733"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011734if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011735 ac_have_decl=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000011736else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011737 ac_have_decl=0
Martin v. Löwiseba40652007-08-30 20:10:57 +000011738fi
11739
Martin v. Löwiseba40652007-08-30 20:10:57 +000011740cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011741#define HAVE_DECL_TZNAME $ac_have_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +000011742_ACEOF
11743
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011744 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
11745$as_echo_n "checking for tzname... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011746if ${ac_cv_var_tzname+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011747 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000011748else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011749 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011750/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011751#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000011752#if !HAVE_DECL_TZNAME
11753extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000011754#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011755
Martin v. Löwis11437992002-04-12 09:54:03 +000011756int
11757main ()
11758{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011759return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000011760 ;
11761 return 0;
11762}
11763_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011764if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011765 ac_cv_var_tzname=yes
11766else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011767 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011768fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011769rm -f core conftest.err conftest.$ac_objext \
11770 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000011771fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011772{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
11773$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011774 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011775
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011776$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011777
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011778 fi
11779fi
11780
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011781ac_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 +010011782if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011783
11784cat >>confdefs.h <<_ACEOF
11785#define HAVE_STRUCT_STAT_ST_RDEV 1
11786_ACEOF
11787
11788
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011789fi
11790
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011791ac_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 +010011792if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011793
Martin v. Löwis11437992002-04-12 09:54:03 +000011794cat >>confdefs.h <<_ACEOF
11795#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
11796_ACEOF
11797
11798
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011799fi
11800
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011801ac_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 +010011802if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000011803
11804cat >>confdefs.h <<_ACEOF
11805#define HAVE_STRUCT_STAT_ST_FLAGS 1
11806_ACEOF
11807
11808
11809fi
11810
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011811ac_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 +010011812if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011813
11814cat >>confdefs.h <<_ACEOF
11815#define HAVE_STRUCT_STAT_ST_GEN 1
11816_ACEOF
11817
11818
11819fi
11820
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011821ac_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 +010011822if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011823
11824cat >>confdefs.h <<_ACEOF
11825#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
11826_ACEOF
11827
11828
11829fi
11830
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011831ac_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 +010011832if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011833
Martin v. Löwis11437992002-04-12 09:54:03 +000011834cat >>confdefs.h <<_ACEOF
11835#define HAVE_STRUCT_STAT_ST_BLOCKS 1
11836_ACEOF
11837
11838
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011839$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011840
11841else
Martin v. Löwiseba40652007-08-30 20:10:57 +000011842 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000011843 *" fileblocks.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011844 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
11845 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011846esac
11847
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011848fi
11849
Michael W. Hudson54241132001-12-07 15:38:26 +000011850
Martin v. Löwis11437992002-04-12 09:54:03 +000011851
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
11853$as_echo_n "checking for time.h that defines altzone... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011854if ${ac_cv_header_time_altzone+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011855 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011856else
Matthias Klosec511b472010-05-08 11:01:39 +000011857
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011858 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011859/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011860#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011861int
11862main ()
11863{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011864return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000011865 ;
11866 return 0;
11867}
11868_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011869if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011870 ac_cv_header_time_altzone=yes
11871else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011872 ac_cv_header_time_altzone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011873fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011874rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosec511b472010-05-08 11:01:39 +000011875
Martin v. Löwiseba40652007-08-30 20:10:57 +000011876fi
11877
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011878{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
11879$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011880if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011881
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011882$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011883
11884fi
11885
Guido van Rossumda88dad1995-01-26 00:46:29 +000011886was_it_defined=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
11888$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
11889cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011890/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011891
11892#include <sys/types.h>
11893#include <sys/select.h>
11894#include <sys/time.h>
11895
Martin v. Löwis11437992002-04-12 09:54:03 +000011896int
11897main ()
11898{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011899;
Martin v. Löwis11437992002-04-12 09:54:03 +000011900 ;
11901 return 0;
11902}
11903_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011904if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011905
11906
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011907$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011908
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011909 was_it_defined=yes
11910
Martin v. Löwiseba40652007-08-30 20:10:57 +000011911fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011912rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011913{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
11914$as_echo "$was_it_defined" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011915
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
11917$as_echo_n "checking for addrinfo... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011918if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011919 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011920else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011921 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011922/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +000011923#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011924int
11925main ()
11926{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011927struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000011928 ;
11929 return 0;
11930}
11931_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011932if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011933 ac_cv_struct_addrinfo=yes
11934else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011935 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011936fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011937rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11938fi
11939
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011940{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
11941$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011942if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011943
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011944$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011945
11946fi
11947
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
11949$as_echo_n "checking for sockaddr_storage... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011950if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011951 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011952else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011953 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011954/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011955
11956# include <sys/types.h>
11957# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011958int
11959main ()
11960{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011961struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000011962 ;
11963 return 0;
11964}
11965_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011966if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011967 ac_cv_struct_sockaddr_storage=yes
11968else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011969 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011970fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011971rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11972fi
11973
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011974{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
11975$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011976if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011977
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011978$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011979
11980fi
11981
Guido van Rossum627b2d71993-12-24 10:39:16 +000011982# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000011983
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
11985$as_echo_n "checking whether char is unsigned... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011986if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011987 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000011988else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011989 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011990/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011991$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000011992int
11993main ()
11994{
11995static int test_array [1 - 2 * !(((char) -1) < 0)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +010011996test_array [0] = 0;
11997return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000011998
11999 ;
12000 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000012001}
Martin v. Löwis11437992002-04-12 09:54:03 +000012002_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012003if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012004 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012005else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012006 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012007fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012008rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012009fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012010{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
12011$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012012if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012013 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012014
12015fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000012016
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12018$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012019if ${ac_cv_c_const+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012020 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012021else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012022 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012023/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012024
Martin v. Löwis11437992002-04-12 09:54:03 +000012025int
12026main ()
12027{
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012028
Martin v. Löwis11437992002-04-12 09:54:03 +000012029#ifndef __cplusplus
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012030 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012031 typedef int charset[2];
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012032 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000012033 /* SunOS 4.1.1 cc rejects this. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000012034 char const *const *pcpcc;
12035 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000012036 /* NEC SVR4.0.2 mips cc rejects this. */
12037 struct point {int x, y;};
12038 static struct point const zero = {0,0};
12039 /* AIX XL C 1.02.0.0 rejects this.
12040 It does not let you subtract one const X* pointer from another in
12041 an arm of an if-expression whose if-part is not a constant
12042 expression */
12043 const char *g = "string";
Martin v. Löwiseba40652007-08-30 20:10:57 +000012044 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012045 /* HPUX 7.0 cc rejects these. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000012046 ++pcpcc;
12047 ppc = (char**) pcpcc;
12048 pcpcc = (char const *const *) ppc;
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012049 { /* SCO 3.2v4 cc rejects this sort of thing. */
12050 char tx;
12051 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000012052 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012053
Martin v. Löwis11437992002-04-12 09:54:03 +000012054 *t++ = 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012055 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012056 }
12057 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12058 int x[] = {25, 17};
12059 const int *foo = &x[0];
12060 ++foo;
12061 }
12062 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12063 typedef const int *iptr;
12064 iptr p = 0;
12065 ++p;
12066 }
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012067 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000012068 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012069 struct s { int j; const int *ap[3]; } bx;
12070 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000012071 }
12072 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12073 const int foo = 10;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012074 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012075 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012076 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000012077#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000012078
Martin v. Löwis11437992002-04-12 09:54:03 +000012079 ;
12080 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012081}
Martin v. Löwis11437992002-04-12 09:54:03 +000012082_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012083if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012084 ac_cv_c_const=yes
12085else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012086 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012087fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012088rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012089fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012090{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12091$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012092if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012093
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012094$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012095
12096fi
12097
Michael W. Hudson54241132001-12-07 15:38:26 +000012098
Guido van Rossumda88dad1995-01-26 00:46:29 +000012099works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
12101$as_echo_n "checking for working volatile... " >&6; }
12102cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012103/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012104
Martin v. Löwis11437992002-04-12 09:54:03 +000012105int
12106main ()
12107{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012108volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012109 ;
12110 return 0;
12111}
12112_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012113if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012114 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012115else
Skip Montanaro6dead952003-09-25 14:50:04 +000012116
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012117$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012118
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012119
Guido van Rossum627b2d71993-12-24 10:39:16 +000012120fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012121rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012122{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12123$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012124
Guido van Rossumda88dad1995-01-26 00:46:29 +000012125works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
12127$as_echo_n "checking for working signed char... " >&6; }
12128cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012129/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012130
Martin v. Löwis11437992002-04-12 09:54:03 +000012131int
12132main ()
12133{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012134signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000012135 ;
12136 return 0;
12137}
12138_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012139if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012140 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012141else
Skip Montanaro6dead952003-09-25 14:50:04 +000012142
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012143$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000012144
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012145
Guido van Rossum7f43da71994-08-01 12:15:30 +000012146fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012147rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012148{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12149$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012150
Guido van Rossumda88dad1995-01-26 00:46:29 +000012151have_prototypes=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
12153$as_echo_n "checking for prototypes... " >&6; }
12154cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012155/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012156int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012157int
12158main ()
12159{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012160return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000012161 ;
12162 return 0;
12163}
12164_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012165if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012166
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012167$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012168
Matthias Klosec511b472010-05-08 11:01:39 +000012169 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012170fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012171rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012172{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
12173$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012174
Guido van Rossumda88dad1995-01-26 00:46:29 +000012175works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
12177$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
12178cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012179/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012180
12181#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000012182int foo(int x, ...) {
12183 va_list va;
12184 va_start(va, x);
12185 va_arg(va, int);
12186 va_arg(va, char *);
12187 va_arg(va, double);
12188 return 0;
12189}
Guido van Rossum7f43da71994-08-01 12:15:30 +000012190
Martin v. Löwis11437992002-04-12 09:54:03 +000012191int
12192main ()
12193{
Guido van Rossum90eea071996-08-30 20:58:57 +000012194return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000012195 ;
12196 return 0;
12197}
12198_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012199if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012200
12201
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012202$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012203
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012204 works=yes
12205
Guido van Rossum627b2d71993-12-24 10:39:16 +000012206fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012207rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012208{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12209$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012210
Martin v. Löwisd6320502004-08-12 13:45:08 +000012211# check for socketpair
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
12213$as_echo_n "checking for socketpair... " >&6; }
12214cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012215/* end confdefs.h. */
12216
12217#include <sys/types.h>
12218#include <sys/socket.h>
12219
12220int
12221main ()
12222{
12223void *x=socketpair
12224 ;
12225 return 0;
12226}
12227_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012228if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000012229
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012230$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000012231
Matthias Klosec511b472010-05-08 11:01:39 +000012232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012233$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012234else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12236$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012237
12238fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012239rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012240
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012241# check if sockaddr has sa_len member
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
12243$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
12244cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012245/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012246#include <sys/types.h>
12247#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012248int
12249main ()
12250{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012251struct sockaddr x;
12252x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012253 ;
12254 return 0;
12255}
12256_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012257if ac_fn_c_try_compile "$LINENO"; then :
12258 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12259$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012260
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012261$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012262
12263else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012264 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12265$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000012266
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012267fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012268rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012269
Guido van Rossumda88dad1995-01-26 00:46:29 +000012270va_list_is_array=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012271{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
12272$as_echo_n "checking whether va_list is an array... " >&6; }
12273cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012274/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012275
12276#ifdef HAVE_STDARG_PROTOTYPES
12277#include <stdarg.h>
12278#else
12279#include <varargs.h>
12280#endif
12281
Martin v. Löwis11437992002-04-12 09:54:03 +000012282int
12283main ()
12284{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012285va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000012286 ;
12287 return 0;
12288}
12289_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012290if ac_fn_c_try_compile "$LINENO"; then :
12291
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012292else
Skip Montanaro6dead952003-09-25 14:50:04 +000012293
Martin v. Löwis11437992002-04-12 09:54:03 +000012294
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012295$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012296
Guido van Rossumda88dad1995-01-26 00:46:29 +000012297 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012298
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012299fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012300rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012301{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
12302$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012303
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012304# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000012305
12306
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012307ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012308if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012309
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012310 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000012311
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012312 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
12313$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012314 OLD_CFLAGS=$CFLAGS
12315 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012316 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012317/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012318
12319# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012320
Martin v. Löwis11437992002-04-12 09:54:03 +000012321int
12322main ()
12323{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012324
12325 char *name;
12326 struct hostent *he, *res;
12327 char buffer[2048];
12328 int buflen = 2048;
12329 int h_errnop;
12330
12331 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012332
12333 ;
12334 return 0;
12335}
12336_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012337if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012338
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012339 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012340
Martin v. Löwis11437992002-04-12 09:54:03 +000012341
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012342$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012343
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12345$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012346
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012347else
Skip Montanaro6dead952003-09-25 14:50:04 +000012348
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12350$as_echo "no" >&6; }
12351 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
12352$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
12353 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012354/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012355
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012356# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012357
Martin v. Löwis11437992002-04-12 09:54:03 +000012358int
12359main ()
12360{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012361
12362 char *name;
12363 struct hostent *he;
Matthias Klosec511b472010-05-08 11:01:39 +000012364 char buffer[2048];
12365 int buflen = 2048;
12366 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012367
Matthias Klosec511b472010-05-08 11:01:39 +000012368 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012369
12370 ;
12371 return 0;
12372}
12373_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012374if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012375
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012376 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012377
Martin v. Löwis11437992002-04-12 09:54:03 +000012378
Matthias Klosec511b472010-05-08 11:01:39 +000012379$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012380
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12382$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012383
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012384else
Skip Montanaro6dead952003-09-25 14:50:04 +000012385
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12387$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000012388 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
12389$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
12390 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12391/* end confdefs.h. */
12392
12393# include <netdb.h>
12394
12395int
12396main ()
12397{
12398
12399 char *name;
12400 struct hostent *he;
12401 struct hostent_data data;
12402
12403 (void) gethostbyname_r(name, he, &data);
12404
12405 ;
12406 return 0;
12407}
12408_ACEOF
12409if ac_fn_c_try_compile "$LINENO"; then :
12410
12411 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
12412
12413
12414$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
12415
12416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12417$as_echo "yes" >&6; }
12418
12419else
12420
12421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12422$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012423
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012424fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012425rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012426
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012427fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012428rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012429
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012430fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012431rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012432 CFLAGS=$OLD_CFLAGS
12433
12434else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012435
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012436 for ac_func in gethostbyname
12437do :
12438 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012439if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012440 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012441#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012442_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012443
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012444fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012445done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012446
Michael W. Hudson54241132001-12-07 15:38:26 +000012447
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012448fi
12449
Michael W. Hudson54241132001-12-07 15:38:26 +000012450
12451
12452
12453
12454
12455
Guido van Rossum627b2d71993-12-24 10:39:16 +000012456# checks for system services
12457# (none yet)
12458
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012459# Linux requires this for correct f.p. operations
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012460ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012461if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012462
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012463else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012464 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
12465$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012466if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012467 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012468else
Martin v. Löwis11437992002-04-12 09:54:03 +000012469 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012470LIBS="-lieee $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012471cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012472/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012473
Martin v. Löwiseba40652007-08-30 20:10:57 +000012474/* Override any GCC internal prototype to avoid an error.
12475 Use char because int might match the return type of a GCC
12476 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012477#ifdef __cplusplus
12478extern "C"
12479#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012480char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012481int
12482main ()
12483{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012484return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012485 ;
12486 return 0;
12487}
12488_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012489if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012490 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012491else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012492 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012493fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012494rm -f core conftest.err conftest.$ac_objext \
12495 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012496LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012497fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012498{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
12499$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012500if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012501 cat >>confdefs.h <<_ACEOF
12502#define HAVE_LIBIEEE 1
12503_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012504
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012505 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012506
Guido van Rossum627b2d71993-12-24 10:39:16 +000012507fi
12508
Michael W. Hudson54241132001-12-07 15:38:26 +000012509
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012510fi
12511
Michael W. Hudson54241132001-12-07 15:38:26 +000012512
Guido van Rossum7f253911997-05-09 02:42:48 +000012513# Check for --with-fpectl
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
12515$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012516
Martin v. Löwiseba40652007-08-30 20:10:57 +000012517# Check whether --with-fpectl was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012518if test "${with_fpectl+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000012519 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000012520if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000012521then
12522
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012523$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012524
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12526$as_echo "yes" >&6; }
12527else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12528$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012529fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000012530else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012531 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12532$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012533fi
12534
Guido van Rossum7f253911997-05-09 02:42:48 +000012535
Guido van Rossum7f43da71994-08-01 12:15:30 +000012536# check for --with-libm=...
12537
Guido van Rossum563e7081996-09-10 18:20:48 +000012538case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000012539Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012540BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000012541*) LIBM=-lm
12542esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
12544$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012545
Martin v. Löwiseba40652007-08-30 20:10:57 +000012546# Check whether --with-libm was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012547if test "${with_libm+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000012548 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000012549if test "$withval" = no
12550then LIBM=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
12552$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012553elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012554then LIBM=$withval
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012555 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
12556$as_echo "set LIBM=\"$withval\"" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012557else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012558fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012559else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
12561$as_echo "default LIBM=\"$LIBM\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012562fi
12563
Guido van Rossum7f43da71994-08-01 12:15:30 +000012564
12565# check for --with-libc=...
12566
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
12568$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012569
Martin v. Löwiseba40652007-08-30 20:10:57 +000012570# Check whether --with-libc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012571if test "${with_libc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000012572 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000012573if test "$withval" = no
12574then LIBC=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
12576$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012577elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012578then LIBC=$withval
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012579 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
12580$as_echo "set LIBC=\"$withval\"" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012581else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012582fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012583else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012584 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
12585$as_echo "default LIBC=\"$LIBC\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012586fi
12587
Guido van Rossum7f43da71994-08-01 12:15:30 +000012588
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012589# **************************************************
12590# * Check for various properties of floating point *
12591# **************************************************
Mark Dickinson265d7382008-04-21 22:32:24 +000012592
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
12594$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012595if ${ac_cv_little_endian_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012596 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012597else
12598
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012599if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012600 ac_cv_little_endian_double=no
12601else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012602 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012603/* end confdefs.h. */
12604
12605#include <string.h>
12606int main() {
12607 double x = 9006104071832581.0;
12608 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
12609 return 0;
12610 else
12611 return 1;
12612}
12613
12614_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012615if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012616 ac_cv_little_endian_double=yes
12617else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012618 ac_cv_little_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012619fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012620rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12621 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012622fi
12623
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012624fi
12625
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012626{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
12627$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012628if test "$ac_cv_little_endian_double" = yes
12629then
12630
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012631$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012632
12633fi
12634
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
12636$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012637if ${ac_cv_big_endian_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012638 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012639else
12640
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012641if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012642 ac_cv_big_endian_double=no
12643else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012644 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012645/* end confdefs.h. */
12646
12647#include <string.h>
12648int main() {
12649 double x = 9006104071832581.0;
12650 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
12651 return 0;
12652 else
12653 return 1;
12654}
12655
12656_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012657if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012658 ac_cv_big_endian_double=yes
12659else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012660 ac_cv_big_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012661fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012662rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12663 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012664fi
12665
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012666fi
12667
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012668{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
12669$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012670if test "$ac_cv_big_endian_double" = yes
12671then
12672
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012673$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012674
12675fi
12676
12677# Some ARM platforms use a mixed-endian representation for doubles.
12678# While Python doesn't currently have full support for these platforms
12679# (see e.g., issue 1762561), we can at least make sure that float <-> string
12680# conversions work.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
12682$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012683if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012684 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012685else
12686
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012687if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012688 ac_cv_mixed_endian_double=no
12689else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012690 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012691/* end confdefs.h. */
12692
12693#include <string.h>
12694int main() {
12695 double x = 9006104071832581.0;
12696 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
12697 return 0;
12698 else
12699 return 1;
12700}
12701
12702_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012703if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012704 ac_cv_mixed_endian_double=yes
12705else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012706 ac_cv_mixed_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012707fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012708rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12709 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012710fi
12711
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012712fi
12713
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012714{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
12715$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012716if test "$ac_cv_mixed_endian_double" = yes
12717then
12718
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012719$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012720
12721fi
12722
12723# The short float repr introduced in Python 3.1 requires the
12724# correctly-rounded string <-> double conversion functions from
12725# Python/dtoa.c, which in turn require that the FPU uses 53-bit
12726# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsona548dee2009-11-15 13:12:43 +000012727# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012728# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsona548dee2009-11-15 13:12:43 +000012729
12730# This inline assembler syntax may also work for suncc and icc,
12731# so we try it on all platforms.
12732
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
12734$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
12735cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012736/* end confdefs.h. */
12737
12738int
12739main ()
12740{
12741
Mark Dickinsona548dee2009-11-15 13:12:43 +000012742 unsigned short cw;
12743 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
12744 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012745
12746 ;
12747 return 0;
12748}
12749_ACEOF
Stefan Krah99e36b92015-07-03 15:30:54 +020012750if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012751 have_gcc_asm_for_x87=yes
12752else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012753 have_gcc_asm_for_x87=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012754fi
Stefan Krah99e36b92015-07-03 15:30:54 +020012755rm -f core conftest.err conftest.$ac_objext \
12756 conftest$ac_exeext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012757{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
12758$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsona548dee2009-11-15 13:12:43 +000012759if test "$have_gcc_asm_for_x87" = yes
12760then
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012761
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012762$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012763
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012764fi
Mark Dickinson7a3d8642008-04-22 00:54:27 +000012765
Mark Dickinson04b27232009-01-04 12:29:36 +000012766# Detect whether system arithmetic is subject to x87-style double
12767# rounding issues. The result of this test has little meaning on non
12768# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
12769# mode is round-to-nearest and double rounding issues are present, and
12770# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
12772$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinson99abd142009-10-24 13:44:16 +000012773# $BASECFLAGS may affect the result
12774ac_save_cc="$CC"
12775CC="$CC $BASECFLAGS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012776if test "$cross_compiling" = yes; then :
Mark Dickinson04b27232009-01-04 12:29:36 +000012777 ac_cv_x87_double_rounding=no
12778else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012779 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson04b27232009-01-04 12:29:36 +000012780/* end confdefs.h. */
12781
12782#include <stdlib.h>
12783#include <math.h>
12784int main() {
12785 volatile double x, y, z;
12786 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
12787 x = 0.99999999999999989; /* 1-2**-53 */
12788 y = 1./x;
12789 if (y != 1.)
12790 exit(0);
12791 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
12792 x = 1e16;
12793 y = 2.99999;
12794 z = x + y;
12795 if (z != 1e16+4.)
12796 exit(0);
12797 /* both tests show evidence of double rounding */
12798 exit(1);
12799}
12800
12801_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012802if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson04b27232009-01-04 12:29:36 +000012803 ac_cv_x87_double_rounding=no
12804else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012805 ac_cv_x87_double_rounding=yes
Mark Dickinson04b27232009-01-04 12:29:36 +000012806fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012807rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12808 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson04b27232009-01-04 12:29:36 +000012809fi
12810
Mark Dickinson99abd142009-10-24 13:44:16 +000012811CC="$ac_save_cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012812{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
12813$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson04b27232009-01-04 12:29:36 +000012814if test "$ac_cv_x87_double_rounding" = yes
12815then
12816
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012817$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson04b27232009-01-04 12:29:36 +000012818
12819fi
12820
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012821# ************************************
12822# * Check for mathematical functions *
12823# ************************************
12824
12825LIBS_SAVE=$LIBS
12826LIBS="$LIBS $LIBM"
12827
Mark Dickinson265d7382008-04-21 22:32:24 +000012828# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
12829# -0. on some architectures.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
12831$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012832if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012833 $as_echo_n "(cached) " >&6
Mark Dickinson265d7382008-04-21 22:32:24 +000012834else
12835
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012836if test "$cross_compiling" = yes; then :
Mark Dickinson265d7382008-04-21 22:32:24 +000012837 ac_cv_tanh_preserves_zero_sign=no
12838else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012839 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson265d7382008-04-21 22:32:24 +000012840/* end confdefs.h. */
12841
12842#include <math.h>
Mark Dickinson7a3d8642008-04-22 00:54:27 +000012843#include <stdlib.h>
Mark Dickinson265d7382008-04-21 22:32:24 +000012844int main() {
12845 /* return 0 if either negative zeros don't exist
12846 on this platform or if negative zeros exist
12847 and tanh(-0.) == -0. */
12848 if (atan2(0., -1.) == atan2(-0., -1.) ||
12849 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
12850 else exit(1);
12851}
12852
12853_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012854if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson265d7382008-04-21 22:32:24 +000012855 ac_cv_tanh_preserves_zero_sign=yes
12856else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012857 ac_cv_tanh_preserves_zero_sign=no
Mark Dickinson265d7382008-04-21 22:32:24 +000012858fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012859rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12860 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson265d7382008-04-21 22:32:24 +000012861fi
12862
Mark Dickinson265d7382008-04-21 22:32:24 +000012863fi
12864
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012865{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
12866$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Mark Dickinson265d7382008-04-21 22:32:24 +000012867if test "$ac_cv_tanh_preserves_zero_sign" = yes
12868then
12869
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012870$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Mark Dickinson265d7382008-04-21 22:32:24 +000012871
12872fi
12873
Mark Dickinson65898e02009-09-05 10:27:00 +000012874for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012875do :
12876 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12877ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012878if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinson65898e02009-09-05 10:27:00 +000012879 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012880#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Mark Dickinson65898e02009-09-05 10:27:00 +000012881_ACEOF
12882
12883fi
12884done
12885
Mark Dickinson65898e02009-09-05 10:27:00 +000012886for ac_func in hypot lgamma log1p round tgamma
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012887do :
12888 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12889ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012890if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Christian Heimes0a8143f2007-12-18 23:22:54 +000012891 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012892#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes0a8143f2007-12-18 23:22:54 +000012893_ACEOF
12894
12895fi
12896done
12897
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012898ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
12899"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012900if test "x$ac_cv_have_decl_isinf" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012901 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012902else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012903 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012904fi
12905
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012906cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012907#define HAVE_DECL_ISINF $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012908_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012909ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
12910"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012911if test "x$ac_cv_have_decl_isnan" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012912 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012913else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012914 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012915fi
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012916
12917cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012918#define HAVE_DECL_ISNAN $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012919_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012920ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
12921"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012922if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012923 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012924else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012925 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012926fi
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012927
12928cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012929#define HAVE_DECL_ISFINITE $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012930_ACEOF
12931
12932
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000012933LIBS=$LIBS_SAVE
12934
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012935# For multiprocessing module, check that sem_open
12936# actually works. For FreeBSD versions <= 7.2,
12937# the kernel module that provides POSIX semaphores
12938# isn't loaded by default, so an attempt to call
12939# sem_open results in a 'Signal 12' error.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
12941$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012942if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012943 $as_echo_n "(cached) " >&6
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012944else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012945 if test "$cross_compiling" = yes; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012946 ac_cv_posix_semaphores_enabled=yes
12947else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012948 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012949/* end confdefs.h. */
12950
12951#include <unistd.h>
12952#include <fcntl.h>
12953#include <stdio.h>
12954#include <semaphore.h>
12955#include <sys/stat.h>
12956
12957int main(void) {
12958 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
12959 if (a == SEM_FAILED) {
12960 perror("sem_open");
12961 return 1;
12962 }
12963 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000012964 sem_unlink("/autoconf");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012965 return 0;
12966}
12967
12968_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012969if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012970 ac_cv_posix_semaphores_enabled=yes
12971else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012972 ac_cv_posix_semaphores_enabled=no
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012973fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012974rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12975 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012976fi
12977
12978
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012979fi
12980
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012981{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
12982$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012983if test $ac_cv_posix_semaphores_enabled = no
12984then
12985
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012986$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012987
12988fi
12989
12990# Multiprocessing check for broken sem_getvalue
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
12992$as_echo_n "checking for broken sem_getvalue... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012993if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012994 $as_echo_n "(cached) " >&6
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012995else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012996 if test "$cross_compiling" = yes; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012997 ac_cv_broken_sem_getvalue=yes
12998else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012999 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013000/* end confdefs.h. */
13001
13002#include <unistd.h>
13003#include <fcntl.h>
13004#include <stdio.h>
13005#include <semaphore.h>
13006#include <sys/stat.h>
13007
13008int main(void){
Mark Dickinson59dc89e2009-12-13 21:06:06 +000013009 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013010 int count;
13011 int res;
13012 if(a==SEM_FAILED){
13013 perror("sem_open");
13014 return 1;
13015
13016 }
13017 res = sem_getvalue(a, &count);
13018 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000013019 sem_unlink("/autocftw");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013020 return res==-1 ? 1 : 0;
13021}
13022
13023_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013024if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013025 ac_cv_broken_sem_getvalue=no
13026else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013027 ac_cv_broken_sem_getvalue=yes
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013028fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013029rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13030 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013031fi
13032
13033
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013034fi
13035
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013036{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
13037$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013038if test $ac_cv_broken_sem_getvalue = yes
13039then
13040
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013041$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013042
13043fi
13044
Mark Dickinsonefc82f72009-03-20 15:51:55 +000013045# determine what size digit to use for Python's longs
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
13047$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000013048# Check whether --enable-big-digits was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013049if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonefc82f72009-03-20 15:51:55 +000013050 enableval=$enable_big_digits; case $enable_big_digits in
13051yes)
13052 enable_big_digits=30 ;;
13053no)
13054 enable_big_digits=15 ;;
1305515|30)
13056 ;;
13057*)
Matthias Klose3cef2a92012-03-14 23:39:33 +010013058 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 +000013059esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013060{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
13061$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000013062
13063cat >>confdefs.h <<_ACEOF
13064#define PYLONG_BITS_IN_DIGIT $enable_big_digits
13065_ACEOF
13066
13067
13068else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13070$as_echo "no value specified" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000013071fi
13072
13073
Guido van Rossumef2255b2000-03-10 22:30:29 +000013074# check for wchar.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013075ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +010013076if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013077
13078
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013079$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013080
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013081 wchar_h="yes"
13082
Guido van Rossumef2255b2000-03-10 22:30:29 +000013083else
Martin v. Löwis11437992002-04-12 09:54:03 +000013084 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000013085
13086fi
13087
Michael W. Hudson54241132001-12-07 15:38:26 +000013088
Martin v. Löwis11437992002-04-12 09:54:03 +000013089
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013090# determine wchar_t size
13091if test "$wchar_h" = yes
13092then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013093 # The cast to long int works around a bug in the HP C Compiler
Martin v. Löwiseba40652007-08-30 20:10:57 +000013094# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13095# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13096# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
13098$as_echo_n "checking size of wchar_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013099if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013100 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013101else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013102 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
13103"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013104
Martin v. Löwis11437992002-04-12 09:54:03 +000013105else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013106 if test "$ac_cv_type_wchar_t" = yes; then
13107 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13108$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013109as_fn_error 77 "cannot compute sizeof (wchar_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +010013110See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013111 else
13112 ac_cv_sizeof_wchar_t=0
13113 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013114fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013115
Martin v. Löwis11437992002-04-12 09:54:03 +000013116fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013117{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
13118$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013119
13120
13121
Martin v. Löwis11437992002-04-12 09:54:03 +000013122cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013123#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013124_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013125
Michael W. Hudson54241132001-12-07 15:38:26 +000013126
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013127fi
13128
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
13130$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013131have_ucs4_tcl=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013132cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013133/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013134
13135#include <tcl.h>
13136#if TCL_UTF_MAX != 6
13137# error "NOT UCS4_TCL"
13138#endif
13139int
13140main ()
13141{
13142
13143 ;
13144 return 0;
13145}
13146_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013147if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013148
13149
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013150$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013151
13152 have_ucs4_tcl=yes
13153
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013154fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013155rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013156{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
13157$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013158
Skip Montanaro6dead952003-09-25 14:50:04 +000013159# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013160if test "$wchar_h" = yes
13161then
13162 # check whether wchar_t is signed or not
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013163 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
13164$as_echo_n "checking whether wchar_t is signed... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013165 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013166 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013167else
13168
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013169 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013170 ac_cv_wchar_t_signed=yes
13171else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013172 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013173/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013174
13175 #include <wchar.h>
13176 int main()
13177 {
Martin v. Löwis44fe0e42006-04-11 07:15:30 +000013178 /* Success: exit code 0 */
13179 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013180 }
13181
13182_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013183if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013184 ac_cv_wchar_t_signed=yes
13185else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013186 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013187fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013188rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13189 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013190fi
13191
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013192fi
13193
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013194 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
13195$as_echo "$ac_cv_wchar_t_signed" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013196fi
13197
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what type to use for unicode" >&5
13199$as_echo_n "checking what type to use for unicode... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013200# Check whether --enable-unicode was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013201if test "${enable_unicode+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000013202 enableval=$enable_unicode;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013203else
13204 enable_unicode=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +000013205fi
13206
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013207
13208if test $enable_unicode = yes
13209then
Martin v. Löwisfd917792001-06-27 20:22:04 +000013210 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013211 case "$have_ucs4_tcl" in
13212 yes) enable_unicode="ucs4"
13213 ;;
13214 *) enable_unicode="ucs2"
13215 ;;
13216 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013217fi
13218
Martin v. Löwis0036cba2002-04-12 09:58:45 +000013219
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013220case "$enable_unicode" in
13221ucs2) unicode_size="2"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013222 $as_echo "#define Py_UNICODE_SIZE 2" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013223
13224 ;;
13225ucs4) unicode_size="4"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013226 $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013227
13228 ;;
Martin v. Löwised11a5d2012-05-20 10:42:17 +020013229no) ;; # To allow --disable-unicode
Matthias Klose3cef2a92012-03-14 23:39:33 +010013230*) 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 +000013231esac
13232
Michael W. Hudson54241132001-12-07 15:38:26 +000013233
Martin v. Löwis11437992002-04-12 09:54:03 +000013234
13235
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013236if test "$enable_unicode" = "no"
13237then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000013238 UNICODE_OBJS=""
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013239 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not used" >&5
13240$as_echo "not used" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013241else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000013242 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000013243
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013244$as_echo "#define Py_USING_UNICODE 1" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013245
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013246
13247 # wchar_t is only usable if it maps to an unsigned type
13248 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000013249 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013250 then
13251 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013252
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013253$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013254
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013255 $as_echo "#define PY_UNICODE_TYPE wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013256
13257 elif test "$ac_cv_sizeof_short" = "$unicode_size"
13258 then
13259 PY_UNICODE_TYPE="unsigned short"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013260 $as_echo "#define PY_UNICODE_TYPE unsigned short" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013261
13262 elif test "$ac_cv_sizeof_long" = "$unicode_size"
13263 then
13264 PY_UNICODE_TYPE="unsigned long"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013265 $as_echo "#define PY_UNICODE_TYPE unsigned long" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013266
13267 else
13268 PY_UNICODE_TYPE="no type found"
13269 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013270 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PY_UNICODE_TYPE" >&5
13271$as_echo "$PY_UNICODE_TYPE" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013272fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000013273
13274# check for endianness
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013275 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13276$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013277if ${ac_cv_c_bigendian+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013278 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000013279else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013280 ac_cv_c_bigendian=unknown
13281 # See if we're dealing with a universal compiler.
13282 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13283/* end confdefs.h. */
13284#ifndef __APPLE_CC__
13285 not a universal capable compiler
13286 #endif
13287 typedef int dummy;
13288
Skip Montanaro6dead952003-09-25 14:50:04 +000013289_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013290if ac_fn_c_try_compile "$LINENO"; then :
13291
13292 # Check for potential -arch flags. It is not universal unless
13293 # there are at least two -arch flags with different values.
13294 ac_arch=
13295 ac_prev=
13296 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13297 if test -n "$ac_prev"; then
13298 case $ac_word in
13299 i?86 | x86_64 | ppc | ppc64)
13300 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13301 ac_arch=$ac_word
13302 else
13303 ac_cv_c_bigendian=universal
13304 break
13305 fi
13306 ;;
13307 esac
13308 ac_prev=
13309 elif test "x$ac_word" = "x-arch"; then
13310 ac_prev=arch
13311 fi
13312 done
13313fi
13314rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13315 if test $ac_cv_c_bigendian = unknown; then
13316 # See if sys/param.h defines the BYTE_ORDER macro.
13317 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013318/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013319#include <sys/types.h>
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013320 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013321
Martin v. Löwis11437992002-04-12 09:54:03 +000013322int
13323main ()
13324{
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013325#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13326 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13327 && LITTLE_ENDIAN)
13328 bogus endian macros
13329 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013330
13331 ;
13332 return 0;
13333}
13334_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013335if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013336 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013337 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013338/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013339#include <sys/types.h>
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013340 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013341
Martin v. Löwis11437992002-04-12 09:54:03 +000013342int
13343main ()
13344{
Guido van Rossumef2255b2000-03-10 22:30:29 +000013345#if BYTE_ORDER != BIG_ENDIAN
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013346 not big endian
13347 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013348
13349 ;
13350 return 0;
13351}
13352_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013353if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013354 ac_cv_c_bigendian=yes
13355else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013356 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000013357fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013358rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013359fi
13360rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13361 fi
13362 if test $ac_cv_c_bigendian = unknown; then
13363 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13364 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013365/* end confdefs.h. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013366#include <limits.h>
13367
Martin v. Löwis11437992002-04-12 09:54:03 +000013368int
13369main ()
13370{
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013371#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13372 bogus endian macros
13373 #endif
13374
Martin v. Löwis11437992002-04-12 09:54:03 +000013375 ;
13376 return 0;
13377}
13378_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013379if ac_fn_c_try_compile "$LINENO"; then :
13380 # It does; now see whether it defined to _BIG_ENDIAN or not.
13381 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13382/* end confdefs.h. */
13383#include <limits.h>
13384
13385int
13386main ()
13387{
13388#ifndef _BIG_ENDIAN
13389 not big endian
13390 #endif
13391
13392 ;
13393 return 0;
13394}
13395_ACEOF
13396if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013397 ac_cv_c_bigendian=yes
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000013398else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013399 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013400fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013401rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13402fi
13403rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13404 fi
13405 if test $ac_cv_c_bigendian = unknown; then
13406 # Compile a test program.
13407 if test "$cross_compiling" = yes; then :
13408 # Try to guess by grepping values from an object file.
13409 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13410/* end confdefs.h. */
13411short int ascii_mm[] =
13412 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13413 short int ascii_ii[] =
13414 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13415 int use_ascii (int i) {
13416 return ascii_mm[i] + ascii_ii[i];
13417 }
13418 short int ebcdic_ii[] =
13419 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13420 short int ebcdic_mm[] =
13421 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13422 int use_ebcdic (int i) {
13423 return ebcdic_mm[i] + ebcdic_ii[i];
13424 }
13425 extern int foo;
Martin v. Löwiseba40652007-08-30 20:10:57 +000013426
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013427int
13428main ()
13429{
13430return use_ascii (foo) == use_ebcdic (foo);
13431 ;
13432 return 0;
13433}
13434_ACEOF
13435if ac_fn_c_try_compile "$LINENO"; then :
13436 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
13437 ac_cv_c_bigendian=yes
13438 fi
13439 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
13440 if test "$ac_cv_c_bigendian" = unknown; then
13441 ac_cv_c_bigendian=no
13442 else
13443 # finding both strings is unlikely to happen, but who knows?
13444 ac_cv_c_bigendian=unknown
13445 fi
13446 fi
13447fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013448rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013449else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013450 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013451/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000013452$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013453int
13454main ()
13455{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013456
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013457 /* Are we little or big endian? From Harbison&Steele. */
13458 union
13459 {
13460 long int l;
13461 char c[sizeof (long int)];
13462 } u;
13463 u.l = 1;
13464 return u.c[sizeof (long int) - 1] == 1;
Martin v. Löwiseba40652007-08-30 20:10:57 +000013465
13466 ;
13467 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000013468}
Martin v. Löwis11437992002-04-12 09:54:03 +000013469_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013470if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013471 ac_cv_c_bigendian=no
13472else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013473 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000013474fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013475rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13476 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000013477fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013478
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013479 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013480fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013481{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
13482$as_echo "$ac_cv_c_bigendian" >&6; }
13483 case $ac_cv_c_bigendian in #(
13484 yes)
13485 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
13486;; #(
13487 no)
13488 ;; #(
13489 universal)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013490
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013491$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000013492
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013493 ;; #(
13494 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013495 as_fn_error $? "unknown endianness
Matthias Klose3cef2a92012-03-14 23:39:33 +010013496 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013497 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000013498
Michael W. Hudson54241132001-12-07 15:38:26 +000013499
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013500# Check whether right shifting a negative integer extends the sign bit
13501# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013502{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
13503$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013504if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013505 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000013506else
Martin v. Löwis11437992002-04-12 09:54:03 +000013507
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013508if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013509 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013510else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013511 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013512/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013513
13514int main()
13515{
Vladimir Marangozova6180282000-07-12 05:05:06 +000013516 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013517}
13518
Martin v. Löwis11437992002-04-12 09:54:03 +000013519_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013520if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000013521 ac_cv_rshift_extends_sign=yes
13522else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013523 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000013524fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013525rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13526 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000013527fi
13528
Martin v. Löwiseba40652007-08-30 20:10:57 +000013529fi
13530
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013531{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
13532$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000013533if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013534then
Martin v. Löwis11437992002-04-12 09:54:03 +000013535
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013536$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013537
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013538fi
13539
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013540# check for getc_unlocked and related locking functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
13542$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013543if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013544 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013545else
Martin v. Löwis11437992002-04-12 09:54:03 +000013546
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013547cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013548/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013549#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013550int
13551main ()
13552{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013553
13554 FILE *f = fopen("/dev/null", "r");
13555 flockfile(f);
13556 getc_unlocked(f);
13557 funlockfile(f);
13558
Martin v. Löwis11437992002-04-12 09:54:03 +000013559 ;
13560 return 0;
13561}
13562_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013563if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013564 ac_cv_have_getc_unlocked=yes
13565else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013566 ac_cv_have_getc_unlocked=no
13567fi
13568rm -f core conftest.err conftest.$ac_objext \
13569 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013570fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013571
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013572{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
13573$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013574if test "$ac_cv_have_getc_unlocked" = yes
13575then
Martin v. Löwis11437992002-04-12 09:54:03 +000013576
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013577$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013578
13579fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013580
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013581# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000013582# save the value of LIBS so we don't actually link Python with readline
13583LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013584
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013585# On some systems we need to link readline to a termcap compatible
13586# library. NOTE: Keep the precedence of listed libraries synchronised
13587# with setup.py.
13588py_cv_lib_readline=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
13590$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013591for py_libtermcap in "" ncursesw ncurses curses termcap; do
13592 if test -z "$py_libtermcap"; then
13593 READLINE_LIBS="-lreadline"
13594 else
13595 READLINE_LIBS="-lreadline -l$py_libtermcap"
13596 fi
13597 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013598 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013599/* end confdefs.h. */
13600
Martin v. Löwiseba40652007-08-30 20:10:57 +000013601/* Override any GCC internal prototype to avoid an error.
13602 Use char because int might match the return type of a GCC
13603 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013604#ifdef __cplusplus
13605extern "C"
13606#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013607char readline ();
13608int
13609main ()
13610{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013611return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013612 ;
13613 return 0;
13614}
13615_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013616if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013617 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013618fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013619rm -f core conftest.err conftest.$ac_objext \
13620 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013621 if test $py_cv_lib_readline = yes; then
13622 break
13623 fi
13624done
13625# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
13626#AC_SUBST([READLINE_LIBS])
Gregory P. Smithe080cdf2008-09-07 19:19:04 +000013627if test $py_cv_lib_readline = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013628 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
13629$as_echo "none" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013630else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013631 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
13632$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013633
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013634$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013635
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013636fi
13637
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013638# check for readline 2.1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
13640$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013641if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013642 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013643else
13644 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013645LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013646cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013647/* end confdefs.h. */
13648
Martin v. Löwiseba40652007-08-30 20:10:57 +000013649/* Override any GCC internal prototype to avoid an error.
13650 Use char because int might match the return type of a GCC
13651 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013652#ifdef __cplusplus
13653extern "C"
13654#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013655char rl_callback_handler_install ();
13656int
13657main ()
13658{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013659return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013660 ;
13661 return 0;
13662}
13663_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013664if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013665 ac_cv_lib_readline_rl_callback_handler_install=yes
13666else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013667 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013668fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013669rm -f core conftest.err conftest.$ac_objext \
13670 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013671LIBS=$ac_check_lib_save_LIBS
13672fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013673{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
13674$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013675if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013676
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013677$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013678
13679fi
13680
13681
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013682# check for readline 2.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013683cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013684/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013685#include <readline/readline.h>
13686_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013687if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013688 have_readline=yes
13689else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013690 have_readline=no
Matthias Klosec511b472010-05-08 11:01:39 +000013691
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013692fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013693rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013694if test $have_readline = yes
13695then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013696 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013697/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013698#include <readline/readline.h>
13699
13700_ACEOF
13701if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013702 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013703
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013704$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013705
13706fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000013707rm -f conftest*
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000013708
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013709 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000013710/* end confdefs.h. */
13711#include <readline/readline.h>
13712
13713_ACEOF
13714if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013715 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000013716
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013717$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000013718
13719fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000013720rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013721
13722fi
13723
Martin v. Löwis0daad592001-09-30 21:09:59 +000013724# check for readline 4.0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
13726$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013727if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013728 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000013729else
Martin v. Löwis11437992002-04-12 09:54:03 +000013730 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013731LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013732cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013733/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013734
Martin v. Löwiseba40652007-08-30 20:10:57 +000013735/* Override any GCC internal prototype to avoid an error.
13736 Use char because int might match the return type of a GCC
13737 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013738#ifdef __cplusplus
13739extern "C"
13740#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013741char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013742int
13743main ()
13744{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013745return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013746 ;
13747 return 0;
13748}
13749_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013750if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013751 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000013752else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013753 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000013754fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013755rm -f core conftest.err conftest.$ac_objext \
13756 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013757LIBS=$ac_check_lib_save_LIBS
13758fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013759{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
13760$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013761if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013762
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013763$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000013764
Martin v. Löwis0daad592001-09-30 21:09:59 +000013765fi
13766
Michael W. Hudson54241132001-12-07 15:38:26 +000013767
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013768# also in 4.0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
13770$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013771if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013772 $as_echo_n "(cached) " >&6
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013773else
13774 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013775LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013776cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013777/* end confdefs.h. */
13778
13779/* Override any GCC internal prototype to avoid an error.
13780 Use char because int might match the return type of a GCC
13781 builtin and then its argument prototype would still apply. */
13782#ifdef __cplusplus
13783extern "C"
13784#endif
13785char rl_completion_display_matches_hook ();
13786int
13787main ()
13788{
13789return rl_completion_display_matches_hook ();
13790 ;
13791 return 0;
13792}
13793_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013794if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013795 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
13796else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013797 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013798fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013799rm -f core conftest.err conftest.$ac_objext \
13800 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013801LIBS=$ac_check_lib_save_LIBS
13802fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013803{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
13804$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013805if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013806
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013807$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013808
13809fi
13810
13811
Martin v. Löwis0daad592001-09-30 21:09:59 +000013812# check for readline 4.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
13814$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013815if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013816 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000013817else
Martin v. Löwis11437992002-04-12 09:54:03 +000013818 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013819LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013820cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013821/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013822
Martin v. Löwiseba40652007-08-30 20:10:57 +000013823/* Override any GCC internal prototype to avoid an error.
13824 Use char because int might match the return type of a GCC
13825 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013826#ifdef __cplusplus
13827extern "C"
13828#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013829char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013830int
13831main ()
13832{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013833return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013834 ;
13835 return 0;
13836}
13837_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013838if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013839 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000013840else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013841 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000013842fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013843rm -f core conftest.err conftest.$ac_objext \
13844 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013845LIBS=$ac_check_lib_save_LIBS
13846fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013847{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
13848$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013849if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013850
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013851$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000013852
Guido van Rossum353ae582001-07-10 16:45:32 +000013853fi
13854
Jack Jansendd19cf82001-12-06 22:36:17 +000013855
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013856# also in readline 4.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013857cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013858/* end confdefs.h. */
13859#include <readline/readline.h>
13860_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013861if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013862 have_readline=yes
13863else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013864 have_readline=no
Matthias Klosec511b472010-05-08 11:01:39 +000013865
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013866fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013867rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013868if test $have_readline = yes
13869then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013870 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013871/* end confdefs.h. */
13872#include <readline/readline.h>
13873
13874_ACEOF
13875if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013876 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013877
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013878$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013879
13880fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000013881rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013882
13883fi
13884
Martin v. Löwis82bca632006-02-10 20:49:30 +000013885# End of readline checks: restore LIBS
13886LIBS=$LIBS_no_readline
13887
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
13889$as_echo_n "checking for broken nice()... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013890if ${ac_cv_broken_nice+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013891 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013892else
Martin v. Löwis11437992002-04-12 09:54:03 +000013893
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013894if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013895 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013896else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013897 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013898/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013899
13900int main()
13901{
13902 int val1 = nice(1);
13903 if (val1 != -1 && val1 == nice(2))
13904 exit(0);
13905 exit(1);
13906}
13907
Martin v. Löwis11437992002-04-12 09:54:03 +000013908_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013909if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013910 ac_cv_broken_nice=yes
13911else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013912 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013913fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013914rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13915 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013916fi
13917
Martin v. Löwiseba40652007-08-30 20:10:57 +000013918fi
13919
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013920{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
13921$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013922if test "$ac_cv_broken_nice" = yes
13923then
Martin v. Löwis11437992002-04-12 09:54:03 +000013924
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013925$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013926
13927fi
13928
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013929{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
13930$as_echo_n "checking for broken poll()... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013931if ${ac_cv_broken_poll+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013932 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013933else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013934 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013935 ac_cv_broken_poll=no
13936else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013937 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013938/* end confdefs.h. */
13939
13940#include <poll.h>
13941
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013942int main()
13943{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013944 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013945 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013946
13947 close (42);
13948
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013949 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013950 if (poll_test < 0)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013951 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013952 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013953 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013954 else
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013955 return 1;
13956}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013957
13958_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013959if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013960 ac_cv_broken_poll=yes
13961else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013962 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013963fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013964rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13965 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013966fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013967
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013968fi
13969
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013970{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
13971$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013972if test "$ac_cv_broken_poll" = yes
13973then
13974
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013975$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013976
13977fi
13978
Brett Cannon43802422005-02-10 20:48:03 +000013979# 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 +000013980# (which is not required by ISO C or UNIX spec) and/or if we support
13981# tzname[]
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013982ac_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 +000013983#include <$ac_cv_struct_tm>
13984
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013985"
Matthias Klose3cef2a92012-03-14 23:39:33 +010013986if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000013987
13988cat >>confdefs.h <<_ACEOF
13989#define HAVE_STRUCT_TM_TM_ZONE 1
13990_ACEOF
13991
13992
13993fi
13994
13995if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13996
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013997$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013998
13999else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014000 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
14001"
Matthias Klose3cef2a92012-03-14 23:39:33 +010014002if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014003 ac_have_decl=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000014004else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014005 ac_have_decl=0
Martin v. Löwiseba40652007-08-30 20:10:57 +000014006fi
14007
Martin v. Löwiseba40652007-08-30 20:10:57 +000014008cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014009#define HAVE_DECL_TZNAME $ac_have_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +000014010_ACEOF
14011
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014012 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
14013$as_echo_n "checking for tzname... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014014if ${ac_cv_var_tzname+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014015 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000014016else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014017 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014018/* end confdefs.h. */
14019#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000014020#if !HAVE_DECL_TZNAME
14021extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000014022#endif
14023
14024int
14025main ()
14026{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014027return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000014028 ;
14029 return 0;
14030}
14031_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014032if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000014033 ac_cv_var_tzname=yes
14034else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014035 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000014036fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014037rm -f core conftest.err conftest.$ac_objext \
14038 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014039fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014040{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
14041$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000014042 if test $ac_cv_var_tzname = yes; then
14043
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014044$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014045
14046 fi
14047fi
14048
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014049
Martin v. Löwis1d459062005-03-14 21:23:33 +000014050# check tzset(3) exists and works like we expect it to
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
14052$as_echo_n "checking for working tzset()... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014053if ${ac_cv_working_tzset+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014054 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014055else
14056
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014057if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014058 ac_cv_working_tzset=no
14059else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014060 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014061/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014062
14063#include <stdlib.h>
14064#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000014065#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000014066
14067#if HAVE_TZNAME
14068extern char *tzname[];
14069#endif
14070
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014071int main()
14072{
Brett Cannon18367812003-09-19 00:59:16 +000014073 /* Note that we need to ensure that not only does tzset(3)
14074 do 'something' with localtime, but it works as documented
14075 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000014076 This includes making sure that tzname is set properly if
14077 tm->tm_zone does not exist since it is the alternative way
14078 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000014079
14080 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000014081 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000014082 */
14083
Martin v. Löwis1d459062005-03-14 21:23:33 +000014084 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000014085 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
14086
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014087 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014088 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014089 if (localtime(&groundhogday)->tm_hour != 0)
14090 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014091#if HAVE_TZNAME
14092 /* For UTC, tzname[1] is sometimes "", sometimes " " */
14093 if (strcmp(tzname[0], "UTC") ||
14094 (tzname[1][0] != 0 && tzname[1][0] != ' '))
14095 exit(1);
14096#endif
Brett Cannon18367812003-09-19 00:59:16 +000014097
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014098 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014099 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014100 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014101 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014102#if HAVE_TZNAME
14103 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
14104 exit(1);
14105#endif
Brett Cannon18367812003-09-19 00:59:16 +000014106
14107 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
14108 tzset();
14109 if (localtime(&groundhogday)->tm_hour != 11)
14110 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014111#if HAVE_TZNAME
14112 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
14113 exit(1);
14114#endif
14115
14116#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000014117 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
14118 exit(1);
14119 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
14120 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014121#endif
Brett Cannon18367812003-09-19 00:59:16 +000014122
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014123 exit(0);
14124}
14125
14126_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014127if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014128 ac_cv_working_tzset=yes
14129else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014130 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014131fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014132rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14133 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014134fi
14135
Martin v. Löwiseba40652007-08-30 20:10:57 +000014136fi
14137
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014138{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
14139$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014140if test "$ac_cv_working_tzset" = yes
14141then
14142
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014143$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014144
14145fi
14146
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014147# Look for subsecond timestamps in struct stat
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
14149$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014150if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014151 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014152else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014153 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014154/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014155#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014156int
14157main ()
14158{
14159
14160struct stat st;
14161st.st_mtim.tv_nsec = 1;
14162
14163 ;
14164 return 0;
14165}
14166_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014167if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000014168 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014169else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014170 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014171fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014172rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14173fi
14174
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014175{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
14176$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014177if test "$ac_cv_stat_tv_nsec" = yes
14178then
14179
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014180$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014181
14182fi
14183
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014184# Look for BSD style subsecond timestamps in struct stat
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
14186$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014187if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014188 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014189else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014190 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014191/* end confdefs.h. */
14192#include <sys/stat.h>
14193int
14194main ()
14195{
14196
14197struct stat st;
14198st.st_mtimespec.tv_nsec = 1;
14199
14200 ;
14201 return 0;
14202}
14203_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014204if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014205 ac_cv_stat_tv_nsec2=yes
14206else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014207 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014208fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014209rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14210fi
14211
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014212{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
14213$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014214if test "$ac_cv_stat_tv_nsec2" = yes
14215then
14216
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014217$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014218
14219fi
14220
doko@ubuntu.comf27ec3e2014-04-17 20:11:19 +020014221# first curses configure check
14222ac_save_cppflags="$CPPFLAGS"
14223CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
14224
14225for ac_header in curses.h ncurses.h
14226do :
14227 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14228ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
14229if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
14230 cat >>confdefs.h <<_ACEOF
14231#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14232_ACEOF
14233
14234fi
14235
14236done
14237
14238
14239# On Solaris, term.h requires curses.h
14240for ac_header in term.h
14241do :
14242 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
14243#ifdef HAVE_CURSES_H
14244#include <curses.h>
14245#endif
14246
14247"
14248if test "x$ac_cv_header_term_h" = xyes; then :
14249 cat >>confdefs.h <<_ACEOF
14250#define HAVE_TERM_H 1
14251_ACEOF
14252
14253fi
14254
14255done
14256
14257
Jack Jansen666b1e72001-10-31 12:11:48 +000014258# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
14260$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014261if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014262 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014263else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014264 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014265/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014266#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014267int
14268main ()
14269{
Jack Jansen666b1e72001-10-31 12:11:48 +000014270
14271 int rtn;
14272 rtn = mvwdelch(0,0,0);
14273
Martin v. Löwis11437992002-04-12 09:54:03 +000014274 ;
14275 return 0;
14276}
14277_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014278if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014279 ac_cv_mvwdelch_is_expression=yes
14280else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014281 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014282fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014283rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14284fi
14285
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014286{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
14287$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000014288
14289if test "$ac_cv_mvwdelch_is_expression" = yes
14290then
Martin v. Löwis11437992002-04-12 09:54:03 +000014291
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014292$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014293
14294fi
14295
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014296{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
14297$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014298if ${ac_cv_window_has_flags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014299 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014300else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014302/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014303#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014304int
14305main ()
14306{
Jack Jansen666b1e72001-10-31 12:11:48 +000014307
14308 WINDOW *w;
14309 w->_flags = 0;
14310
Martin v. Löwis11437992002-04-12 09:54:03 +000014311 ;
14312 return 0;
14313}
14314_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014315if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014316 ac_cv_window_has_flags=yes
14317else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014318 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014319fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014320rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14321fi
14322
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014323{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
14324$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000014325
Jack Jansen666b1e72001-10-31 12:11:48 +000014326
14327if test "$ac_cv_window_has_flags" = yes
14328then
Martin v. Löwis11437992002-04-12 09:54:03 +000014329
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014330$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014331
14332fi
14333
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
14335$as_echo_n "checking for is_term_resized... " >&6; }
14336cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000014337/* end confdefs.h. */
14338#include <curses.h>
14339int
14340main ()
14341{
14342void *x=is_term_resized
14343 ;
14344 return 0;
14345}
14346_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014347if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000014348
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014349$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000014350
Matthias Klosec511b472010-05-08 11:01:39 +000014351 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014352$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014353else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14355$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014356
14357fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014358rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14359
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
14361$as_echo_n "checking for resize_term... " >&6; }
14362cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000014363/* end confdefs.h. */
14364#include <curses.h>
14365int
14366main ()
14367{
14368void *x=resize_term
14369 ;
14370 return 0;
14371}
14372_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014373if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000014374
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014375$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000014376
Matthias Klosec511b472010-05-08 11:01:39 +000014377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014378$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014379else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14381$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014382
14383fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014384rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14385
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
14387$as_echo_n "checking for resizeterm... " >&6; }
14388cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000014389/* end confdefs.h. */
14390#include <curses.h>
14391int
14392main ()
14393{
14394void *x=resizeterm
14395 ;
14396 return 0;
14397}
14398_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014399if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000014400
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014401$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000014402
Matthias Klosec511b472010-05-08 11:01:39 +000014403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014404$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014405else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14407$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014408
14409fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014410rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.comf27ec3e2014-04-17 20:11:19 +020014411# last curses configure check
14412CPPFLAGS=$ac_save_cppflags
Martin v. Löwiseba40652007-08-30 20:10:57 +000014413
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
14415$as_echo "$as_me: checking for device files" >&6;}
14416
14417if test "x$cross_compiling" = xyes; then
14418 if test "${ac_cv_file__dev_ptmx+set}" != set; then
14419 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14420$as_echo_n "checking for /dev/ptmx... " >&6; }
14421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14422$as_echo "not set" >&6; }
14423 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14424 fi
14425 if test "${ac_cv_file__dev_ptc+set}" != set; then
14426 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14427$as_echo_n "checking for /dev/ptc... " >&6; }
14428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14429$as_echo "not set" >&6; }
14430 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14431 fi
14432fi
14433
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14435$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014436if ${ac_cv_file__dev_ptmx+:} false; then :
14437 $as_echo_n "(cached) " >&6
14438else
14439 test "$cross_compiling" = yes &&
14440 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14441if test -r "/dev/ptmx"; then
14442 ac_cv_file__dev_ptmx=yes
14443else
14444 ac_cv_file__dev_ptmx=no
14445fi
14446fi
14447{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
14448$as_echo "$ac_cv_file__dev_ptmx" >&6; }
14449if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Martin v. Löwisfefbc202006-10-17 18:59:23 +000014450
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014451fi
14452
14453if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014454
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014455$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014456
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014457fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14459$as_echo_n "checking for /dev/ptc... " >&6; }
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014460if ${ac_cv_file__dev_ptc+:} false; then :
14461 $as_echo_n "(cached) " >&6
14462else
14463 test "$cross_compiling" = yes &&
14464 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14465if test -r "/dev/ptc"; then
14466 ac_cv_file__dev_ptc=yes
14467else
14468 ac_cv_file__dev_ptc=no
14469fi
14470fi
14471{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
14472$as_echo "$ac_cv_file__dev_ptc" >&6; }
14473if test "x$ac_cv_file__dev_ptc" = xyes; then :
Martin v. Löwisfefbc202006-10-17 18:59:23 +000014474
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014475fi
14476
14477if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000014478
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014479$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000014480
Neal Norwitz865400f2003-03-21 01:42:58 +000014481fi
14482
Mark Dickinson82864d12009-11-15 16:18:58 +000014483if test "$have_long_long" = yes
14484then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014485 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
14486$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014487 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014488 $as_echo_n "(cached) " >&6
Mark Dickinson82864d12009-11-15 16:18:58 +000014489else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014490 if test "$cross_compiling" = yes; then :
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014491 ac_cv_have_long_long_format="cross -- assuming no"
14492 if test x$GCC = xyes; then
14493 save_CFLAGS=$CFLAGS
14494 CFLAGS="$CFLAGS -Werror -Wformat"
14495 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14496/* end confdefs.h. */
14497
14498 #include <stdio.h>
14499 #include <stddef.h>
14500
14501int
14502main ()
14503{
14504
14505 char *buffer;
14506 sprintf(buffer, "%lld", (long long)123);
14507 sprintf(buffer, "%lld", (long long)-123);
14508 sprintf(buffer, "%llu", (unsigned long long)123);
14509
14510 ;
14511 return 0;
14512}
14513_ACEOF
14514if ac_fn_c_try_compile "$LINENO"; then :
14515 ac_cv_have_long_long_format=yes
14516
14517fi
14518rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14519 CFLAGS=$save_CFLAGS
14520 fi
Mark Dickinson82864d12009-11-15 16:18:58 +000014521else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014522 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson82864d12009-11-15 16:18:58 +000014523/* end confdefs.h. */
14524
14525 #include <stdio.h>
14526 #include <stddef.h>
14527 #include <string.h>
14528
14529 #ifdef HAVE_SYS_TYPES_H
14530 #include <sys/types.h>
14531 #endif
14532
14533 int main()
14534 {
14535 char buffer[256];
14536
14537 if (sprintf(buffer, "%lld", (long long)123) < 0)
14538 return 1;
14539 if (strcmp(buffer, "123"))
14540 return 1;
14541
14542 if (sprintf(buffer, "%lld", (long long)-123) < 0)
14543 return 1;
14544 if (strcmp(buffer, "-123"))
14545 return 1;
14546
14547 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
14548 return 1;
14549 if (strcmp(buffer, "123"))
14550 return 1;
14551
14552 return 0;
14553 }
14554
14555_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014556if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson82864d12009-11-15 16:18:58 +000014557 ac_cv_have_long_long_format=yes
14558else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014559 ac_cv_have_long_long_format=no
Mark Dickinson82864d12009-11-15 16:18:58 +000014560fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014561rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14562 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson82864d12009-11-15 16:18:58 +000014563fi
14564
14565
Mark Dickinson82864d12009-11-15 16:18:58 +000014566fi
14567
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014568 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
14569$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson82864d12009-11-15 16:18:58 +000014570fi
14571
Mark Dickinson5ce84742009-12-31 20:48:04 +000014572if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson82864d12009-11-15 16:18:58 +000014573then
14574
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014575$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson82864d12009-11-15 16:18:58 +000014576
14577fi
14578
Ronald Oussoren315cd0c2009-11-19 16:25:21 +000014579if test $ac_sys_system = Darwin
14580then
14581 LIBS="$LIBS -framework CoreFoundation"
14582fi
14583
Mark Dickinson82864d12009-11-15 16:18:58 +000014584
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
14586$as_echo_n "checking for %zd printf() format support... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014587if ${ac_cv_have_size_t_format+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014588 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014589else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014590 if test "$cross_compiling" = yes; then :
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000014591 ac_cv_have_size_t_format="cross -- assuming yes"
14592
Brett Cannon09d12362006-05-11 05:11:33 +000014593else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014594 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon09d12362006-05-11 05:11:33 +000014595/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014596
Brett Cannon09d12362006-05-11 05:11:33 +000014597#include <stdio.h>
14598#include <stddef.h>
14599#include <string.h>
14600
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000014601#ifdef HAVE_SYS_TYPES_H
14602#include <sys/types.h>
14603#endif
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000014604
14605#ifdef HAVE_SSIZE_T
14606typedef ssize_t Py_ssize_t;
14607#elif SIZEOF_VOID_P == SIZEOF_LONG
14608typedef long Py_ssize_t;
14609#else
14610typedef int Py_ssize_t;
14611#endif
Brett Cannon09d12362006-05-11 05:11:33 +000014612
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000014613int main()
14614{
14615 char buffer[256];
14616
Brett Cannon09d12362006-05-11 05:11:33 +000014617 if(sprintf(buffer, "%zd", (size_t)123) < 0)
14618 return 1;
14619
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000014620 if (strcmp(buffer, "123"))
14621 return 1;
14622
14623 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
14624 return 1;
14625
14626 if (strcmp(buffer, "-123"))
Brett Cannon09d12362006-05-11 05:11:33 +000014627 return 1;
14628
14629 return 0;
14630}
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014631
Brett Cannon09d12362006-05-11 05:11:33 +000014632_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014633if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014634 ac_cv_have_size_t_format=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014635else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014636 ac_cv_have_size_t_format=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014637fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014638rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14639 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000014640fi
14641
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014642fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014643{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
14644$as_echo "$ac_cv_have_size_t_format" >&6; }
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000014645if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014646
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014647$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014648
14649fi
14650
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014651ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000014652#ifdef HAVE_SYS_TYPES_H
14653#include <sys/types.h>
14654#endif
14655#ifdef HAVE_SYS_SOCKET_H
14656#include <sys/socket.h>
14657#endif
14658
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014659"
Matthias Klose3cef2a92012-03-14 23:39:33 +010014660if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000014661
Martin v. Löwis11437992002-04-12 09:54:03 +000014662else
Guido van Rossum95713eb2000-05-18 20:53:31 +000014663
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014664$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000014665
14666fi
14667
Michael W. Hudson54241132001-12-07 15:38:26 +000014668
Benjamin Peterson7497e912010-10-16 00:53:39 +000014669case $ac_sys_system in
14670AIX*)
14671
14672$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
14673 ;;
14674esac
14675
14676
Michael W. Hudson54241132001-12-07 15:38:26 +000014677
14678
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000014679for h in `(cd $srcdir;echo Python/thread_*.h)`
14680do
14681 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
14682done
14683
Michael W. Hudson54241132001-12-07 15:38:26 +000014684
Neal Norwitzd24499d2005-12-18 21:36:39 +000014685SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
14687$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014688for dir in $SRCDIRS; do
14689 if test ! -d $dir; then
14690 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000014691 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014692done
Benjamin Peterson2c992a02015-05-28 12:45:31 -050014693
14694# BEGIN_COMPUTED_GOTO
14695# Check for --with-computed-gotos
14696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
14697$as_echo_n "checking for --with-computed-gotos... " >&6; }
14698
14699# Check whether --with-computed-gotos was given.
14700if test "${with_computed_gotos+set}" = set; then :
14701 withval=$with_computed_gotos;
14702if test "$withval" = yes
14703then
14704
14705$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
14706
14707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14708$as_echo "yes" >&6; }
14709fi
14710if test "$withval" = no
14711then
14712
14713$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
14714
14715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14716$as_echo "no" >&6; }
14717fi
14718
14719else
14720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14721$as_echo "no value specified" >&6; }
14722fi
14723
14724
14725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
14726$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
14727if ${ac_cv_computed_gotos+:} false; then :
14728 $as_echo_n "(cached) " >&6
14729else
14730 if test "$cross_compiling" = yes; then :
14731 if test "${with_computed_gotos+set}" = set; then
14732 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
14733 else
14734 ac_cv_computed_gotos=no
14735 fi
14736else
14737 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14738/* end confdefs.h. */
14739
14740int main(int argc, char **argv)
14741{
14742 static void *targets[1] = { &&LABEL1 };
14743 goto LABEL2;
14744LABEL1:
14745 return 0;
14746LABEL2:
14747 goto *targets[0];
14748 return 1;
14749}
14750
14751_ACEOF
14752if ac_fn_c_try_run "$LINENO"; then :
14753 ac_cv_computed_gotos=yes
14754else
14755 ac_cv_computed_gotos=no
14756fi
14757rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14758 conftest.$ac_objext conftest.beam conftest.$ac_ext
14759fi
14760
14761fi
14762
14763{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
14764$as_echo "$ac_cv_computed_gotos" >&6; }
14765case "$ac_cv_computed_gotos" in yes*)
14766
14767$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
14768
14769esac
14770# END_COMPUTED_GOTO
14771
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014772{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
14773$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000014774
Ned Deily3f1d0b32014-11-20 02:11:03 -080014775# ensurepip option
14776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
14777$as_echo_n "checking for ensurepip... " >&6; }
14778
14779# Check whether --with-ensurepip was given.
14780if test "${with_ensurepip+set}" = set; then :
14781 withval=$with_ensurepip;
14782else
14783 with_ensurepip=no
14784fi
14785
14786case $with_ensurepip in #(
14787 yes|upgrade) :
14788 ENSUREPIP=upgrade ;; #(
14789 install) :
14790 ENSUREPIP=install ;; #(
14791 no) :
14792 ENSUREPIP=no ;; #(
14793 *) :
14794 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
14795esac
14796{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
14797$as_echo "$ENSUREPIP" >&6; }
14798
14799
Guido van Rossum627b2d71993-12-24 10:39:16 +000014800# generate output files
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000014801ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000014802
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000014803ac_config_files="$ac_config_files Modules/ld_so_aix"
14804
Martin v. Löwis11437992002-04-12 09:54:03 +000014805cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014806# This file is a shell script that caches the results of configure
14807# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000014808# scripts and configure runs, see configure's option --config-cache.
14809# It is not useful on other systems. If it contains results you don't
14810# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014811#
Martin v. Löwis11437992002-04-12 09:54:03 +000014812# config.status only pays attention to the cache file if you give it
14813# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014814#
Skip Montanaro6dead952003-09-25 14:50:04 +000014815# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000014816# loading this file, other *unset* `ac_cv_foo' will be assigned the
14817# following values.
14818
14819_ACEOF
14820
Guido van Rossumf78abae1997-01-21 22:02:36 +000014821# The following way of writing the cache mishandles newlines in values,
14822# but we know of no workaround that is simple, portable, and efficient.
Martin v. Löwiseba40652007-08-30 20:10:57 +000014823# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014824# Ultrix sh set writes to stderr and can't be redirected directly,
14825# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwiseba40652007-08-30 20:10:57 +000014826(
14827 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
14828 eval ac_val=\$$ac_var
14829 case $ac_val in #(
14830 *${as_nl}*)
14831 case $ac_var in #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014832 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
14833$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014834 esac
14835 case $ac_var in #(
14836 _ | IFS | as_nl) ;; #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014837 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
14838 *) { eval $ac_var=; unset $ac_var;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014839 esac ;;
14840 esac
14841 done
14842
Martin v. Löwis11437992002-04-12 09:54:03 +000014843 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +000014844 case $as_nl`(ac_space=' '; set) 2>&1` in #(
14845 *${as_nl}ac_space=\ *)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014846 # `set' does not quote correctly, so add quotes: double-quote
14847 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000014848 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014849 "s/'/'\\\\''/g;
14850 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Martin v. Löwiseba40652007-08-30 20:10:57 +000014851 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000014852 *)
14853 # `set' quotes correctly as required by POSIX, so do not add quotes.
Martin v. Löwiseba40652007-08-30 20:10:57 +000014854 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000014855 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014856 esac |
14857 sort
14858) |
Martin v. Löwis11437992002-04-12 09:54:03 +000014859 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000014860 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000014861 t clear
Martin v. Löwiseba40652007-08-30 20:10:57 +000014862 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000014863 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
14864 t end
Martin v. Löwiseba40652007-08-30 20:10:57 +000014865 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
14866 :end' >>confcache
14867if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
14868 if test -w "$cache_file"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +010014869 if test "x$cache_file" != "x/dev/null"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014870 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
14871$as_echo "$as_me: updating cache $cache_file" >&6;}
Matthias Klose3cef2a92012-03-14 23:39:33 +010014872 if test ! -f "$cache_file" || test -h "$cache_file"; then
14873 cat confcache >"$cache_file"
14874 else
14875 case $cache_file in #(
14876 */* | ?:*)
14877 mv -f confcache "$cache_file"$$ &&
14878 mv -f "$cache_file"$$ "$cache_file" ;; #(
14879 *)
14880 mv -f confcache "$cache_file" ;;
14881 esac
14882 fi
14883 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014884 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014885 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
14886$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014887 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014888fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014889rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000014890
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014891test "x$prefix" = xNONE && prefix=$ac_default_prefix
14892# Let make expand exec_prefix.
14893test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000014894
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014895DEFS=-DHAVE_CONFIG_H
14896
Skip Montanaro6dead952003-09-25 14:50:04 +000014897ac_libobjs=
14898ac_ltlibobjs=
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014899U=
Skip Montanaro6dead952003-09-25 14:50:04 +000014900for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
14901 # 1. Remove the extension, and $U if already installed.
Martin v. Löwiseba40652007-08-30 20:10:57 +000014902 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014903 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Martin v. Löwiseba40652007-08-30 20:10:57 +000014904 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
14905 # will be set to the directory where LIBOBJS objects are built.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014906 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
14907 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000014908done
14909LIBOBJS=$ac_libobjs
14910
14911LTLIBOBJS=$ac_ltlibobjs
14912
14913
Martin v. Löwis11437992002-04-12 09:54:03 +000014914
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014915
Matthias Klose3cef2a92012-03-14 23:39:33 +010014916: "${CONFIG_STATUS=./config.status}"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014917ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000014918ac_clean_files_save=$ac_clean_files
14919ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014920{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
14921$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
14922as_write_fail=0
14923cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014924#! $SHELL
14925# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000014926# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014927# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000014928# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000014929
Martin v. Löwis11437992002-04-12 09:54:03 +000014930debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000014931ac_cs_recheck=false
14932ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000014933
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014934SHELL=\${CONFIG_SHELL-$SHELL}
14935export SHELL
14936_ASEOF
14937cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
14938## -------------------- ##
14939## M4sh Initialization. ##
14940## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000014941
Martin v. Löwiseba40652007-08-30 20:10:57 +000014942# Be more Bourne compatible
14943DUALCASE=1; export DUALCASE # for MKS sh
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014944if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014945 emulate sh
14946 NULLCMD=:
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014947 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000014948 # is contrary to our usage. Disable this feature.
14949 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000014950 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000014951else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014952 case `(set -o) 2>/dev/null` in #(
14953 *posix*) :
14954 set -o posix ;; #(
14955 *) :
14956 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014957esac
Martin v. Löwis11437992002-04-12 09:54:03 +000014958fi
Michael W. Hudson54241132001-12-07 15:38:26 +000014959
Skip Montanaro6dead952003-09-25 14:50:04 +000014960
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014961as_nl='
14962'
14963export as_nl
14964# Printing a long string crashes Solaris 7 /usr/bin/printf.
14965as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
14966as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
14967as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
14968# Prefer a ksh shell builtin over an external printf program on Solaris,
14969# but without wasting forks for bash or zsh.
14970if test -z "$BASH_VERSION$ZSH_VERSION" \
14971 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
14972 as_echo='print -r --'
14973 as_echo_n='print -rn --'
14974elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
14975 as_echo='printf %s\n'
14976 as_echo_n='printf %s'
14977else
14978 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
14979 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
14980 as_echo_n='/usr/ucb/echo -n'
14981 else
14982 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
14983 as_echo_n_body='eval
14984 arg=$1;
14985 case $arg in #(
14986 *"$as_nl"*)
14987 expr "X$arg" : "X\\(.*\\)$as_nl";
14988 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
14989 esac;
14990 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
14991 '
14992 export as_echo_n_body
14993 as_echo_n='sh -c $as_echo_n_body as_echo'
14994 fi
14995 export as_echo_body
14996 as_echo='sh -c $as_echo_body as_echo'
14997fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014998
14999# The user is always right.
15000if test "${PATH_SEPARATOR+set}" != set; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015001 PATH_SEPARATOR=:
15002 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
15003 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
15004 PATH_SEPARATOR=';'
15005 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000015006fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015007
Martin v. Löwiseba40652007-08-30 20:10:57 +000015008
15009# IFS
15010# We need space, tab and new line, in precisely that order. Quoting is
15011# there to prevent editors from complaining about space-tab.
15012# (If _AS_PATH_WALK were called with IFS unset, it would disable word
15013# splitting by setting IFS to empty value.)
Martin v. Löwiseba40652007-08-30 20:10:57 +000015014IFS=" "" $as_nl"
15015
15016# Find who we are. Look in the path if we contain no directory separator.
Matthias Klose3cef2a92012-03-14 23:39:33 +010015017as_myself=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015018case $0 in #((
Martin v. Löwiseba40652007-08-30 20:10:57 +000015019 *[\\/]* ) as_myself=$0 ;;
15020 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000015021for as_dir in $PATH
15022do
15023 IFS=$as_save_IFS
15024 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015025 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
15026 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000015027IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000015028
Martin v. Löwiseba40652007-08-30 20:10:57 +000015029 ;;
15030esac
15031# We did not find ourselves, most probably we were run as `sh COMMAND'
15032# in which case we are not to be found in the path.
15033if test "x$as_myself" = x; then
15034 as_myself=$0
15035fi
15036if test ! -f "$as_myself"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015037 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
15038 exit 1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015039fi
15040
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015041# Unset variables that we do not need and which cause bugs (e.g. in
15042# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
15043# suppresses any "Segmentation fault" message there. '((' could
15044# trigger a bug in pdksh 5.2.14.
15045for as_var in BASH_ENV ENV MAIL MAILPATH
15046do eval test x\${$as_var+set} = xset \
15047 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Martin v. Löwiseba40652007-08-30 20:10:57 +000015048done
15049PS1='$ '
15050PS2='> '
15051PS4='+ '
15052
15053# NLS nuisances.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015054LC_ALL=C
15055export LC_ALL
15056LANGUAGE=C
15057export LANGUAGE
Martin v. Löwiseba40652007-08-30 20:10:57 +000015058
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015059# CDPATH.
15060(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
15061
15062
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015063# as_fn_error STATUS ERROR [LINENO LOG_FD]
15064# ----------------------------------------
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015065# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
15066# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015067# script with STATUS, using 1 if that was 0.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015068as_fn_error ()
15069{
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015070 as_status=$1; test $as_status -eq 0 && as_status=1
15071 if test "$4"; then
15072 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
15073 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015074 fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015075 $as_echo "$as_me: error: $2" >&2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015076 as_fn_exit $as_status
15077} # as_fn_error
15078
15079
15080# as_fn_set_status STATUS
15081# -----------------------
15082# Set $? to STATUS, without forking.
15083as_fn_set_status ()
15084{
15085 return $1
15086} # as_fn_set_status
15087
15088# as_fn_exit STATUS
15089# -----------------
15090# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
15091as_fn_exit ()
15092{
15093 set +e
15094 as_fn_set_status $1
15095 exit $1
15096} # as_fn_exit
15097
15098# as_fn_unset VAR
15099# ---------------
15100# Portably unset VAR.
15101as_fn_unset ()
15102{
15103 { eval $1=; unset $1;}
15104}
15105as_unset=as_fn_unset
15106# as_fn_append VAR VALUE
15107# ----------------------
15108# Append the text in VALUE to the end of the definition contained in VAR. Take
15109# advantage of any shell optimizations that allow amortized linear growth over
15110# repeated appends, instead of the typical quadratic growth present in naive
15111# implementations.
15112if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
15113 eval 'as_fn_append ()
15114 {
15115 eval $1+=\$2
15116 }'
15117else
15118 as_fn_append ()
15119 {
15120 eval $1=\$$1\$2
15121 }
15122fi # as_fn_append
15123
15124# as_fn_arith ARG...
15125# ------------------
15126# Perform arithmetic evaluation on the ARGs, and store the result in the
15127# global $as_val. Take advantage of shells that can avoid forks. The arguments
15128# must be portable across $(()) and expr.
15129if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
15130 eval 'as_fn_arith ()
15131 {
15132 as_val=$(( $* ))
15133 }'
15134else
15135 as_fn_arith ()
15136 {
15137 as_val=`expr "$@" || test $? -eq 1`
15138 }
15139fi # as_fn_arith
15140
15141
Martin v. Löwiseba40652007-08-30 20:10:57 +000015142if expr a : '\(a\)' >/dev/null 2>&1 &&
15143 test "X`expr 00001 : '.*\(...\)'`" = X001; then
15144 as_expr=expr
15145else
15146 as_expr=false
15147fi
15148
15149if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
15150 as_basename=basename
15151else
15152 as_basename=false
15153fi
15154
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015155if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
15156 as_dirname=dirname
15157else
15158 as_dirname=false
15159fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015160
Martin v. Löwiseba40652007-08-30 20:10:57 +000015161as_me=`$as_basename -- "$0" ||
15162$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15163 X"$0" : 'X\(//\)$' \| \
15164 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015165$as_echo X/"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000015166 sed '/^.*\/\([^/][^/]*\)\/*$/{
15167 s//\1/
15168 q
15169 }
15170 /^X\/\(\/\/\)$/{
15171 s//\1/
15172 q
15173 }
15174 /^X\/\(\/\).*/{
15175 s//\1/
15176 q
15177 }
15178 s/.*/./; q'`
15179
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015180# Avoid depending upon Character Ranges.
15181as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15182as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15183as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15184as_cr_digits='0123456789'
15185as_cr_alnum=$as_cr_Letters$as_cr_digits
Martin v. Löwiseba40652007-08-30 20:10:57 +000015186
15187ECHO_C= ECHO_N= ECHO_T=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015188case `echo -n x` in #(((((
Martin v. Löwiseba40652007-08-30 20:10:57 +000015189-n*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015190 case `echo 'xy\c'` in
Martin v. Löwiseba40652007-08-30 20:10:57 +000015191 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015192 xy) ECHO_C='\c';;
15193 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
15194 ECHO_T=' ';;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015195 esac;;
15196*)
15197 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000015198esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015199
Martin v. Löwis11437992002-04-12 09:54:03 +000015200rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +000015201if test -d conf$$.dir; then
15202 rm -f conf$$.dir/conf$$.file
15203else
15204 rm -f conf$$.dir
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015205 mkdir conf$$.dir 2>/dev/null
Martin v. Löwiseba40652007-08-30 20:10:57 +000015206fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015207if (echo >conf$$.file) 2>/dev/null; then
15208 if ln -s conf$$.file conf$$ 2>/dev/null; then
15209 as_ln_s='ln -s'
15210 # ... but there are two gotchas:
15211 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
15212 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015213 # In both cases, we have to default to `cp -pR'.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015214 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015215 as_ln_s='cp -pR'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015216 elif ln conf$$.file conf$$ 2>/dev/null; then
15217 as_ln_s=ln
15218 else
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015219 as_ln_s='cp -pR'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015220 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015221else
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015222 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000015223fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015224rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
15225rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000015226
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015227
15228# as_fn_mkdir_p
15229# -------------
15230# Create "$as_dir" as a directory, including parents if necessary.
15231as_fn_mkdir_p ()
15232{
15233
15234 case $as_dir in #(
15235 -*) as_dir=./$as_dir;;
15236 esac
15237 test -d "$as_dir" || eval $as_mkdir_p || {
15238 as_dirs=
15239 while :; do
15240 case $as_dir in #(
15241 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
15242 *) as_qdir=$as_dir;;
15243 esac
15244 as_dirs="'$as_qdir' $as_dirs"
15245 as_dir=`$as_dirname -- "$as_dir" ||
15246$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15247 X"$as_dir" : 'X\(//\)[^/]' \| \
15248 X"$as_dir" : 'X\(//\)$' \| \
15249 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
15250$as_echo X"$as_dir" |
15251 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15252 s//\1/
15253 q
15254 }
15255 /^X\(\/\/\)[^/].*/{
15256 s//\1/
15257 q
15258 }
15259 /^X\(\/\/\)$/{
15260 s//\1/
15261 q
15262 }
15263 /^X\(\/\).*/{
15264 s//\1/
15265 q
15266 }
15267 s/.*/./; q'`
15268 test -d "$as_dir" && break
15269 done
15270 test -z "$as_dirs" || eval "mkdir $as_dirs"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015271 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015272
15273
15274} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000015275if mkdir -p . 2>/dev/null; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015276 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000015277else
Skip Montanarof0d5f792004-08-15 14:08:23 +000015278 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000015279 as_mkdir_p=false
15280fi
15281
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015282
15283# as_fn_executable_p FILE
15284# -----------------------
15285# Test if FILE is an executable regular file.
15286as_fn_executable_p ()
15287{
15288 test -f "$1" && test -x "$1"
15289} # as_fn_executable_p
15290as_test_x='test -x'
15291as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000015292
15293# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015294as_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 +000015295
15296# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015297as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015298
15299
Martin v. Löwis11437992002-04-12 09:54:03 +000015300exec 6>&1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015301## ----------------------------------- ##
15302## Main body of $CONFIG_STATUS script. ##
15303## ----------------------------------- ##
15304_ASEOF
15305test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015306
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015307cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15308# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000015309# report actual input values of CONFIG_FILES etc. instead of their
Martin v. Löwiseba40652007-08-30 20:10:57 +000015310# values after options handling.
15311ac_log="
Martin v. Löwis174440b2008-10-03 08:59:41 +000015312This file was extended by python $as_me 2.7, which was
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015313generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000015314
15315 CONFIG_FILES = $CONFIG_FILES
15316 CONFIG_HEADERS = $CONFIG_HEADERS
15317 CONFIG_LINKS = $CONFIG_LINKS
15318 CONFIG_COMMANDS = $CONFIG_COMMANDS
15319 $ $0 $@
15320
Martin v. Löwiseba40652007-08-30 20:10:57 +000015321on `(hostname || uname -n) 2>/dev/null | sed 1q`
15322"
15323
Martin v. Löwis11437992002-04-12 09:54:03 +000015324_ACEOF
15325
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015326case $ac_config_files in *"
15327"*) set x $ac_config_files; shift; ac_config_files=$*;;
15328esac
15329
15330case $ac_config_headers in *"
15331"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
15332esac
15333
15334
15335cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015336# Files that config.status was made for.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015337config_files="$ac_config_files"
15338config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000015339
Martin v. Löwiseba40652007-08-30 20:10:57 +000015340_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015341
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015342cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015343ac_cs_usage="\
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015344\`$as_me' instantiates files and other configuration actions
15345from templates according to the current configuration. Unless the files
15346and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000015347
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015348Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000015349
15350 -h, --help print this help, then exit
Martin v. Löwiseba40652007-08-30 20:10:57 +000015351 -V, --version print version number and configuration settings, then exit
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015352 --config print configuration, then exit
15353 -q, --quiet, --silent
15354 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000015355 -d, --debug don't remove temporary files
15356 --recheck update $as_me by reconfiguring in the same conditions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015357 --file=FILE[:TEMPLATE]
15358 instantiate the configuration file FILE
15359 --header=FILE[:TEMPLATE]
15360 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000015361
15362Configuration files:
15363$config_files
15364
15365Configuration headers:
15366$config_headers
15367
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015368Report bugs to <http://bugs.python.org/>."
Skip Montanaro89e975f2007-08-22 19:05:21 +000015369
Martin v. Löwiseba40652007-08-30 20:10:57 +000015370_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015371cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15372ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000015373ac_cs_version="\\
Martin v. Löwis174440b2008-10-03 08:59:41 +000015374python config.status 2.7
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015375configured by $0, generated by GNU Autoconf 2.69,
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015376 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000015377
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015378Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000015379This config.status script is free software; the Free Software Foundation
15380gives unlimited permission to copy, distribute and modify it."
Martin v. Löwiseba40652007-08-30 20:10:57 +000015381
15382ac_pwd='$ac_pwd'
15383srcdir='$srcdir'
15384INSTALL='$INSTALL'
Trent Nelsonf6407a12012-08-30 14:56:13 +000015385MKDIR_P='$MKDIR_P'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015386test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000015387_ACEOF
15388
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015389cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15390# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000015391ac_need_defaults=:
15392while test $# != 0
15393do
15394 case $1 in
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015395 --*=?*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000015396 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15397 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000015398 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000015399 ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015400 --*=)
15401 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15402 ac_optarg=
15403 ac_shift=:
15404 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015405 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000015406 ac_option=$1
15407 ac_optarg=$2
15408 ac_shift=shift
15409 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015410 esac
15411
Skip Montanaro6dead952003-09-25 14:50:04 +000015412 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000015413 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000015414 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15415 ac_cs_recheck=: ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015416 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015417 $as_echo "$ac_cs_version"; exit ;;
15418 --config | --confi | --conf | --con | --co | --c )
15419 $as_echo "$ac_cs_config"; exit ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015420 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000015421 debug=: ;;
15422 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000015423 $ac_shift
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015424 case $ac_optarg in
15425 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015426 '') as_fn_error $? "missing file argument" ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015427 esac
15428 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015429 ac_need_defaults=false;;
15430 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000015431 $ac_shift
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015432 case $ac_optarg in
15433 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15434 esac
15435 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015436 ac_need_defaults=false;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015437 --he | --h)
15438 # Conflict between --help and --header
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015439 as_fn_error $? "ambiguous option: \`$1'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015440Try \`$0 --help' for more information.";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015441 --help | --hel | -h )
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015442 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000015443 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
15444 | -silent | --silent | --silen | --sile | --sil | --si | --s)
15445 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015446
15447 # This is an error.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015448 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015449Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015450
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015451 *) as_fn_append ac_config_targets " $1"
Martin v. Löwiseba40652007-08-30 20:10:57 +000015452 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015453
15454 esac
15455 shift
15456done
15457
Skip Montanaro6dead952003-09-25 14:50:04 +000015458ac_configure_extra_args=
15459
15460if $ac_cs_silent; then
15461 exec 6>/dev/null
15462 ac_configure_extra_args="$ac_configure_extra_args --silent"
15463fi
15464
15465_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015466cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000015467if \$ac_cs_recheck; then
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015468 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015469 shift
15470 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
15471 CONFIG_SHELL='$SHELL'
Martin v. Löwiseba40652007-08-30 20:10:57 +000015472 export CONFIG_SHELL
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015473 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000015474fi
15475
Martin v. Löwis11437992002-04-12 09:54:03 +000015476_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015477cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015478exec 5>>config.log
15479{
15480 echo
15481 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
15482## Running $as_me. ##
15483_ASBOX
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015484 $as_echo "$ac_log"
Martin v. Löwiseba40652007-08-30 20:10:57 +000015485} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015486
Martin v. Löwiseba40652007-08-30 20:10:57 +000015487_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015488cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015489_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015490
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015491cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015492
15493# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000015494for ac_config_target in $ac_config_targets
15495do
Martin v. Löwiseba40652007-08-30 20:10:57 +000015496 case $ac_config_target in
15497 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
15498 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
15499 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
15500 "Mac/IDLE/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/IDLE/Makefile" ;;
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000015501 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
15502 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015503 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
15504 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000015505 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000015506 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015507
Matthias Klose3cef2a92012-03-14 23:39:33 +010015508 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015509 esac
15510done
15511
Martin v. Löwiseba40652007-08-30 20:10:57 +000015512
Martin v. Löwis11437992002-04-12 09:54:03 +000015513# If the user did not use the arguments to specify the items to instantiate,
15514# then the envvar interface is used. Set only those that are not.
15515# We use the long form for the default assignment because of an extremely
15516# bizarre bug on SunOS 4.1.3.
15517if $ac_need_defaults; then
15518 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15519 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
15520fi
15521
Skip Montanaro6dead952003-09-25 14:50:04 +000015522# Have a temporary directory for convenience. Make it in the build tree
Martin v. Löwiseba40652007-08-30 20:10:57 +000015523# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000015524# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015525# Hook for its removal unless debugging.
15526# Note that there is a small window in which the directory will not be cleaned:
15527# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000015528$debug ||
15529{
Matthias Klose3cef2a92012-03-14 23:39:33 +010015530 tmp= ac_tmp=
Martin v. Löwiseba40652007-08-30 20:10:57 +000015531 trap 'exit_status=$?
Matthias Klose3cef2a92012-03-14 23:39:33 +010015532 : "${ac_tmp:=$tmp}"
15533 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +000015534' 0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015535 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000015536}
Martin v. Löwis11437992002-04-12 09:54:03 +000015537# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000015538
Martin v. Löwis11437992002-04-12 09:54:03 +000015539{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015540 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Matthias Klose3cef2a92012-03-14 23:39:33 +010015541 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000015542} ||
15543{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015544 tmp=./conf$$-$RANDOM
15545 (umask 077 && mkdir "$tmp")
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015546} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Matthias Klose3cef2a92012-03-14 23:39:33 +010015547ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000015548
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015549# Set up the scripts for CONFIG_FILES section.
15550# No need to generate them if there are no CONFIG_FILES.
15551# This happens for instance with `./config.status config.h'.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015552if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015553
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015554
15555ac_cr=`echo X | tr X '\015'`
15556# On cygwin, bash can eat \r inside `` if the user requested igncr.
15557# But we know of no other shell where ac_cr would be empty at this
15558# point, so we can use a bashism as a fallback.
15559if test "x$ac_cr" = x; then
15560 eval ac_cr=\$\'\\r\'
15561fi
15562ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
15563if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015564 ac_cs_awk_cr='\\r'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015565else
15566 ac_cs_awk_cr=$ac_cr
15567fi
15568
Matthias Klose3cef2a92012-03-14 23:39:33 +010015569echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000015570_ACEOF
15571
Martin v. Löwiseba40652007-08-30 20:10:57 +000015572
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015573{
15574 echo "cat >conf$$subs.awk <<_ACEOF" &&
15575 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
15576 echo "_ACEOF"
15577} >conf$$subs.sh ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015578 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15579ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015580ac_delim='%!_!# '
15581for ac_last_try in false false false false false :; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015582 . ./conf$$subs.sh ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015583 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015584
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015585 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
15586 if test $ac_delim_n = $ac_delim_num; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015587 break
15588 elif $ac_last_try; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015589 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015590 else
15591 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000015592 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015593done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015594rm -f conf$$subs.sh
Martin v. Löwiseba40652007-08-30 20:10:57 +000015595
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015596cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Matthias Klose3cef2a92012-03-14 23:39:33 +010015597cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000015598_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015599sed -n '
15600h
15601s/^/S["/; s/!.*/"]=/
15602p
15603g
15604s/^[^!]*!//
15605:repl
15606t repl
15607s/'"$ac_delim"'$//
15608t delim
15609:nl
15610h
15611s/\(.\{148\}\)..*/\1/
15612t more1
15613s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
15614p
15615n
15616b repl
15617:more1
15618s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15619p
15620g
15621s/.\{148\}//
15622t nl
15623:delim
15624h
15625s/\(.\{148\}\)..*/\1/
15626t more2
15627s/["\\]/\\&/g; s/^/"/; s/$/"/
15628p
15629b
15630:more2
15631s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15632p
15633g
15634s/.\{148\}//
15635t delim
15636' <conf$$subs.awk | sed '
15637/^[^""]/{
15638 N
15639 s/\n//
15640}
15641' >>$CONFIG_STATUS || ac_write_fail=1
15642rm -f conf$$subs.awk
15643cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15644_ACAWK
Matthias Klose3cef2a92012-03-14 23:39:33 +010015645cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015646 for (key in S) S_is_set[key] = 1
15647 FS = ""
15648
15649}
15650{
15651 line = $ 0
15652 nfields = split(line, field, "@")
15653 substed = 0
15654 len = length(field[1])
15655 for (i = 2; i < nfields; i++) {
15656 key = field[i]
15657 keylen = length(key)
15658 if (S_is_set[key]) {
15659 value = S[key]
15660 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
15661 len += length(value) + length(field[++i])
15662 substed = 1
15663 } else
15664 len += 1 + keylen
15665 }
15666
15667 print line
15668}
15669
15670_ACAWK
Martin v. Löwiseba40652007-08-30 20:10:57 +000015671_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015672cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15673if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
15674 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
15675else
15676 cat
Matthias Klose3cef2a92012-03-14 23:39:33 +010015677fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015678 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015679_ACEOF
15680
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015681# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
15682# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Martin v. Löwiseba40652007-08-30 20:10:57 +000015683# trailing colons and then remove the whole line if VPATH becomes empty
15684# (actually we leave an empty line to preserve line numbers).
15685if test "x$srcdir" = x.; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015686 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
15687h
15688s///
15689s/^/:/
15690s/[ ]*$/:/
15691s/:\$(srcdir):/:/g
15692s/:\${srcdir}:/:/g
15693s/:@srcdir@:/:/g
15694s/^:*//
Martin v. Löwiseba40652007-08-30 20:10:57 +000015695s/:*$//
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015696x
15697s/\(=[ ]*\).*/\1/
15698G
15699s/\n//
Martin v. Löwiseba40652007-08-30 20:10:57 +000015700s/^[^=]*=[ ]*$//
15701}'
15702fi
15703
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015704cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015705fi # test -n "$CONFIG_FILES"
15706
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015707# Set up the scripts for CONFIG_HEADERS section.
15708# No need to generate them if there are no CONFIG_HEADERS.
15709# This happens for instance with `./config.status Makefile'.
15710if test -n "$CONFIG_HEADERS"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +010015711cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015712BEGIN {
15713_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000015714
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015715# Transform confdefs.h into an awk script `defines.awk', embedded as
15716# here-document in config.status, that substitutes the proper values into
15717# config.h.in to produce config.h.
15718
15719# Create a delimiter string that does not exist in confdefs.h, to ease
15720# handling of long lines.
15721ac_delim='%!_!# '
15722for ac_last_try in false false :; do
Matthias Klose3cef2a92012-03-14 23:39:33 +010015723 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
15724 if test -z "$ac_tt"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015725 break
15726 elif $ac_last_try; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015727 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015728 else
15729 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
15730 fi
15731done
15732
15733# For the awk script, D is an array of macro values keyed by name,
15734# likewise P contains macro parameters if any. Preserve backslash
15735# newline sequences.
15736
15737ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
15738sed -n '
15739s/.\{148\}/&'"$ac_delim"'/g
15740t rset
15741:rset
15742s/^[ ]*#[ ]*define[ ][ ]*/ /
15743t def
15744d
15745:def
15746s/\\$//
15747t bsnl
15748s/["\\]/\\&/g
15749s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
15750D["\1"]=" \3"/p
15751s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
15752d
15753:bsnl
15754s/["\\]/\\&/g
15755s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
15756D["\1"]=" \3\\\\\\n"\\/p
15757t cont
15758s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
15759t cont
15760d
15761:cont
15762n
15763s/.\{148\}/&'"$ac_delim"'/g
15764t clear
15765:clear
15766s/\\$//
15767t bsnlc
15768s/["\\]/\\&/g; s/^/"/; s/$/"/p
15769d
15770:bsnlc
15771s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
15772b cont
15773' <confdefs.h | sed '
15774s/'"$ac_delim"'/"\\\
15775"/g' >>$CONFIG_STATUS || ac_write_fail=1
15776
15777cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15778 for (key in D) D_is_set[key] = 1
15779 FS = ""
15780}
15781/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
15782 line = \$ 0
15783 split(line, arg, " ")
15784 if (arg[1] == "#") {
15785 defundef = arg[2]
15786 mac1 = arg[3]
15787 } else {
15788 defundef = substr(arg[1], 2)
15789 mac1 = arg[2]
15790 }
15791 split(mac1, mac2, "(") #)
15792 macro = mac2[1]
15793 prefix = substr(line, 1, index(line, defundef) - 1)
15794 if (D_is_set[macro]) {
15795 # Preserve the white space surrounding the "#".
15796 print prefix "define", macro P[macro] D[macro]
15797 next
15798 } else {
15799 # Replace #undef with comments. This is necessary, for example,
15800 # in the case of _POSIX_SOURCE, which is predefined and required
15801 # on some systems where configure will not decide to define it.
15802 if (defundef == "undef") {
15803 print "/*", prefix defundef, macro, "*/"
15804 next
15805 }
15806 }
15807}
15808{ print }
15809_ACAWK
15810_ACEOF
15811cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015812 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015813fi # test -n "$CONFIG_HEADERS"
15814
15815
15816eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
15817shift
15818for ac_tag
Martin v. Löwiseba40652007-08-30 20:10:57 +000015819do
15820 case $ac_tag in
15821 :[FHLC]) ac_mode=$ac_tag; continue;;
15822 esac
15823 case $ac_mode$ac_tag in
15824 :[FHL]*:*);;
Matthias Klose3cef2a92012-03-14 23:39:33 +010015825 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015826 :[FH]-) ac_tag=-:-;;
15827 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
15828 esac
15829 ac_save_IFS=$IFS
15830 IFS=:
15831 set x $ac_tag
15832 IFS=$ac_save_IFS
15833 shift
15834 ac_file=$1
15835 shift
15836
15837 case $ac_mode in
15838 :L) ac_source=$1;;
15839 :[FH])
15840 ac_file_inputs=
15841 for ac_f
15842 do
15843 case $ac_f in
Matthias Klose3cef2a92012-03-14 23:39:33 +010015844 -) ac_f="$ac_tmp/stdin";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015845 *) # Look for the file first in the build tree, then in the source tree
15846 # (if the path is not absolute). The absolute path cannot be DOS-style,
15847 # because $ac_f cannot contain `:'.
15848 test -f "$ac_f" ||
15849 case $ac_f in
15850 [\\/$]*) false;;
15851 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
15852 esac ||
Matthias Klose3cef2a92012-03-14 23:39:33 +010015853 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015854 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015855 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
15856 as_fn_append ac_file_inputs " '$ac_f'"
Martin v. Löwiseba40652007-08-30 20:10:57 +000015857 done
15858
15859 # Let's still pretend it is `configure' which instantiates (i.e., don't
15860 # use $as_me), people would be surprised to read:
15861 # /* config.h. Generated by config.status. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015862 configure_input='Generated from '`
15863 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
15864 `' by configure.'
Martin v. Löwiseba40652007-08-30 20:10:57 +000015865 if test x"$ac_file" != x-; then
15866 configure_input="$ac_file. $configure_input"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015867 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
15868$as_echo "$as_me: creating $ac_file" >&6;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000015869 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015870 # Neutralize special characters interpreted by sed in replacement strings.
15871 case $configure_input in #(
15872 *\&* | *\|* | *\\* )
15873 ac_sed_conf_input=`$as_echo "$configure_input" |
15874 sed 's/[\\\\&|]/\\\\&/g'`;; #(
15875 *) ac_sed_conf_input=$configure_input;;
15876 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000015877
15878 case $ac_tag in
Matthias Klose3cef2a92012-03-14 23:39:33 +010015879 *:-:* | *:-) cat >"$ac_tmp/stdin" \
15880 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015881 esac
15882 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015883 esac
15884
Martin v. Löwiseba40652007-08-30 20:10:57 +000015885 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000015886$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015887 X"$ac_file" : 'X\(//\)[^/]' \| \
15888 X"$ac_file" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000015889 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015890$as_echo X"$ac_file" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000015891 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15892 s//\1/
15893 q
15894 }
15895 /^X\(\/\/\)[^/].*/{
15896 s//\1/
15897 q
15898 }
15899 /^X\(\/\/\)$/{
15900 s//\1/
15901 q
15902 }
15903 /^X\(\/\).*/{
15904 s//\1/
15905 q
15906 }
15907 s/.*/./; q'`
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015908 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000015909 ac_builddir=.
15910
Martin v. Löwiseba40652007-08-30 20:10:57 +000015911case "$ac_dir" in
15912.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
15913*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015914 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015915 # A ".." for each directory in $ac_dir_suffix.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015916 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015917 case $ac_top_builddir_sub in
15918 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
15919 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
15920 esac ;;
15921esac
15922ac_abs_top_builddir=$ac_pwd
15923ac_abs_builddir=$ac_pwd$ac_dir_suffix
15924# for backward compatibility:
15925ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000015926
15927case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +000015928 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000015929 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015930 ac_top_srcdir=$ac_top_builddir_sub
15931 ac_abs_top_srcdir=$ac_pwd ;;
15932 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000015933 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015934 ac_top_srcdir=$srcdir
15935 ac_abs_top_srcdir=$srcdir ;;
15936 *) # Relative name.
15937 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
15938 ac_top_srcdir=$ac_top_build_prefix$srcdir
15939 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015940esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000015941ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000015942
Martin v. Löwis11437992002-04-12 09:54:03 +000015943
Martin v. Löwiseba40652007-08-30 20:10:57 +000015944 case $ac_mode in
15945 :F)
15946 #
15947 # CONFIG_FILE
15948 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015949
15950 case $INSTALL in
15951 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015952 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015953 esac
Trent Nelsonf6407a12012-08-30 14:56:13 +000015954 ac_MKDIR_P=$MKDIR_P
15955 case $MKDIR_P in
15956 [\\/$]* | ?:[\\/]* ) ;;
15957 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
15958 esac
Brett Cannon19fab762007-06-02 03:02:29 +000015959_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000015960
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015961cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015962# If the template does not know about datarootdir, expand it.
15963# FIXME: This hack should be removed a few years after 2.60.
15964ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015965ac_sed_dataroot='
15966/datarootdir/ {
Martin v. Löwiseba40652007-08-30 20:10:57 +000015967 p
15968 q
15969}
15970/@datadir@/p
15971/@docdir@/p
15972/@infodir@/p
15973/@localedir@/p
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015974/@mandir@/p'
15975case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Martin v. Löwiseba40652007-08-30 20:10:57 +000015976*datarootdir*) ac_datarootdir_seen=yes;;
15977*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015978 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
15979$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000015980_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015981cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015982 ac_datarootdir_hack='
15983 s&@datadir@&$datadir&g
15984 s&@docdir@&$docdir&g
15985 s&@infodir@&$infodir&g
15986 s&@localedir@&$localedir&g
15987 s&@mandir@&$mandir&g
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015988 s&\\\${datarootdir}&$datarootdir&g' ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015989esac
15990_ACEOF
15991
15992# Neutralize VPATH when `$srcdir' = `.'.
15993# Shell code in configure.ac might set extrasub.
15994# FIXME: do we really want to maintain this feature?
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015995cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15996ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000015997$extrasub
15998_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015999cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016000:t
16001/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016002s|@configure_input@|$ac_sed_conf_input|;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000016003s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016004s&@top_build_prefix@&$ac_top_build_prefix&;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000016005s&@srcdir@&$ac_srcdir&;t t
16006s&@abs_srcdir@&$ac_abs_srcdir&;t t
16007s&@top_srcdir@&$ac_top_srcdir&;t t
16008s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
16009s&@builddir@&$ac_builddir&;t t
16010s&@abs_builddir@&$ac_abs_builddir&;t t
16011s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
16012s&@INSTALL@&$ac_INSTALL&;t t
Trent Nelsonf6407a12012-08-30 14:56:13 +000016013s&@MKDIR_P@&$ac_MKDIR_P&;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000016014$ac_datarootdir_hack
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016015"
Matthias Klose3cef2a92012-03-14 23:39:33 +010016016eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
16017 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016018
Martin v. Löwiseba40652007-08-30 20:10:57 +000016019test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Matthias Klose3cef2a92012-03-14 23:39:33 +010016020 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
16021 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
16022 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016023 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016024which seems to be undefined. Please make sure it is defined" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016025$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016026which seems to be undefined. Please make sure it is defined" >&2;}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016027
Matthias Klose3cef2a92012-03-14 23:39:33 +010016028 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000016029 case $ac_file in
Matthias Klose3cef2a92012-03-14 23:39:33 +010016030 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
16031 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016032 esac \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016033 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016034 ;;
16035 :H)
16036 #
16037 # CONFIG_HEADER
16038 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016039 if test x"$ac_file" != x-; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016040 {
16041 $as_echo "/* $configure_input */" \
Matthias Klose3cef2a92012-03-14 23:39:33 +010016042 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
16043 } >"$ac_tmp/config.h" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016044 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Matthias Klose3cef2a92012-03-14 23:39:33 +010016045 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016046 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
16047$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016048 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016049 rm -f "$ac_file"
Matthias Klose3cef2a92012-03-14 23:39:33 +010016050 mv "$ac_tmp/config.h" "$ac_file" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016051 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016052 fi
16053 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016054 $as_echo "/* $configure_input */" \
Matthias Klose3cef2a92012-03-14 23:39:33 +010016055 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016056 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016057 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016058 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000016059
Martin v. Löwiseba40652007-08-30 20:10:57 +000016060
16061 esac
16062
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000016063
16064 case $ac_file$ac_mode in
16065 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
16066
16067 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000016068done # for ac_tag
16069
Guido van Rossum627b2d71993-12-24 10:39:16 +000016070
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016071as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000016072_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016073ac_clean_files=$ac_clean_files_save
16074
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016075test $ac_write_fail = 0 ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016076 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016077
Martin v. Löwis11437992002-04-12 09:54:03 +000016078
16079# configure is writing to config.log, and then calls config.status.
16080# config.status does its own redirection, appending to config.log.
16081# Unfortunately, on DOS this fails, as config.log is still kept open
16082# by configure, so config.status won't be able to write to it; its
16083# output is simply discarded. So we exec the FD to /dev/null,
16084# effectively closing config.log, so it can be properly (re)opened and
16085# appended to by config.status. When coming back to configure, we
16086# need to make the FD available again.
16087if test "$no_create" != yes; then
16088 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000016089 ac_config_status_args=
16090 test "$silent" = yes &&
16091 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000016092 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000016093 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000016094 exec 5>>config.log
16095 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16096 # would make configure fail if this is the last instruction.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016097 $ac_cs_success || as_fn_exit 1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016098fi
16099if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
16100 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
16101$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016102fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000016103
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016104
Martin v. Löwisf7afe952006-04-14 15:16:15 +000016105echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016106if test ! -f Modules/Setup
16107then
16108 cp $srcdir/Modules/Setup.dist Modules/Setup
16109fi
16110
Martin v. Löwisf7afe952006-04-14 15:16:15 +000016111echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016112if test ! -f Modules/Setup.local
16113then
16114 echo "# Edit this file for local setup changes" >Modules/Setup.local
16115fi
16116
16117echo "creating Makefile"
16118$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
16119 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000016120 Modules/Setup.local Modules/Setup
Skip Montanaro89e975f2007-08-22 19:05:21 +000016121
16122case $ac_sys_system in
16123BeOS)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016124 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000016125
16126 Support for BeOS is deprecated as of Python 2.6.
16127 See PEP 11 for the gory details.
16128 " >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016129$as_echo "$as_me: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000016130
16131 Support for BeOS is deprecated as of Python 2.6.
16132 See PEP 11 for the gory details.
16133 " >&2;}
16134 ;;
16135*) ;;
16136esac
16137
Neil Schemenauerc761fc82001-02-19 04:50:49 +000016138mv config.c Modules