blob: 1ba985f9f8e238937b942d31ba3ddba23cca9baa [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
710SGI_ABI
doko@python.orgd65e2ba2013-01-31 23:52:03 +0100711_PYTHON_HOST_PLATFORM
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000712MACHDEP
713FRAMEWORKINSTALLAPPSPREFIX
714FRAMEWORKUNIXTOOLSPREFIX
715FRAMEWORKALTINSTALLLAST
716FRAMEWORKALTINSTALLFIRST
717FRAMEWORKINSTALLLAST
718FRAMEWORKINSTALLFIRST
719PYTHONFRAMEWORKINSTALLDIR
720PYTHONFRAMEWORKPREFIX
721PYTHONFRAMEWORKDIR
722PYTHONFRAMEWORKIDENTIFIER
723PYTHONFRAMEWORK
724LIPO_32BIT_FLAGS
725ARCH_RUN_32BIT
726UNIVERSALSDK
727CONFIG_ARGS
728SOVERSION
729VERSION
doko@python.orgd65e2ba2013-01-31 23:52:03 +0100730PYTHON_FOR_BUILD
731host_os
732host_vendor
733host_cpu
734host
735build_os
736build_vendor
737build_cpu
738build
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000739target_alias
740host_alias
741build_alias
742LIBS
743ECHO_T
744ECHO_N
745ECHO_C
746DEFS
747mandir
748localedir
749libdir
750psdir
751pdfdir
752dvidir
753htmldir
754infodir
755docdir
756oldincludedir
757includedir
758localstatedir
759sharedstatedir
760sysconfdir
761datadir
762datarootdir
763libexecdir
764sbindir
765bindir
766program_transform_name
767prefix
768exec_prefix
769PACKAGE_URL
770PACKAGE_BUGREPORT
771PACKAGE_STRING
772PACKAGE_VERSION
773PACKAGE_TARNAME
774PACKAGE_NAME
775PATH_SEPARATOR
776SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000777ac_subst_files=''
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000778ac_user_opts='
779enable_option_checking
780enable_universalsdk
781with_universal_archs
782with_framework_name
783enable_framework
784with_gcc
785with_cxx_main
786with_suffix
787enable_shared
788enable_profiling
789with_pydebug
790enable_toolbox_glue
791with_libs
792with_system_expat
793with_system_ffi
Ned Deilya2a9f572013-10-25 00:30:10 -0700794with_tcltk_includes
795with_tcltk_libs
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000796with_dbmliborder
797with_signal_module
798with_dec_threads
799with_threads
800with_thread
801with_pth
802enable_ipv6
803with_doc_strings
804with_tsc
805with_pymalloc
806with_valgrind
807with_wctype_functions
808with_fpectl
809with_libm
810with_libc
811enable_big_digits
812enable_unicode
Ned Deily3f1d0b32014-11-20 02:11:03 -0800813with_ensurepip
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000814'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000815 ac_precious_vars='build_alias
816host_alias
817target_alias
818CC
819CFLAGS
820LDFLAGS
821LIBS
822CPPFLAGS
Benjamin Peterson64e8f6e2014-12-15 00:00:23 -0500823CPP
824PKG_CONFIG
825PKG_CONFIG_PATH
826PKG_CONFIG_LIBDIR'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000827
Guido van Rossum627b2d71993-12-24 10:39:16 +0000828
Guido van Rossum7f43da71994-08-01 12:15:30 +0000829# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000830ac_init_help=
831ac_init_version=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000832ac_unrecognized_opts=
833ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000834# The variables have the same names as the options, with
835# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000836cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000837exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000838no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000839no_recursion=
840prefix=NONE
841program_prefix=NONE
842program_suffix=NONE
843program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000844silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000845site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000846srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000847verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000848x_includes=NONE
849x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000850
851# Installation directory options.
852# These are left unexpanded so users can "make install exec_prefix=/foo"
853# and all the variables that are supposed to be based on exec_prefix
854# by default will actually change.
855# Use braces instead of parens because sh, perl, etc. also accept them.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000856# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000857bindir='${exec_prefix}/bin'
858sbindir='${exec_prefix}/sbin'
859libexecdir='${exec_prefix}/libexec'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000860datarootdir='${prefix}/share'
861datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000862sysconfdir='${prefix}/etc'
863sharedstatedir='${prefix}/com'
864localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000865includedir='${prefix}/include'
866oldincludedir='/usr/include'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000867docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
868infodir='${datarootdir}/info'
869htmldir='${docdir}'
870dvidir='${docdir}'
871pdfdir='${docdir}'
872psdir='${docdir}'
873libdir='${exec_prefix}/lib'
874localedir='${datarootdir}/locale'
875mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000876
Guido van Rossum7f43da71994-08-01 12:15:30 +0000877ac_prev=
Martin v. Löwiseba40652007-08-30 20:10:57 +0000878ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000879for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000880do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000881 # If the previous option needs an argument, assign it.
882 if test -n "$ac_prev"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +0000883 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000884 ac_prev=
885 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000886 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000887
Martin v. Löwiseba40652007-08-30 20:10:57 +0000888 case $ac_option in
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000889 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
890 *=) ac_optarg= ;;
891 *) ac_optarg=yes ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000892 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000893
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000894 # Accept the important Cygnus configure options, so we can diagnose typos.
895
Martin v. Löwiseba40652007-08-30 20:10:57 +0000896 case $ac_dashdash$ac_option in
897 --)
898 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000899
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000900 -bindir | --bindir | --bindi | --bind | --bin | --bi)
901 ac_prev=bindir ;;
902 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000903 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000904
905 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000906 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000907 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000908 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000909
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000910 -cache-file | --cache-file | --cache-fil | --cache-fi \
911 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
912 ac_prev=cache_file ;;
913 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
914 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000915 cache_file=$ac_optarg ;;
916
917 --config-cache | -C)
918 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000919
Martin v. Löwiseba40652007-08-30 20:10:57 +0000920 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000921 ac_prev=datadir ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000922 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000923 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000924
Martin v. Löwiseba40652007-08-30 20:10:57 +0000925 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
926 | --dataroo | --dataro | --datar)
927 ac_prev=datarootdir ;;
928 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
929 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
930 datarootdir=$ac_optarg ;;
931
Guido van Rossum7f43da71994-08-01 12:15:30 +0000932 -disable-* | --disable-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000933 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000934 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000935 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000936 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000937 ac_useropt_orig=$ac_useropt
938 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
939 case $ac_user_opts in
940 *"
941"enable_$ac_useropt"
942"*) ;;
943 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
944 ac_unrecognized_sep=', ';;
945 esac
946 eval enable_$ac_useropt=no ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000947
948 -docdir | --docdir | --docdi | --doc | --do)
949 ac_prev=docdir ;;
950 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
951 docdir=$ac_optarg ;;
952
953 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
954 ac_prev=dvidir ;;
955 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
956 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000957
958 -enable-* | --enable-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000959 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000960 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000961 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000962 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000963 ac_useropt_orig=$ac_useropt
964 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
965 case $ac_user_opts in
966 *"
967"enable_$ac_useropt"
968"*) ;;
969 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
970 ac_unrecognized_sep=', ';;
971 esac
972 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000973
Guido van Rossum7f43da71994-08-01 12:15:30 +0000974 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
975 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
976 | --exec | --exe | --ex)
977 ac_prev=exec_prefix ;;
978 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
979 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
980 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000981 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000982
983 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000984 # Obsolete; use --with-gas.
985 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000986
Martin v. Löwis11437992002-04-12 09:54:03 +0000987 -help | --help | --hel | --he | -h)
988 ac_init_help=long ;;
989 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
990 ac_init_help=recursive ;;
991 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
992 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000993
994 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000995 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000996 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000997 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000998
Martin v. Löwiseba40652007-08-30 20:10:57 +0000999 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1000 ac_prev=htmldir ;;
1001 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1002 | --ht=*)
1003 htmldir=$ac_optarg ;;
1004
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001005 -includedir | --includedir | --includedi | --included | --include \
1006 | --includ | --inclu | --incl | --inc)
1007 ac_prev=includedir ;;
1008 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1009 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001010 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001011
1012 -infodir | --infodir | --infodi | --infod | --info | --inf)
1013 ac_prev=infodir ;;
1014 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001015 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001016
1017 -libdir | --libdir | --libdi | --libd)
1018 ac_prev=libdir ;;
1019 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001020 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001021
1022 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1023 | --libexe | --libex | --libe)
1024 ac_prev=libexecdir ;;
1025 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1026 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001027 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001028
Martin v. Löwiseba40652007-08-30 20:10:57 +00001029 -localedir | --localedir | --localedi | --localed | --locale)
1030 ac_prev=localedir ;;
1031 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1032 localedir=$ac_optarg ;;
1033
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001034 -localstatedir | --localstatedir | --localstatedi | --localstated \
Martin v. Löwiseba40652007-08-30 20:10:57 +00001035 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001036 ac_prev=localstatedir ;;
1037 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Martin v. Löwiseba40652007-08-30 20:10:57 +00001038 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001039 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001040
1041 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1042 ac_prev=mandir ;;
1043 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001044 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001045
Guido van Rossum7f43da71994-08-01 12:15:30 +00001046 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001047 # Obsolete; use --without-fp.
1048 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001049
1050 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001051 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001052 no_create=yes ;;
1053
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001054 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1055 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1056 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001057
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001058 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1059 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1060 | --oldin | --oldi | --old | --ol | --o)
1061 ac_prev=oldincludedir ;;
1062 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1063 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1064 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001065 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001066
Guido van Rossum7f43da71994-08-01 12:15:30 +00001067 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1068 ac_prev=prefix ;;
1069 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001070 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001071
1072 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1073 | --program-pre | --program-pr | --program-p)
1074 ac_prev=program_prefix ;;
1075 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1076 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001077 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001078
1079 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1080 | --program-suf | --program-su | --program-s)
1081 ac_prev=program_suffix ;;
1082 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1083 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001084 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001085
1086 -program-transform-name | --program-transform-name \
1087 | --program-transform-nam | --program-transform-na \
1088 | --program-transform-n | --program-transform- \
1089 | --program-transform | --program-transfor \
1090 | --program-transfo | --program-transf \
1091 | --program-trans | --program-tran \
1092 | --progr-tra | --program-tr | --program-t)
1093 ac_prev=program_transform_name ;;
1094 -program-transform-name=* | --program-transform-name=* \
1095 | --program-transform-nam=* | --program-transform-na=* \
1096 | --program-transform-n=* | --program-transform-=* \
1097 | --program-transform=* | --program-transfor=* \
1098 | --program-transfo=* | --program-transf=* \
1099 | --program-trans=* | --program-tran=* \
1100 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001101 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001102
Martin v. Löwiseba40652007-08-30 20:10:57 +00001103 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1104 ac_prev=pdfdir ;;
1105 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1106 pdfdir=$ac_optarg ;;
1107
1108 -psdir | --psdir | --psdi | --psd | --ps)
1109 ac_prev=psdir ;;
1110 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1111 psdir=$ac_optarg ;;
1112
Guido van Rossum7f43da71994-08-01 12:15:30 +00001113 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1114 | -silent | --silent | --silen | --sile | --sil)
1115 silent=yes ;;
1116
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001117 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1118 ac_prev=sbindir ;;
1119 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1120 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001121 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001122
1123 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1124 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1125 | --sharedst | --shareds | --shared | --share | --shar \
1126 | --sha | --sh)
1127 ac_prev=sharedstatedir ;;
1128 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1129 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1130 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1131 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001132 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001133
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001134 -site | --site | --sit)
1135 ac_prev=site ;;
1136 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001137 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001138
Guido van Rossum7f43da71994-08-01 12:15:30 +00001139 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1140 ac_prev=srcdir ;;
1141 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001142 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001143
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001144 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1145 | --syscon | --sysco | --sysc | --sys | --sy)
1146 ac_prev=sysconfdir ;;
1147 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1148 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001149 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001150
Guido van Rossum7f43da71994-08-01 12:15:30 +00001151 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001152 ac_prev=target_alias ;;
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 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001155
1156 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1157 verbose=yes ;;
1158
Martin v. Löwis11437992002-04-12 09:54:03 +00001159 -version | --version | --versio | --versi | --vers | -V)
1160 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001161
1162 -with-* | --with-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001163 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001164 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001165 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001166 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001167 ac_useropt_orig=$ac_useropt
1168 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1169 case $ac_user_opts in
1170 *"
1171"with_$ac_useropt"
1172"*) ;;
1173 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1174 ac_unrecognized_sep=', ';;
1175 esac
1176 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001177
1178 -without-* | --without-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001179 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001180 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001181 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001182 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001183 ac_useropt_orig=$ac_useropt
1184 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1185 case $ac_user_opts in
1186 *"
1187"with_$ac_useropt"
1188"*) ;;
1189 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1190 ac_unrecognized_sep=', ';;
1191 esac
1192 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001193
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001194 --x)
1195 # Obsolete; use --with-x.
1196 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001197
1198 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1199 | --x-incl | --x-inc | --x-in | --x-i)
1200 ac_prev=x_includes ;;
1201 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1202 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001203 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001204
1205 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1206 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1207 ac_prev=x_libraries ;;
1208 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1209 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001210 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001211
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001212 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1213Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001214 ;;
1215
Martin v. Löwis11437992002-04-12 09:54:03 +00001216 *=*)
1217 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1218 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001219 case $ac_envvar in #(
1220 '' | [0-9]* | *[!_$as_cr_alnum]* )
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001221 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001222 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001223 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001224 export $ac_envvar ;;
1225
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001226 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001227 # FIXME: should be removed in autoconf 3.0.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001228 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001229 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001230 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Matthias Klose3cef2a92012-03-14 23:39:33 +01001231 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001232 ;;
1233
1234 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001235done
1236
Guido van Rossum7f43da71994-08-01 12:15:30 +00001237if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001238 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001239 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001240fi
1241
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001242if test -n "$ac_unrecognized_opts"; then
1243 case $enable_option_checking in
1244 no) ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001245 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001246 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1247 esac
1248fi
1249
1250# Check all directory arguments for consistency.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001251for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1252 datadir sysconfdir sharedstatedir localstatedir includedir \
1253 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1254 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001255do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001256 eval ac_val=\$$ac_var
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001257 # Remove trailing slashes.
1258 case $ac_val in
1259 */ )
1260 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1261 eval $ac_var=\$ac_val;;
1262 esac
1263 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001264 case $ac_val in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001265 [\\/$]* | ?:[\\/]* ) continue;;
1266 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001267 esac
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001268 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001269done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001270
Martin v. Löwis11437992002-04-12 09:54:03 +00001271# There might be people who depend on the old broken behavior: `$host'
1272# used to hold the argument of --host etc.
1273# FIXME: To remove some day.
1274build=$build_alias
1275host=$host_alias
1276target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001277
Martin v. Löwis11437992002-04-12 09:54:03 +00001278# FIXME: To remove some day.
1279if test "x$host_alias" != x; then
1280 if test "x$build_alias" = x; then
1281 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001282 elif test "x$build_alias" != "x$host_alias"; then
1283 cross_compiling=yes
1284 fi
1285fi
1286
1287ac_tool_prefix=
1288test -n "$host_alias" && ac_tool_prefix=$host_alias-
1289
1290test "$silent" = yes && exec 6>/dev/null
1291
Guido van Rossum627b2d71993-12-24 10:39:16 +00001292
Martin v. Löwiseba40652007-08-30 20:10:57 +00001293ac_pwd=`pwd` && test -n "$ac_pwd" &&
1294ac_ls_di=`ls -di .` &&
1295ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001296 as_fn_error $? "working directory cannot be determined"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001297test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001298 as_fn_error $? "pwd does not report name of working directory"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001299
1300
Guido van Rossum627b2d71993-12-24 10:39:16 +00001301# Find the source files, if location was not specified.
1302if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001303 ac_srcdir_defaulted=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +00001304 # Try the directory containing this script, then the parent directory.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001305 ac_confdir=`$as_dirname -- "$as_myself" ||
1306$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1307 X"$as_myself" : 'X\(//\)[^/]' \| \
1308 X"$as_myself" : 'X\(//\)$' \| \
1309 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1310$as_echo X"$as_myself" |
Martin v. Löwiseba40652007-08-30 20:10:57 +00001311 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1312 s//\1/
1313 q
1314 }
1315 /^X\(\/\/\)[^/].*/{
1316 s//\1/
1317 q
1318 }
1319 /^X\(\/\/\)$/{
1320 s//\1/
1321 q
1322 }
1323 /^X\(\/\).*/{
1324 s//\1/
1325 q
1326 }
1327 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001328 srcdir=$ac_confdir
Martin v. Löwiseba40652007-08-30 20:10:57 +00001329 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001330 srcdir=..
1331 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001332else
1333 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001334fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001335if test ! -r "$srcdir/$ac_unique_file"; then
1336 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001337 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Brett Cannon19fab762007-06-02 03:02:29 +00001338fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001339ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1340ac_abs_confdir=`(
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001341 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001342 pwd)`
1343# When building in place, set srcdir=.
1344if test "$ac_abs_confdir" = "$ac_pwd"; then
1345 srcdir=.
1346fi
1347# Remove unnecessary trailing slashes from srcdir.
1348# Double slashes in file names in object file debugging info
1349# mess up M-x gdb in Emacs.
1350case $srcdir in
1351*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1352esac
1353for ac_var in $ac_precious_vars; do
1354 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1355 eval ac_env_${ac_var}_value=\$${ac_var}
1356 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1357 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1358done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001359
Martin v. Löwis11437992002-04-12 09:54:03 +00001360#
1361# Report the --help message.
1362#
1363if test "$ac_init_help" = "long"; then
1364 # Omit some internal or obsolete options to make the list less imposing.
1365 # This message is too long to be a string in the A/UX 3.1 sh.
1366 cat <<_ACEOF
Martin v. Löwis174440b2008-10-03 08:59:41 +00001367\`configure' configures python 2.7 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001368
1369Usage: $0 [OPTION]... [VAR=VALUE]...
1370
1371To assign environment variables (e.g., CC, CFLAGS...), specify them as
1372VAR=VALUE. See below for descriptions of some of the useful variables.
1373
1374Defaults for the options are specified in brackets.
1375
1376Configuration:
1377 -h, --help display this help and exit
1378 --help=short display options specific to this package
1379 --help=recursive display the short help of all the included packages
1380 -V, --version display version information and exit
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001381 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001382 --cache-file=FILE cache test results in FILE [disabled]
1383 -C, --config-cache alias for \`--cache-file=config.cache'
1384 -n, --no-create do not create output files
1385 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1386
Martin v. Löwis11437992002-04-12 09:54:03 +00001387Installation directories:
1388 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001389 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001390 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001391 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001392
1393By default, \`make install' will install all the files in
1394\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1395an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1396for instance \`--prefix=\$HOME'.
1397
1398For better control, use the options below.
1399
1400Fine tuning of the installation directories:
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001401 --bindir=DIR user executables [EPREFIX/bin]
1402 --sbindir=DIR system admin executables [EPREFIX/sbin]
1403 --libexecdir=DIR program executables [EPREFIX/libexec]
1404 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1405 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1406 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1407 --libdir=DIR object code libraries [EPREFIX/lib]
1408 --includedir=DIR C header files [PREFIX/include]
1409 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1410 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1411 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1412 --infodir=DIR info documentation [DATAROOTDIR/info]
1413 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1414 --mandir=DIR man documentation [DATAROOTDIR/man]
1415 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1416 --htmldir=DIR html documentation [DOCDIR]
1417 --dvidir=DIR dvi documentation [DOCDIR]
1418 --pdfdir=DIR pdf documentation [DOCDIR]
1419 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001420_ACEOF
1421
1422 cat <<\_ACEOF
doko@python.orgd65e2ba2013-01-31 23:52:03 +01001423
1424System types:
1425 --build=BUILD configure for building on BUILD [guessed]
1426 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001427_ACEOF
1428fi
1429
1430if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001431 case $ac_init_help in
Martin v. Löwis174440b2008-10-03 08:59:41 +00001432 short | recursive ) echo "Configuration of python 2.7:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001433 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001434 cat <<\_ACEOF
1435
1436Optional Features:
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001437 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001438 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1439 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Brett Cannon91a1dec2008-02-13 19:15:44 +00001440 --enable-universalsdk[=SDKDIR]
Brett Cannon9a8bb0e2008-02-03 02:07:55 +00001441 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001442 --enable-framework[=INSTALLDIR]
1443 Build (MacOSX|Darwin) framework
1444 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001445 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001446 --enable-toolbox-glue disable/enable MacOSX glue code for extensions
1447 --enable-ipv6 Enable ipv6 (with ipv4) support
1448 --disable-ipv6 Disable ipv6 support
Mark Dickinsonefc82f72009-03-20 15:51:55 +00001449 --enable-big-digits[=BITS]
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001450 use big digits for Python longs [[BITS=30]]
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001451 --enable-unicode[=ucs[24]]
Benjamin Peterson66556b02010-05-25 02:23:32 +00001452 Enable Unicode strings (default is ucs2)
Martin v. Löwis11437992002-04-12 09:54:03 +00001453
1454Optional Packages:
1455 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1456 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001457 --with-universal-archs=ARCH
1458 select architectures for universal build ("32-bit",
Ronald Oussoren23d92532009-09-07 06:12:00 +00001459 "64-bit", "3-way", "intel" or "all")
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001460 --with-framework-name=FRAMEWORK
1461 specify an alternate name of the framework built
1462 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001463 --without-gcc never use gcc
Martin v. Löwis0f48d982006-04-14 14:34:26 +00001464 --with-cxx-main=<compiler>
1465 compile main() and link python executable with C++
1466 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001467 --with-suffix=.exe set executable suffix
1468 --with-pydebug build with Py_DEBUG defined
1469 --with-libs='lib1 ...' link against additional libs
Benjamin Peterson2c196742009-12-31 03:17:18 +00001470 --with-system-expat build pyexpat module using an installed expat
1471 library
Martin v. Löwis9176fc12006-04-11 11:12:43 +00001472 --with-system-ffi build _ctypes module using an installed ffi library
Ned Deilya2a9f572013-10-25 00:30:10 -07001473 --with-tcltk-includes='-I...'
1474 override search for Tcl and Tk include files
1475 --with-tcltk-libs='-L...'
1476 override search for Tcl and Tk libs
Benjamin Peterson867475c2009-04-29 20:36:25 +00001477 --with-dbmliborder=db1:db2:...
1478 order to check db backends for dbm. Valid value is a
1479 colon separated string with the backend names
1480 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001481 --with-signal-module disable/enable signal module
1482 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1483 --with(out)-threads[=DIRECTORY]
1484 disable/enable thread support
1485 --with(out)-thread[=DIRECTORY]
1486 deprecated; use --with(out)-threads
1487 --with-pth use GNU pth threading libraries
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001488 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001489 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001490 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00001491 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001492 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001493 --with-fpectl enable SIGFPE catching
1494 --with-libm=STRING math library
1495 --with-libc=STRING C library
Ned Deily3f1d0b32014-11-20 02:11:03 -08001496 --with(out)-ensurepip=[=OPTION]
1497 "install" or "upgrade" using bundled pip, default is
1498 "no"
Martin v. Löwis11437992002-04-12 09:54:03 +00001499
1500Some influential environment variables:
1501 CC C compiler command
1502 CFLAGS C compiler flags
1503 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1504 nonstandard directory <lib dir>
Martin v. Löwiseba40652007-08-30 20:10:57 +00001505 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001506 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Martin v. Löwiseba40652007-08-30 20:10:57 +00001507 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001508 CPP C preprocessor
Benjamin Peterson64e8f6e2014-12-15 00:00:23 -05001509 PKG_CONFIG path to pkg-config utility
1510 PKG_CONFIG_PATH
1511 directories to add to pkg-config's search path
1512 PKG_CONFIG_LIBDIR
1513 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001514
1515Use these variables to override the choices made by `configure' or to help
1516it to find libraries and programs with nonstandard names/locations.
1517
Georg Brandl464432d2009-05-20 18:24:08 +00001518Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001519_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001520ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001521fi
1522
1523if test "$ac_init_help" = "recursive"; then
1524 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001525 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001526 test -d "$ac_dir" ||
1527 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1528 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001529 ac_builddir=.
1530
Martin v. Löwiseba40652007-08-30 20:10:57 +00001531case "$ac_dir" in
1532.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1533*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001534 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001535 # A ".." for each directory in $ac_dir_suffix.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001536 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001537 case $ac_top_builddir_sub in
1538 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1539 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1540 esac ;;
1541esac
1542ac_abs_top_builddir=$ac_pwd
1543ac_abs_builddir=$ac_pwd$ac_dir_suffix
1544# for backward compatibility:
1545ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001546
1547case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001548 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001549 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001550 ac_top_srcdir=$ac_top_builddir_sub
1551 ac_abs_top_srcdir=$ac_pwd ;;
1552 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001553 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001554 ac_top_srcdir=$srcdir
1555 ac_abs_top_srcdir=$srcdir ;;
1556 *) # Relative name.
1557 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1558 ac_top_srcdir=$ac_top_build_prefix$srcdir
1559 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001560esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001561ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001562
Martin v. Löwiseba40652007-08-30 20:10:57 +00001563 cd "$ac_dir" || { ac_status=$?; continue; }
1564 # Check for guested configure.
1565 if test -f "$ac_srcdir/configure.gnu"; then
1566 echo &&
1567 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1568 elif test -f "$ac_srcdir/configure"; then
1569 echo &&
1570 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001571 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001572 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001573 fi || ac_status=$?
1574 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001575 done
1576fi
1577
Martin v. Löwiseba40652007-08-30 20:10:57 +00001578test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001579if $ac_init_version; then
1580 cat <<\_ACEOF
Martin v. Löwis174440b2008-10-03 08:59:41 +00001581python configure 2.7
Charles-François Natalibe2b9072013-01-08 19:47:00 +01001582generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001583
Charles-François Natalibe2b9072013-01-08 19:47:00 +01001584Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001585This configure script is free software; the Free Software Foundation
1586gives unlimited permission to copy, distribute and modify it.
1587_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001588 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001589fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001590
1591## ------------------------ ##
1592## Autoconf initialization. ##
1593## ------------------------ ##
1594
1595# ac_fn_c_try_compile LINENO
1596# --------------------------
1597# Try to compile conftest.$ac_ext, and return whether this succeeded.
1598ac_fn_c_try_compile ()
1599{
1600 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1601 rm -f conftest.$ac_objext
1602 if { { ac_try="$ac_compile"
1603case "(($ac_try" in
1604 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1605 *) ac_try_echo=$ac_try;;
1606esac
1607eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1608$as_echo "$ac_try_echo"; } >&5
1609 (eval "$ac_compile") 2>conftest.err
1610 ac_status=$?
1611 if test -s conftest.err; then
1612 grep -v '^ *+' conftest.err >conftest.er1
1613 cat conftest.er1 >&5
1614 mv -f conftest.er1 conftest.err
1615 fi
1616 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1617 test $ac_status = 0; } && {
1618 test -z "$ac_c_werror_flag" ||
1619 test ! -s conftest.err
1620 } && test -s conftest.$ac_objext; then :
1621 ac_retval=0
1622else
1623 $as_echo "$as_me: failed program was:" >&5
1624sed 's/^/| /' conftest.$ac_ext >&5
1625
1626 ac_retval=1
1627fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01001628 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001629 as_fn_set_status $ac_retval
1630
1631} # ac_fn_c_try_compile
1632
1633# ac_fn_c_try_cpp LINENO
1634# ----------------------
1635# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1636ac_fn_c_try_cpp ()
1637{
1638 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1639 if { { ac_try="$ac_cpp conftest.$ac_ext"
1640case "(($ac_try" in
1641 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1642 *) ac_try_echo=$ac_try;;
1643esac
1644eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1645$as_echo "$ac_try_echo"; } >&5
1646 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1647 ac_status=$?
1648 if test -s conftest.err; then
1649 grep -v '^ *+' conftest.err >conftest.er1
1650 cat conftest.er1 >&5
1651 mv -f conftest.er1 conftest.err
1652 fi
1653 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001654 test $ac_status = 0; } > conftest.i && {
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001655 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1656 test ! -s conftest.err
1657 }; then :
1658 ac_retval=0
1659else
1660 $as_echo "$as_me: failed program was:" >&5
1661sed 's/^/| /' conftest.$ac_ext >&5
1662
1663 ac_retval=1
1664fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01001665 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001666 as_fn_set_status $ac_retval
1667
1668} # ac_fn_c_try_cpp
1669
1670# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1671# -------------------------------------------------------
1672# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1673# the include files in INCLUDES and setting the cache variable VAR
1674# accordingly.
1675ac_fn_c_check_header_mongrel ()
1676{
1677 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Matthias Klose3cef2a92012-03-14 23:39:33 +01001678 if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001679 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1680$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001681if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001682 $as_echo_n "(cached) " >&6
1683fi
1684eval ac_res=\$$3
1685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1686$as_echo "$ac_res" >&6; }
1687else
1688 # Is the header compilable?
1689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1690$as_echo_n "checking $2 usability... " >&6; }
1691cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1692/* end confdefs.h. */
1693$4
1694#include <$2>
1695_ACEOF
1696if ac_fn_c_try_compile "$LINENO"; then :
1697 ac_header_compiler=yes
1698else
1699 ac_header_compiler=no
1700fi
1701rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1702{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1703$as_echo "$ac_header_compiler" >&6; }
1704
1705# Is the header present?
1706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1707$as_echo_n "checking $2 presence... " >&6; }
1708cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1709/* end confdefs.h. */
1710#include <$2>
1711_ACEOF
1712if ac_fn_c_try_cpp "$LINENO"; then :
1713 ac_header_preproc=yes
1714else
1715 ac_header_preproc=no
1716fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001717rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001718{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1719$as_echo "$ac_header_preproc" >&6; }
1720
1721# So? What about this header?
1722case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1723 yes:no: )
1724 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1725$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1726 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1727$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1728 ;;
1729 no:yes:* )
1730 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1731$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1732 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1733$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1734 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1735$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1736 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1737$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1738 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1739$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001740( $as_echo "## -------------------------------------- ##
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001741## Report this to http://bugs.python.org/ ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001742## -------------------------------------- ##"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001743 ) | sed "s/^/$as_me: WARNING: /" >&2
1744 ;;
1745esac
1746 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1747$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001748if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001749 $as_echo_n "(cached) " >&6
1750else
1751 eval "$3=\$ac_header_compiler"
1752fi
1753eval ac_res=\$$3
1754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1755$as_echo "$ac_res" >&6; }
1756fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01001757 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001758
1759} # ac_fn_c_check_header_mongrel
1760
1761# ac_fn_c_try_run LINENO
1762# ----------------------
1763# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1764# that executables *can* be run.
1765ac_fn_c_try_run ()
1766{
1767 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1768 if { { ac_try="$ac_link"
1769case "(($ac_try" in
1770 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1771 *) ac_try_echo=$ac_try;;
1772esac
1773eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1774$as_echo "$ac_try_echo"; } >&5
1775 (eval "$ac_link") 2>&5
1776 ac_status=$?
1777 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1778 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1779 { { case "(($ac_try" in
1780 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1781 *) ac_try_echo=$ac_try;;
1782esac
1783eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1784$as_echo "$ac_try_echo"; } >&5
1785 (eval "$ac_try") 2>&5
1786 ac_status=$?
1787 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1788 test $ac_status = 0; }; }; then :
1789 ac_retval=0
1790else
1791 $as_echo "$as_me: program exited with status $ac_status" >&5
1792 $as_echo "$as_me: failed program was:" >&5
1793sed 's/^/| /' conftest.$ac_ext >&5
1794
1795 ac_retval=$ac_status
1796fi
1797 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Matthias Klose3cef2a92012-03-14 23:39:33 +01001798 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001799 as_fn_set_status $ac_retval
1800
1801} # ac_fn_c_try_run
1802
1803# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1804# -------------------------------------------------------
1805# Tests whether HEADER exists and can be compiled using the include files in
1806# INCLUDES, setting the cache variable VAR accordingly.
1807ac_fn_c_check_header_compile ()
1808{
1809 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1810 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1811$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001812if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001813 $as_echo_n "(cached) " >&6
1814else
1815 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1816/* end confdefs.h. */
1817$4
1818#include <$2>
1819_ACEOF
1820if ac_fn_c_try_compile "$LINENO"; then :
1821 eval "$3=yes"
1822else
1823 eval "$3=no"
1824fi
1825rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1826fi
1827eval ac_res=\$$3
1828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1829$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001830 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001831
1832} # ac_fn_c_check_header_compile
1833
1834# ac_fn_c_try_link LINENO
1835# -----------------------
1836# Try to link conftest.$ac_ext, and return whether this succeeded.
1837ac_fn_c_try_link ()
1838{
1839 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1840 rm -f conftest.$ac_objext conftest$ac_exeext
1841 if { { ac_try="$ac_link"
1842case "(($ac_try" in
1843 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1844 *) ac_try_echo=$ac_try;;
1845esac
1846eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1847$as_echo "$ac_try_echo"; } >&5
1848 (eval "$ac_link") 2>conftest.err
1849 ac_status=$?
1850 if test -s conftest.err; then
1851 grep -v '^ *+' conftest.err >conftest.er1
1852 cat conftest.er1 >&5
1853 mv -f conftest.er1 conftest.err
1854 fi
1855 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1856 test $ac_status = 0; } && {
1857 test -z "$ac_c_werror_flag" ||
1858 test ! -s conftest.err
1859 } && test -s conftest$ac_exeext && {
1860 test "$cross_compiling" = yes ||
Charles-François Natalibe2b9072013-01-08 19:47:00 +01001861 test -x conftest$ac_exeext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001862 }; then :
1863 ac_retval=0
1864else
1865 $as_echo "$as_me: failed program was:" >&5
1866sed 's/^/| /' conftest.$ac_ext >&5
1867
1868 ac_retval=1
1869fi
1870 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1871 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1872 # interfere with the next link command; also delete a directory that is
1873 # left behind by Apple's compiler. We do this before executing the actions.
1874 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Matthias Klose3cef2a92012-03-14 23:39:33 +01001875 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001876 as_fn_set_status $ac_retval
1877
1878} # ac_fn_c_try_link
1879
1880# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1881# -------------------------------------------
1882# Tests whether TYPE exists after having included INCLUDES, setting cache
1883# variable VAR accordingly.
1884ac_fn_c_check_type ()
1885{
1886 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1887 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1888$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001889if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001890 $as_echo_n "(cached) " >&6
1891else
1892 eval "$3=no"
1893 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1894/* end confdefs.h. */
1895$4
1896int
1897main ()
1898{
1899if (sizeof ($2))
1900 return 0;
1901 ;
1902 return 0;
1903}
1904_ACEOF
1905if ac_fn_c_try_compile "$LINENO"; then :
1906 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1907/* end confdefs.h. */
1908$4
1909int
1910main ()
1911{
1912if (sizeof (($2)))
1913 return 0;
1914 ;
1915 return 0;
1916}
1917_ACEOF
1918if ac_fn_c_try_compile "$LINENO"; then :
1919
1920else
1921 eval "$3=yes"
1922fi
1923rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1924fi
1925rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1926fi
1927eval ac_res=\$$3
1928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1929$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001930 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001931
1932} # ac_fn_c_check_type
1933
1934# ac_fn_c_find_uintX_t LINENO BITS VAR
1935# ------------------------------------
1936# Finds an unsigned integer type with width BITS, setting cache variable VAR
1937# accordingly.
1938ac_fn_c_find_uintX_t ()
1939{
1940 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1941 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1942$as_echo_n "checking for uint$2_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001943if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001944 $as_echo_n "(cached) " >&6
1945else
1946 eval "$3=no"
1947 # Order is important - never check a type that is potentially smaller
1948 # than half of the expected target width.
1949 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1950 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1951 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1952/* end confdefs.h. */
1953$ac_includes_default
1954int
1955main ()
1956{
1957static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01001958test_array [0] = 0;
1959return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001960
1961 ;
1962 return 0;
1963}
1964_ACEOF
1965if ac_fn_c_try_compile "$LINENO"; then :
1966 case $ac_type in #(
1967 uint$2_t) :
1968 eval "$3=yes" ;; #(
1969 *) :
1970 eval "$3=\$ac_type" ;;
1971esac
1972fi
1973rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001974 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001975
1976else
1977 break
1978fi
1979 done
1980fi
1981eval ac_res=\$$3
1982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1983$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001984 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001985
1986} # ac_fn_c_find_uintX_t
1987
1988# ac_fn_c_find_intX_t LINENO BITS VAR
1989# -----------------------------------
1990# Finds a signed integer type with width BITS, setting cache variable VAR
1991# accordingly.
1992ac_fn_c_find_intX_t ()
1993{
1994 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1995 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
1996$as_echo_n "checking for int$2_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001997if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001998 $as_echo_n "(cached) " >&6
1999else
2000 eval "$3=no"
2001 # Order is important - never check a type that is potentially smaller
2002 # than half of the expected target width.
2003 for ac_type in int$2_t 'int' 'long int' \
2004 'long long int' 'short int' 'signed char'; do
2005 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2006/* end confdefs.h. */
2007$ac_includes_default
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002008 enum { N = $2 / 2 - 1 };
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002009int
2010main ()
2011{
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002012static 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 +01002013test_array [0] = 0;
2014return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002015
2016 ;
2017 return 0;
2018}
2019_ACEOF
2020if ac_fn_c_try_compile "$LINENO"; then :
2021 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2022/* end confdefs.h. */
2023$ac_includes_default
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002024 enum { N = $2 / 2 - 1 };
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002025int
2026main ()
2027{
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002028static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002029 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002030test_array [0] = 0;
2031return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002032
2033 ;
2034 return 0;
2035}
2036_ACEOF
2037if ac_fn_c_try_compile "$LINENO"; then :
2038
2039else
2040 case $ac_type in #(
2041 int$2_t) :
2042 eval "$3=yes" ;; #(
2043 *) :
2044 eval "$3=\$ac_type" ;;
2045esac
2046fi
2047rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2048fi
2049rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002050 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002051
2052else
2053 break
2054fi
2055 done
2056fi
2057eval ac_res=\$$3
2058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2059$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002060 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002061
2062} # ac_fn_c_find_intX_t
2063
2064# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2065# --------------------------------------------
2066# Tries to find the compile-time value of EXPR in a program that includes
2067# INCLUDES, setting VAR accordingly. Returns whether the value could be
2068# computed
2069ac_fn_c_compute_int ()
2070{
2071 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2072 if test "$cross_compiling" = yes; then
2073 # Depending upon the size, compute the lo and hi bounds.
2074cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2075/* end confdefs.h. */
2076$4
2077int
2078main ()
2079{
2080static int test_array [1 - 2 * !(($2) >= 0)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002081test_array [0] = 0;
2082return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002083
2084 ;
2085 return 0;
2086}
2087_ACEOF
2088if ac_fn_c_try_compile "$LINENO"; then :
2089 ac_lo=0 ac_mid=0
2090 while :; do
2091 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2092/* end confdefs.h. */
2093$4
2094int
2095main ()
2096{
2097static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002098test_array [0] = 0;
2099return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002100
2101 ;
2102 return 0;
2103}
2104_ACEOF
2105if ac_fn_c_try_compile "$LINENO"; then :
2106 ac_hi=$ac_mid; break
2107else
2108 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2109 if test $ac_lo -le $ac_mid; then
2110 ac_lo= ac_hi=
2111 break
2112 fi
2113 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2114fi
2115rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2116 done
2117else
2118 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2119/* end confdefs.h. */
2120$4
2121int
2122main ()
2123{
2124static int test_array [1 - 2 * !(($2) < 0)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002125test_array [0] = 0;
2126return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002127
2128 ;
2129 return 0;
2130}
2131_ACEOF
2132if ac_fn_c_try_compile "$LINENO"; then :
2133 ac_hi=-1 ac_mid=-1
2134 while :; do
2135 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2136/* end confdefs.h. */
2137$4
2138int
2139main ()
2140{
2141static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002142test_array [0] = 0;
2143return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002144
2145 ;
2146 return 0;
2147}
2148_ACEOF
2149if ac_fn_c_try_compile "$LINENO"; then :
2150 ac_lo=$ac_mid; break
2151else
2152 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2153 if test $ac_mid -le $ac_hi; then
2154 ac_lo= ac_hi=
2155 break
2156 fi
2157 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2158fi
2159rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2160 done
2161else
2162 ac_lo= ac_hi=
2163fi
2164rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2165fi
2166rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2167# Binary search between lo and hi bounds.
2168while test "x$ac_lo" != "x$ac_hi"; do
2169 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2170 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2171/* end confdefs.h. */
2172$4
2173int
2174main ()
2175{
2176static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002177test_array [0] = 0;
2178return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002179
2180 ;
2181 return 0;
2182}
2183_ACEOF
2184if ac_fn_c_try_compile "$LINENO"; then :
2185 ac_hi=$ac_mid
2186else
2187 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2188fi
2189rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2190done
2191case $ac_lo in #((
2192?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2193'') ac_retval=1 ;;
2194esac
2195 else
2196 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2197/* end confdefs.h. */
2198$4
2199static long int longval () { return $2; }
2200static unsigned long int ulongval () { return $2; }
2201#include <stdio.h>
2202#include <stdlib.h>
2203int
2204main ()
2205{
2206
2207 FILE *f = fopen ("conftest.val", "w");
2208 if (! f)
2209 return 1;
2210 if (($2) < 0)
2211 {
2212 long int i = longval ();
2213 if (i != ($2))
2214 return 1;
2215 fprintf (f, "%ld", i);
2216 }
2217 else
2218 {
2219 unsigned long int i = ulongval ();
2220 if (i != ($2))
2221 return 1;
2222 fprintf (f, "%lu", i);
2223 }
2224 /* Do not output a trailing newline, as this causes \r\n confusion
2225 on some platforms. */
2226 return ferror (f) || fclose (f) != 0;
2227
2228 ;
2229 return 0;
2230}
2231_ACEOF
2232if ac_fn_c_try_run "$LINENO"; then :
2233 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2234else
2235 ac_retval=1
2236fi
2237rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2238 conftest.$ac_objext conftest.beam conftest.$ac_ext
2239rm -f conftest.val
2240
2241 fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01002242 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002243 as_fn_set_status $ac_retval
2244
2245} # ac_fn_c_compute_int
2246
2247# ac_fn_c_check_func LINENO FUNC VAR
2248# ----------------------------------
2249# Tests whether FUNC exists, setting the cache variable VAR accordingly
2250ac_fn_c_check_func ()
2251{
2252 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2253 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2254$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002255if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002256 $as_echo_n "(cached) " >&6
2257else
2258 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2259/* end confdefs.h. */
2260/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2261 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2262#define $2 innocuous_$2
2263
2264/* System header to define __stub macros and hopefully few prototypes,
2265 which can conflict with char $2 (); below.
2266 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2267 <limits.h> exists even on freestanding compilers. */
2268
2269#ifdef __STDC__
2270# include <limits.h>
2271#else
2272# include <assert.h>
2273#endif
2274
2275#undef $2
2276
2277/* Override any GCC internal prototype to avoid an error.
2278 Use char because int might match the return type of a GCC
2279 builtin and then its argument prototype would still apply. */
2280#ifdef __cplusplus
2281extern "C"
2282#endif
2283char $2 ();
2284/* The GNU C library defines this for functions which it implements
2285 to always fail with ENOSYS. Some functions are actually named
2286 something starting with __ and the normal name is an alias. */
2287#if defined __stub_$2 || defined __stub___$2
2288choke me
2289#endif
2290
2291int
2292main ()
2293{
2294return $2 ();
2295 ;
2296 return 0;
2297}
2298_ACEOF
2299if ac_fn_c_try_link "$LINENO"; then :
2300 eval "$3=yes"
2301else
2302 eval "$3=no"
2303fi
2304rm -f core conftest.err conftest.$ac_objext \
2305 conftest$ac_exeext conftest.$ac_ext
2306fi
2307eval ac_res=\$$3
2308 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2309$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002310 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002311
2312} # ac_fn_c_check_func
2313
2314# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2315# ----------------------------------------------------
2316# Tries to find if the field MEMBER exists in type AGGR, after including
2317# INCLUDES, setting cache variable VAR accordingly.
2318ac_fn_c_check_member ()
2319{
2320 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2321 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2322$as_echo_n "checking for $2.$3... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002323if eval \${$4+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002324 $as_echo_n "(cached) " >&6
2325else
2326 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2327/* end confdefs.h. */
2328$5
2329int
2330main ()
2331{
2332static $2 ac_aggr;
2333if (ac_aggr.$3)
2334return 0;
2335 ;
2336 return 0;
2337}
2338_ACEOF
2339if ac_fn_c_try_compile "$LINENO"; then :
2340 eval "$4=yes"
2341else
2342 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2343/* end confdefs.h. */
2344$5
2345int
2346main ()
2347{
2348static $2 ac_aggr;
2349if (sizeof ac_aggr.$3)
2350return 0;
2351 ;
2352 return 0;
2353}
2354_ACEOF
2355if ac_fn_c_try_compile "$LINENO"; then :
2356 eval "$4=yes"
2357else
2358 eval "$4=no"
2359fi
2360rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2361fi
2362rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2363fi
2364eval ac_res=\$$4
2365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2366$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002367 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002368
2369} # ac_fn_c_check_member
2370
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002371# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2372# ---------------------------------------------
2373# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2374# accordingly.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002375ac_fn_c_check_decl ()
2376{
2377 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002378 as_decl_name=`echo $2|sed 's/ *(.*//'`
2379 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2380 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2381$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002382if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002383 $as_echo_n "(cached) " >&6
2384else
2385 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2386/* end confdefs.h. */
2387$4
2388int
2389main ()
2390{
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002391#ifndef $as_decl_name
2392#ifdef __cplusplus
2393 (void) $as_decl_use;
2394#else
2395 (void) $as_decl_name;
2396#endif
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002397#endif
2398
2399 ;
2400 return 0;
2401}
2402_ACEOF
2403if ac_fn_c_try_compile "$LINENO"; then :
2404 eval "$3=yes"
2405else
2406 eval "$3=no"
2407fi
2408rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2409fi
2410eval ac_res=\$$3
2411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2412$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002413 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002414
2415} # ac_fn_c_check_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +00002416cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002417This file contains any messages produced by compilers while
2418running configure, to aid debugging if configure makes a mistake.
2419
Martin v. Löwis174440b2008-10-03 08:59:41 +00002420It was created by python $as_me 2.7, which was
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002421generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002422
2423 $ $0 $@
2424
2425_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00002426exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002427{
2428cat <<_ASUNAME
2429## --------- ##
2430## Platform. ##
2431## --------- ##
2432
2433hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2434uname -m = `(uname -m) 2>/dev/null || echo unknown`
2435uname -r = `(uname -r) 2>/dev/null || echo unknown`
2436uname -s = `(uname -s) 2>/dev/null || echo unknown`
2437uname -v = `(uname -v) 2>/dev/null || echo unknown`
2438
2439/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2440/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2441
2442/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2443/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2444/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Martin v. Löwiseba40652007-08-30 20:10:57 +00002445/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002446/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2447/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2448/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2449
2450_ASUNAME
2451
2452as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2453for as_dir in $PATH
2454do
2455 IFS=$as_save_IFS
2456 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002457 $as_echo "PATH: $as_dir"
2458 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002459IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002460
2461} >&5
2462
2463cat >&5 <<_ACEOF
2464
2465
2466## ----------- ##
2467## Core tests. ##
2468## ----------- ##
2469
2470_ACEOF
2471
2472
2473# Keep a trace of the command line.
2474# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002475# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002476# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002477# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002478ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002479ac_configure_args0=
2480ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002481ac_must_keep_next=false
2482for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002483do
Skip Montanaro6dead952003-09-25 14:50:04 +00002484 for ac_arg
2485 do
2486 case $ac_arg in
2487 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2488 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2489 | -silent | --silent | --silen | --sile | --sil)
2490 continue ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002491 *\'*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002492 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002493 esac
2494 case $ac_pass in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002495 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002496 2)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002497 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002498 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002499 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002500 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002501 case $ac_arg in
2502 *=* | --config-cache | -C | -disable-* | --disable-* \
2503 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2504 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2505 | -with-* | --with-* | -without-* | --without-* | --x)
2506 case "$ac_configure_args0 " in
2507 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2508 esac
2509 ;;
2510 -* ) ac_must_keep_next=true ;;
2511 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002512 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002513 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002514 ;;
2515 esac
2516 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002517done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002518{ ac_configure_args0=; unset ac_configure_args0;}
2519{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002520
2521# When interrupted or exit'd, cleanup temporary files, and complete
2522# config.log. We remove comments because anyway the quotes in there
2523# would cause problems or look ugly.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002524# WARNING: Use '\'' to represent an apostrophe within the trap.
2525# 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 +00002526trap 'exit_status=$?
2527 # Save into config.log some information that might help in debugging.
2528 {
2529 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002530
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002531 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002532## Cache variables. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002533## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002534 echo
2535 # The following way of writing the cache mishandles newlines in values,
Martin v. Löwiseba40652007-08-30 20:10:57 +00002536(
2537 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2538 eval ac_val=\$$ac_var
2539 case $ac_val in #(
2540 *${as_nl}*)
2541 case $ac_var in #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002542 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2543$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002544 esac
2545 case $ac_var in #(
2546 _ | IFS | as_nl) ;; #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002547 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2548 *) { eval $ac_var=; unset $ac_var;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002549 esac ;;
2550 esac
2551 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002552 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +00002553 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2554 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002555 sed -n \
Martin v. Löwiseba40652007-08-30 20:10:57 +00002556 "s/'\''/'\''\\\\'\'''\''/g;
2557 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2558 ;; #(
Skip Montanaro89e975f2007-08-22 19:05:21 +00002559 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00002560 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaro89e975f2007-08-22 19:05:21 +00002561 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002562 esac |
2563 sort
2564)
Martin v. Löwis11437992002-04-12 09:54:03 +00002565 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002566
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002567 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002568## Output variables. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002569## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002570 echo
2571 for ac_var in $ac_subst_vars
2572 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002573 eval ac_val=\$$ac_var
2574 case $ac_val in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002575 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002576 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002577 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002578 done | sort
2579 echo
2580
2581 if test -n "$ac_subst_files"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002582 $as_echo "## ------------------- ##
Martin v. Löwiseba40652007-08-30 20:10:57 +00002583## File substitutions. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002584## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002585 echo
2586 for ac_var in $ac_subst_files
2587 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002588 eval ac_val=\$$ac_var
2589 case $ac_val in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002590 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002591 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002592 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002593 done | sort
2594 echo
2595 fi
2596
Martin v. Löwis11437992002-04-12 09:54:03 +00002597 if test -s confdefs.h; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002598 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002599## confdefs.h. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002600## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002601 echo
Martin v. Löwiseba40652007-08-30 20:10:57 +00002602 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002603 echo
2604 fi
2605 test "$ac_signal" != 0 &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002606 $as_echo "$as_me: caught signal $ac_signal"
2607 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002608 } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002609 rm -f core *.core core.conftest.* &&
2610 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002611 exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +00002612' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002613for ac_signal in 1 2 13 15; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002614 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002615done
2616ac_signal=0
2617
2618# confdefs.h avoids OS command line length limits that DEFS can exceed.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002619rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002620
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002621$as_echo "/* confdefs.h */" > confdefs.h
2622
Martin v. Löwis11437992002-04-12 09:54:03 +00002623# Predefined preprocessor variables.
2624
2625cat >>confdefs.h <<_ACEOF
2626#define PACKAGE_NAME "$PACKAGE_NAME"
2627_ACEOF
2628
Martin v. Löwis11437992002-04-12 09:54:03 +00002629cat >>confdefs.h <<_ACEOF
2630#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2631_ACEOF
2632
Martin v. Löwis11437992002-04-12 09:54:03 +00002633cat >>confdefs.h <<_ACEOF
2634#define PACKAGE_VERSION "$PACKAGE_VERSION"
2635_ACEOF
2636
Martin v. Löwis11437992002-04-12 09:54:03 +00002637cat >>confdefs.h <<_ACEOF
2638#define PACKAGE_STRING "$PACKAGE_STRING"
2639_ACEOF
2640
Martin v. Löwis11437992002-04-12 09:54:03 +00002641cat >>confdefs.h <<_ACEOF
2642#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2643_ACEOF
2644
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002645cat >>confdefs.h <<_ACEOF
2646#define PACKAGE_URL "$PACKAGE_URL"
2647_ACEOF
2648
Martin v. Löwis11437992002-04-12 09:54:03 +00002649
2650# Let the site file select an alternate cache file if it wants to.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002651# Prefer an explicitly selected file to automatically selected ones.
2652ac_site_file1=NONE
2653ac_site_file2=NONE
Martin v. Löwiseba40652007-08-30 20:10:57 +00002654if test -n "$CONFIG_SITE"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002655 # We do not want a PATH search for config.site.
2656 case $CONFIG_SITE in #((
2657 -*) ac_site_file1=./$CONFIG_SITE;;
2658 */*) ac_site_file1=$CONFIG_SITE;;
2659 *) ac_site_file1=./$CONFIG_SITE;;
2660 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00002661elif test "x$prefix" != xNONE; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002662 ac_site_file1=$prefix/share/config.site
2663 ac_site_file2=$prefix/etc/config.site
Martin v. Löwiseba40652007-08-30 20:10:57 +00002664else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002665 ac_site_file1=$ac_default_prefix/share/config.site
2666 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002667fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002668for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Martin v. Löwiseba40652007-08-30 20:10:57 +00002669do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002670 test "x$ac_site_file" = xNONE && continue
2671 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2672 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2673$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002674 sed 's/^/| /' "$ac_site_file" >&5
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002675 . "$ac_site_file" \
2676 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2677$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2678as_fn_error $? "failed to load site script $ac_site_file
Matthias Klose3cef2a92012-03-14 23:39:33 +01002679See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002680 fi
2681done
2682
2683if test -r "$cache_file"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002684 # Some versions of bash will fail to source /dev/null (special files
2685 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2686 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2687 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2688$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002689 case $cache_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00002690 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2691 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002692 esac
2693 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002694else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002695 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2696$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002697 >$cache_file
2698fi
2699
2700# Check that the precious variables saved in the cache have kept the same
2701# value.
2702ac_cache_corrupted=false
Martin v. Löwiseba40652007-08-30 20:10:57 +00002703for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002704 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2705 eval ac_new_set=\$ac_env_${ac_var}_set
Martin v. Löwiseba40652007-08-30 20:10:57 +00002706 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2707 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002708 case $ac_old_set,$ac_new_set in
2709 set,)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002710 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2711$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 +00002712 ac_cache_corrupted=: ;;
2713 ,set)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002714 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2715$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002716 ac_cache_corrupted=: ;;
2717 ,);;
2718 *)
2719 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002720 # differences in whitespace do not lead to failure.
2721 ac_old_val_w=`echo x $ac_old_val`
2722 ac_new_val_w=`echo x $ac_new_val`
2723 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2724 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2725$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2726 ac_cache_corrupted=:
2727 else
2728 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2729$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2730 eval $ac_var=\$ac_old_val
2731 fi
2732 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2733$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2734 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2735$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002736 fi;;
2737 esac
2738 # Pass precious variables to config.status.
2739 if test "$ac_new_set" = set; then
2740 case $ac_new_val in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002741 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002742 *) ac_arg=$ac_var=$ac_new_val ;;
2743 esac
2744 case " $ac_configure_args " in
2745 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002746 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002747 esac
2748 fi
2749done
2750if $ac_cache_corrupted; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002751 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2752$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2753 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2754$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002755 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002756fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002757## -------------------- ##
2758## Main body of script. ##
2759## -------------------- ##
Martin v. Löwiseba40652007-08-30 20:10:57 +00002760
Guido van Rossum7f43da71994-08-01 12:15:30 +00002761ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002762ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002763ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2764ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2765ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002766
Guido van Rossum627b2d71993-12-24 10:39:16 +00002767
Michael W. Hudson54241132001-12-07 15:38:26 +00002768
Martin v. Löwiseba40652007-08-30 20:10:57 +00002769ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002770
2771
doko@python.orgd65e2ba2013-01-31 23:52:03 +01002772ac_aux_dir=
2773for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2774 if test -f "$ac_dir/install-sh"; then
2775 ac_aux_dir=$ac_dir
2776 ac_install_sh="$ac_aux_dir/install-sh -c"
2777 break
2778 elif test -f "$ac_dir/install.sh"; then
2779 ac_aux_dir=$ac_dir
2780 ac_install_sh="$ac_aux_dir/install.sh -c"
2781 break
2782 elif test -f "$ac_dir/shtool"; then
2783 ac_aux_dir=$ac_dir
2784 ac_install_sh="$ac_aux_dir/shtool install -c"
2785 break
2786 fi
2787done
2788if test -z "$ac_aux_dir"; then
2789 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2790fi
2791
2792# These three variables are undocumented and unsupported,
2793# and are intended to be withdrawn in a future Autoconf release.
2794# They can cause serious problems if a builder's source tree is in a directory
2795# whose full name contains unusual characters.
2796ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2797ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2798ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2799
2800
2801# Make sure we can run config.sub.
2802$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2803 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2804
2805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2806$as_echo_n "checking build system type... " >&6; }
2807if ${ac_cv_build+:} false; then :
2808 $as_echo_n "(cached) " >&6
2809else
2810 ac_build_alias=$build_alias
2811test "x$ac_build_alias" = x &&
2812 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2813test "x$ac_build_alias" = x &&
2814 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2815ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2816 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2817
2818fi
2819{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2820$as_echo "$ac_cv_build" >&6; }
2821case $ac_cv_build in
2822*-*-*) ;;
2823*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2824esac
2825build=$ac_cv_build
2826ac_save_IFS=$IFS; IFS='-'
2827set x $ac_cv_build
2828shift
2829build_cpu=$1
2830build_vendor=$2
2831shift; shift
2832# Remember, the first character of IFS is used to create $*,
2833# except with old shells:
2834build_os=$*
2835IFS=$ac_save_IFS
2836case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2837
2838
2839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2840$as_echo_n "checking host system type... " >&6; }
2841if ${ac_cv_host+:} false; then :
2842 $as_echo_n "(cached) " >&6
2843else
2844 if test "x$host_alias" = x; then
2845 ac_cv_host=$ac_cv_build
2846else
2847 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2848 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2849fi
2850
2851fi
2852{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2853$as_echo "$ac_cv_host" >&6; }
2854case $ac_cv_host in
2855*-*-*) ;;
2856*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2857esac
2858host=$ac_cv_host
2859ac_save_IFS=$IFS; IFS='-'
2860set x $ac_cv_host
2861shift
2862host_cpu=$1
2863host_vendor=$2
2864shift; shift
2865# Remember, the first character of IFS is used to create $*,
2866# except with old shells:
2867host_os=$*
2868IFS=$ac_save_IFS
2869case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2870
2871
2872
2873
2874
Ned Deily983df862014-08-22 13:30:59 -07002875# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2876rm -f pybuilddir.txt
2877
doko@python.orgd65e2ba2013-01-31 23:52:03 +01002878if test "$cross_compiling" = yes; then
2879 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2880$as_echo_n "checking for python interpreter for cross build... " >&6; }
2881 if test -z "$PYTHON_FOR_BUILD"; then
2882 for interp in python$PACKAGE_VERSION python2 python; do
2883 which $interp >/dev/null 2>&1 || continue
2884 if $interp -c 'import sys;sys.exit(not (sys.version_info[:2] >= (2,7) and sys.version_info[0] < 3))'; then
2885 break
2886 fi
2887 interp=
2888 done
2889 if test x$interp = x; then
2890 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2891 fi
2892 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2893$as_echo "$interp" >&6; }
2894 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/plat-$(MACHDEP) '$interp
2895 fi
2896elif test "$cross_compiling" = maybe; then
2897 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
2898else
2899 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2900fi
2901
2902
Martin v. Löwis11437992002-04-12 09:54:03 +00002903
Georg Brandlbcd64a32009-03-31 21:45:18 +00002904if test "$prefix" != "/"; then
2905 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2906fi
2907
2908
Martin v. Löwis11437992002-04-12 09:54:03 +00002909
2910
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002911# We don't use PACKAGE_ variables, and they cause conflicts
2912# with other autoconf-based packages that include Python.h
2913grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2914rm confdefs.h
2915mv confdefs.h.new confdefs.h
2916
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002917
Martin v. Löwis174440b2008-10-03 08:59:41 +00002918VERSION=2.7
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002919
Martin v. Löwis1142de32002-03-29 16:28:31 +00002920
2921SOVERSION=1.0
2922
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002923# The later defininition of _XOPEN_SOURCE disables certain features
2924# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2925
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002926$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002927
2928
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002929# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2930# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2931# them.
2932
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002933$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002934
2935
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002936# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2937# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2938# them.
2939
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002940$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002941
2942
Martin v. Löwisd6320502004-08-12 13:45:08 +00002943# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2944# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2945
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002946$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002947
2948
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002949# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2950# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2951# them.
2952
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002953$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002954
2955
2956
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002957define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002958
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002959# Arguments passed to configure.
2960
2961CONFIG_ARGS="$ac_configure_args"
2962
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
2964$as_echo_n "checking for --enable-universalsdk... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002965# Check whether --enable-universalsdk was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002966if test "${enable_universalsdk+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00002967 enableval=$enable_universalsdk;
Ronald Oussoren988117f2006-04-29 11:31:35 +00002968 case $enableval in
2969 yes)
2970 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002971 if test ! -d "${enableval}"
2972 then
2973 enableval=/
2974 fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00002975 ;;
2976 esac
2977 case $enableval in
2978 no)
2979 UNIVERSALSDK=
2980 enable_universalsdk=
2981 ;;
2982 *)
2983 UNIVERSALSDK=$enableval
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002984 if test ! -d "${UNIVERSALSDK}"
2985 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002986 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002987 fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00002988 ;;
2989 esac
2990
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002991
Ronald Oussoren988117f2006-04-29 11:31:35 +00002992else
2993
2994 UNIVERSALSDK=
2995 enable_universalsdk=
2996
Martin v. Löwiseba40652007-08-30 20:10:57 +00002997fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00002998
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002999if test -n "${UNIVERSALSDK}"
3000then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3002$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003003else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3005$as_echo "no" >&6; }
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003006fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00003007
Martin v. Löwiseba40652007-08-30 20:10:57 +00003008
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +00003009
Ned Deily8e60f6e2013-05-30 00:14:29 -07003010ARCH_RUN_32BIT=""
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +00003011
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003012UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren92919a62009-12-24 13:30:58 +00003013
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3015$as_echo_n "checking for --with-universal-archs... " >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003016
3017# Check whether --with-universal-archs was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003018if test "${with_universal_archs+set}" = set; then :
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003019 withval=$with_universal_archs;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
3021$as_echo "$withval" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003022 UNIVERSAL_ARCHS="$withval"
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00003023 if test "${enable_universalsdk}" ; then
3024 :
3025 else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003026 as_fn_error $? "--with-universal-archs without --enable-universalsdk. See Mac/README" "$LINENO" 5
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00003027 fi
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003028
3029else
3030
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 32-bit" >&5
3032$as_echo "32-bit" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003033
3034fi
3035
3036
3037
3038
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003039
3040# Check whether --with-framework-name was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003041if test "${with_framework_name+set}" = set; then :
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003042 withval=$with_framework_name;
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00003043 if test "${enable_framework}"; then
3044 :
3045 else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003046 as_fn_error $? "--with-framework-name without --enable-framework. See Mac/README" "$LINENO" 5
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00003047 fi
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003048 PYTHONFRAMEWORK=${withval}
3049 PYTHONFRAMEWORKDIR=${withval}.framework
3050 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3051
3052else
3053
3054 PYTHONFRAMEWORK=Python
3055 PYTHONFRAMEWORKDIR=Python.framework
3056 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3057
3058fi
3059
Martin v. Löwiseba40652007-08-30 20:10:57 +00003060# Check whether --enable-framework was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003061if test "${enable_framework+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003062 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003063 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003064 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003065 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003066 esac
3067 case $enableval in
3068 no)
3069 PYTHONFRAMEWORK=
3070 PYTHONFRAMEWORKDIR=no-framework
3071 PYTHONFRAMEWORKPREFIX=
3072 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00003073 FRAMEWORKINSTALLFIRST=
3074 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00003075 FRAMEWORKALTINSTALLFIRST=
3076 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00003077 if test "x${prefix}" = "xNONE"; then
3078 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3079 else
3080 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3081 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003082 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003083 ;;
3084 *)
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003085 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003086 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00003087 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003088 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure bininstall maninstall"
Ronald Oussoren92919a62009-12-24 13:30:58 +00003089 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3090 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003091 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003092
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00003093 if test "x${prefix}" = "xNONE" ; then
3094 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003095
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00003096 else
3097 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3098 fi
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003099
3100 case "${enableval}" in
3101 /System*)
3102 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3103 if test "${prefix}" = "NONE" ; then
3104 # See below
3105 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3106 fi
3107 ;;
3108
3109 /Library*)
3110 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3111 ;;
3112
3113 */Library/Frameworks)
3114 MDIR="`dirname "${enableval}"`"
3115 MDIR="`dirname "${MDIR}"`"
3116 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3117
3118 if test "${prefix}" = "NONE"; then
3119 # User hasn't specified the
3120 # --prefix option, but wants to install
3121 # the framework in a non-default location,
3122 # ensure that the compatibility links get
3123 # installed relative to that prefix as well
3124 # instead of in /usr/local.
3125 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3126 fi
3127 ;;
3128
3129 *)
3130 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3131 ;;
3132 esac
3133
Jack Jansen127e56e2001-09-11 14:41:54 +00003134 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Ronald Oussoren836b0392006-05-14 19:56:34 +00003135
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003136 # Add files for Mac specific code to the list of output
Ronald Oussoren836b0392006-05-14 19:56:34 +00003137 # files:
Martin v. Löwiseba40652007-08-30 20:10:57 +00003138 ac_config_files="$ac_config_files Mac/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00003139
Martin v. Löwiseba40652007-08-30 20:10:57 +00003140 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00003141
Martin v. Löwiseba40652007-08-30 20:10:57 +00003142 ac_config_files="$ac_config_files Mac/IDLE/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00003143
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003144 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3145
3146 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3147
Jack Jansene578a632001-08-15 01:27:14 +00003148 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003149
Guido van Rossum563e7081996-09-10 18:20:48 +00003150else
Martin v. Löwis11437992002-04-12 09:54:03 +00003151
Jack Jansene578a632001-08-15 01:27:14 +00003152 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003153 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003154 PYTHONFRAMEWORKPREFIX=
3155 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00003156 FRAMEWORKINSTALLFIRST=
3157 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00003158 FRAMEWORKALTINSTALLFIRST=
3159 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00003160 if test "x${prefix}" = "xNONE" ; then
3161 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3162 else
3163 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3164 fi
Jack Jansene578a632001-08-15 01:27:14 +00003165 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003166
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003167
Martin v. Löwiseba40652007-08-30 20:10:57 +00003168fi
3169
Michael W. Hudson54241132001-12-07 15:38:26 +00003170
3171
3172
3173
Jack Jansene578a632001-08-15 01:27:14 +00003174
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00003175
3176
Ronald Oussoren5b787322006-06-06 19:50:24 +00003177
3178
3179
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003180
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003181
Jack Jansene578a632001-08-15 01:27:14 +00003182##AC_ARG_WITH(dyld,
Matthias Klose22520ea2010-05-08 10:14:46 +00003183## AS_HELP_STRING([--with-dyld],
3184## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003185##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003186# Set name for machine-dependent library files
3187
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3189$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003190if test -z "$MACHDEP"
3191then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003192 # avoid using uname for cross builds
3193 if test "$cross_compiling" = yes; then
3194 # ac_sys_system and ac_sys_release are only used for setting
3195 # `define_xopen_source' in the case statement below. For the
3196 # current supported cross builds, this macro is not adjusted.
3197 case "$host" in
3198 *-*-linux*)
3199 ac_sys_system=Linux
3200 ;;
3201 *-*-cygwin*)
3202 ac_sys_system=Cygwin
3203 ;;
3204 *)
3205 # for now, limit cross builds to known configurations
3206 MACHDEP="unknown"
3207 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3208 esac
3209 ac_sys_release=
3210 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003211 ac_sys_system=`uname -s`
Georg Brandlfe18a112009-09-04 07:55:14 +00003212 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003213 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003214 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003215 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003216 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003217 fi
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003218 fi
3219 ac_md_system=`echo $ac_sys_system |
3220 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3221 ac_md_release=`echo $ac_sys_release |
3222 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3223 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003224
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003225 case $MACHDEP in
Victor Stinneracacbaa2011-08-20 14:02:38 +02003226 linux*) MACHDEP="linux2";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003227 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003228 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003229 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00003230 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003231 '') MACHDEP="unknown";;
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003232 esac
3233fi
3234
3235
3236if test "$cross_compiling" = yes; then
3237 case "$host" in
3238 *-*-linux*)
3239 case "$host_cpu" in
3240 arm*)
3241 _host_cpu=arm
3242 ;;
3243 *)
3244 _host_cpu=$host_cpu
3245 esac
3246 ;;
3247 *-*-cygwin*)
3248 _host_cpu=
3249 ;;
3250 *)
3251 # for now, limit cross builds to known configurations
3252 MACHDEP="unknown"
3253 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003254 esac
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003255 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003256fi
Guido van Rossum91922671997-10-09 20:24:13 +00003257
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003258# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3259# disable features if it is defined, without any means to access these
3260# features as extensions. For these systems, we skip the definition of
3261# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3262# some feature, make sure there is no alternative way to access this
3263# feature. Also, when using wildcards, make sure you have verified the
3264# need for not defining _XOPEN_SOURCE on all systems matching the
3265# wildcard, and that the wildcard does not include future systems
3266# (which may remove their limitations).
3267case $ac_sys_system/$ac_sys_release in
3268 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3269 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003270 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis7875ef62010-02-15 21:41:12 +00003271 # In addition, Stefan Krah confirms that issue #1244610 exists through
3272 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali97781b02011-07-22 23:43:42 +02003273 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Martin v. Löwiscb78de62007-12-29 18:49:21 +00003274 define_xopen_source=no
3275 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3276 # also defined. This can be overridden by defining _BSD_SOURCE
3277 # As this has a different meaning on Linux, only define it on OpenBSD
3278
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003279$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwiscb78de62007-12-29 18:49:21 +00003280
3281 ;;
Charles-François Natali97781b02011-07-22 23:43:42 +02003282 OpenBSD/*)
Martin v. Löwis5e2dd862010-02-15 08:32:00 +00003283 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3284 # also defined. This can be overridden by defining _BSD_SOURCE
3285 # As this has a different meaning on Linux, only define it on OpenBSD
3286
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003287$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis5e2dd862010-02-15 08:32:00 +00003288
3289 ;;
Martin v. Löwis4d542ec2006-11-25 15:39:19 +00003290 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3291 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3292 # Marc Recht
Benjamin Petersoneac68f42008-11-16 17:54:55 +00003293 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 +00003294 define_xopen_source=no;;
Martin v. Löwisb41afb52010-05-28 15:28:47 +00003295 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3296 # request to enable features supported by the standard as a request
3297 # to disable features not supported by the standard. The best way
3298 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3299 # entirely and define __EXTENSIONS__ instead.
3300 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003301 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003302 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3303 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003304 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003305 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003306 define_xopen_source=no;;
3307 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003308 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003309 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003310 define_xopen_source=no;;
Martin v. Löwisbb86d832008-11-04 20:40:09 +00003311 # On FreeBSD 4, the math functions C89 does not cover are never defined
3312 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3313 FreeBSD/4.*)
3314 define_xopen_source=no;;
3315 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3316 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3317 # identifies itself as Darwin/7.*
3318 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3319 # disables platform specific features beyond repair.
3320 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3321 # has no effect, don't bother defining them
3322 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003323 define_xopen_source=no;;
Ronald Oussorena55af9a2010-01-17 16:25:57 +00003324 Darwin/1[0-9].*)
3325 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003326 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3327 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3328 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003329 AIX/4)
3330 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003331 AIX/5)
3332 if test `uname -r` -eq 1; then
3333 define_xopen_source=no
3334 fi
3335 ;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00003336 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3337 # defining NI_NUMERICHOST.
3338 QNX/6.3.2)
3339 define_xopen_source=no
3340 ;;
Martin v. Löwisa0588362006-04-04 06:03:50 +00003341
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003342esac
3343
3344if test $define_xopen_source = yes
3345then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003346
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003347$as_echo "#define _XOPEN_SOURCE 600" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003348
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003349
3350 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3351 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3352 # several APIs are not declared. Since this is also needed in some
3353 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003354
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003355$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003356
3357
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003358
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003359$as_echo "#define _POSIX_C_SOURCE 200112L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003360
3361
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003362fi
3363
Guido van Rossum91922671997-10-09 20:24:13 +00003364#
3365# SGI compilers allow the specification of the both the ABI and the
3366# ISA on the command line. Depending on the values of these switches,
3367# different and often incompatable code will be generated.
3368#
3369# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3370# thus supply support for various ABI/ISA combinations. The MACHDEP
3371# variable is also adjusted.
3372#
3373
3374if test ! -z "$SGI_ABI"
3375then
3376 CC="cc $SGI_ABI"
3377 LDFLAGS="$SGI_ABI $LDFLAGS"
3378 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3379fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003380{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3381$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003382
Jack Jansen83f898c2002-12-30 22:23:40 +00003383# And add extra plat-mac for darwin
3384
Jack Jansen7b59b422003-03-17 15:44:10 +00003385
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking EXTRAPLATDIR" >&5
3387$as_echo_n "checking EXTRAPLATDIR... " >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00003388if test -z "$EXTRAPLATDIR"
3389then
3390 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00003391 darwin)
3392 EXTRAPLATDIR="\$(PLATMACDIRS)"
3393 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
3394 ;;
3395 *)
3396 EXTRAPLATDIR=""
3397 EXTRAMACHDEPPATH=""
3398 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00003399 esac
3400fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003401{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRAPLATDIR" >&5
3402$as_echo "$EXTRAPLATDIR" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00003403
Jack Jansen6b08a402004-06-03 12:41:45 +00003404# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3405# it may influence the way we can build extensions, so distutils
3406# needs to check it
3407
Ronald Oussoren988117f2006-04-29 11:31:35 +00003408
Jack Jansen6b08a402004-06-03 12:41:45 +00003409CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Ronald Oussoren988117f2006-04-29 11:31:35 +00003410EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003411
Guido van Rossum627b2d71993-12-24 10:39:16 +00003412# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003413
3414# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3415# for debug/optimization stuff. BASECFLAGS is for flags that are required
3416# just to get things to compile and link. Users are free to override OPT
3417# when running configure or make. The build should not break if they do.
3418# BASECFLAGS should generally not be messed with, however.
3419
3420# XXX shouldn't some/most/all of this code be merged with the stuff later
3421# on that fiddles with OPT and BASECFLAGS?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3423$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003424
Martin v. Löwiseba40652007-08-30 20:10:57 +00003425# Check whether --with-gcc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003426if test "${with_gcc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003427 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003428 case $withval in
Mark Dickinson04b27232009-01-04 12:29:36 +00003429 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003430 without_gcc=yes;;
3431 yes) CC=gcc
3432 without_gcc=no;;
3433 *) CC=$withval
3434 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003435 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003436else
Martin v. Löwis11437992002-04-12 09:54:03 +00003437
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003438 case $ac_sys_system in
Antoine Pitrou285cd162010-09-21 15:23:17 +00003439 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003440 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003441 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003442 case $BE_HOST_CPU in
3443 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00003444 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003445 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00003446 BASECFLAGS="$BASECFLAGS -export pragma"
3447 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003448 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003449 ;;
3450 x86)
Fred Drake5790be12000-10-09 17:06:13 +00003451 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003452 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00003453 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003454 ;;
3455 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003456 as_fn_error $? "Unknown BeOS platform \"$BE_HOST_CPU\"" "$LINENO" 5
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003457 ;;
3458 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003459 AR="\$(srcdir)/Modules/ar_beos"
3460 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003461 ;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003462 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003463 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00003464fi
3465
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003466{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3467$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003468
Guido van Rossum8b131c51995-03-09 14:10:13 +00003469# If the user switches compilers, we can't believe the cache
3470if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3471then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003472 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003473(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003474fi
3475
Trent Nelson15daa352012-12-13 06:46:39 +00003476if test "$MACHDEP" = "irix6" && test "$CC" != "gcc"; then
3477 # Normally, MIPSpro CC treats #error directives as warnings, which means
3478 # a successful exit code is returned (0). This is a problem because IRIX
3479 # has a bunch of system headers with this guard at the top:
3480 #
3481 # #ifndef __c99
3482 # #error This header file is to be used only for c99 mode compilations
3483 # #else
3484 #
3485 # When autoconf tests for such a header, like stdint.h, this happens:
3486 #
3487 # configure:4619: cc -c conftest.c >&5
3488 # cc-1035 cc: WARNING File = /usr/include/stdint.h, Line = 5
3489 # #error directive: This header file is to be used only for c99 mode
3490 # compilations
3491 #
3492 # #error This header file is to be used only for c99 mode compilations
3493 # ^
3494 #
3495 # configure:4619: $? = 0
3496 # configure:4619: result: yes
3497 #
3498 # Therefore, we use `-diag_error 1035` to have the compiler treat the
3499 # warning as an error, which causes cc to return a non-zero result,
3500 # which autoconf can interpret correctly.
3501 CFLAGS="$CFLAGS -diag_error 1035"
3502 # Whilst we're here, we might as well make sure CXX defaults to something
3503 # sensible if we're not using gcc.
3504 if test -z "$CXX"; then
3505 CXX="CC"
3506 fi
3507fi
3508
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00003509# If the user set CFLAGS, use this instead of the automatically
3510# determined setting
3511preset_cflags="$CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +00003512ac_ext=c
3513ac_cpp='$CPP $CPPFLAGS'
3514ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3515ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3516ac_compiler_gnu=$ac_cv_c_compiler_gnu
3517if test -n "$ac_tool_prefix"; then
3518 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3519set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3521$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003522if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003523 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003524else
3525 if test -n "$CC"; then
3526 ac_cv_prog_CC="$CC" # Let the user override the test.
3527else
Martin v. Löwis11437992002-04-12 09:54:03 +00003528as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3529for as_dir in $PATH
3530do
3531 IFS=$as_save_IFS
3532 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003533 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003534 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003535 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003536 $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 +00003537 break 2
3538 fi
3539done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003540 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003541IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003542
Jack Jansendd19cf82001-12-06 22:36:17 +00003543fi
3544fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003545CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003546if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3548$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003549else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003550 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3551$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003552fi
3553
Martin v. Löwiseba40652007-08-30 20:10:57 +00003554
Martin v. Löwis11437992002-04-12 09:54:03 +00003555fi
3556if test -z "$ac_cv_prog_CC"; then
3557 ac_ct_CC=$CC
3558 # Extract the first word of "gcc", so it can be a program name with args.
3559set dummy gcc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3561$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003562if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003563 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003564else
3565 if test -n "$ac_ct_CC"; then
3566 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3567else
3568as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3569for as_dir in $PATH
3570do
3571 IFS=$as_save_IFS
3572 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003573 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003574 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003575 ac_cv_prog_ac_ct_CC="gcc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003576 $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 +00003577 break 2
3578 fi
3579done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003580 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003581IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003582
3583fi
3584fi
3585ac_ct_CC=$ac_cv_prog_ac_ct_CC
3586if test -n "$ac_ct_CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003587 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3588$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003589else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003590 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3591$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003592fi
3593
Martin v. Löwiseba40652007-08-30 20:10:57 +00003594 if test "x$ac_ct_CC" = x; then
3595 CC=""
3596 else
3597 case $cross_compiling:$ac_tool_warned in
3598yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003599{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3600$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00003601ac_tool_warned=yes ;;
3602esac
3603 CC=$ac_ct_CC
3604 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003605else
3606 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003607fi
3608
Jack Jansendd19cf82001-12-06 22:36:17 +00003609if test -z "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003610 if test -n "$ac_tool_prefix"; then
3611 # 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 +00003612set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3614$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003615if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003616 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003617else
3618 if test -n "$CC"; then
3619 ac_cv_prog_CC="$CC" # Let the user override the test.
3620else
Martin v. Löwis11437992002-04-12 09:54:03 +00003621as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3622for as_dir in $PATH
3623do
3624 IFS=$as_save_IFS
3625 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003626 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003627 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003628 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003629 $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 +00003630 break 2
3631 fi
3632done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003633 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003634IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003635
3636fi
3637fi
3638CC=$ac_cv_prog_CC
3639if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3641$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003642else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3644$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003645fi
3646
Martin v. Löwiseba40652007-08-30 20:10:57 +00003647
Martin v. Löwis11437992002-04-12 09:54:03 +00003648 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003649fi
3650if test -z "$CC"; then
3651 # Extract the first word of "cc", so it can be a program name with args.
3652set dummy cc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3654$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003655if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003656 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003657else
3658 if test -n "$CC"; then
3659 ac_cv_prog_CC="$CC" # Let the user override the test.
3660else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003661 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003662as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3663for as_dir in $PATH
3664do
3665 IFS=$as_save_IFS
3666 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003667 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003668 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003669 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3670 ac_prog_rejected=yes
3671 continue
3672 fi
3673 ac_cv_prog_CC="cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003674 $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 +00003675 break 2
3676 fi
3677done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003678 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003679IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003680
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003681if test $ac_prog_rejected = yes; then
3682 # We found a bogon in the path, so make sure we never use it.
3683 set dummy $ac_cv_prog_CC
3684 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003685 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003686 # We chose a different compiler from the bogus one.
3687 # However, it has the same basename, so the bogon will be chosen
3688 # first if we set CC to just the basename; use the full file name.
3689 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003690 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003691 fi
3692fi
3693fi
3694fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003695CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003696if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3698$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003699else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3701$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003702fi
3703
Martin v. Löwiseba40652007-08-30 20:10:57 +00003704
Martin v. Löwis11437992002-04-12 09:54:03 +00003705fi
3706if test -z "$CC"; then
3707 if test -n "$ac_tool_prefix"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003708 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003709 do
3710 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3711set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3713$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003714if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003715 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003716else
3717 if test -n "$CC"; then
3718 ac_cv_prog_CC="$CC" # Let the user override the test.
3719else
Martin v. Löwis11437992002-04-12 09:54:03 +00003720as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3721for as_dir in $PATH
3722do
3723 IFS=$as_save_IFS
3724 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003725 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003726 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003727 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003728 $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 +00003729 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003730 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003731done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003732 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003733IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003734
3735fi
3736fi
3737CC=$ac_cv_prog_CC
3738if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3740$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003741else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003742 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3743$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003744fi
3745
Martin v. Löwiseba40652007-08-30 20:10:57 +00003746
Martin v. Löwis11437992002-04-12 09:54:03 +00003747 test -n "$CC" && break
3748 done
3749fi
3750if test -z "$CC"; then
3751 ac_ct_CC=$CC
Martin v. Löwiseba40652007-08-30 20:10:57 +00003752 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003753do
3754 # Extract the first word of "$ac_prog", so it can be a program name with args.
3755set dummy $ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3757$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003758if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003759 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003760else
3761 if test -n "$ac_ct_CC"; then
3762 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3763else
3764as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3765for as_dir in $PATH
3766do
3767 IFS=$as_save_IFS
3768 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003769 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003770 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003771 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003772 $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 +00003773 break 2
3774 fi
3775done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003776 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003777IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003778
Martin v. Löwis11437992002-04-12 09:54:03 +00003779fi
3780fi
3781ac_ct_CC=$ac_cv_prog_ac_ct_CC
3782if test -n "$ac_ct_CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3784$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003785else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3787$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003788fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003789
Martin v. Löwiseba40652007-08-30 20:10:57 +00003790
Martin v. Löwis11437992002-04-12 09:54:03 +00003791 test -n "$ac_ct_CC" && break
3792done
Michael W. Hudson54241132001-12-07 15:38:26 +00003793
Martin v. Löwiseba40652007-08-30 20:10:57 +00003794 if test "x$ac_ct_CC" = x; then
3795 CC=""
3796 else
3797 case $cross_compiling:$ac_tool_warned in
3798yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003799{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3800$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00003801ac_tool_warned=yes ;;
3802esac
3803 CC=$ac_ct_CC
3804 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003805fi
3806
3807fi
3808
3809
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003810test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3811$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003812as_fn_error $? "no acceptable C compiler found in \$PATH
Matthias Klose3cef2a92012-03-14 23:39:33 +01003813See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003814
3815# Provide some information about the compiler.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003816$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3817set X $ac_compile
3818ac_compiler=$2
3819for ac_option in --version -v -V -qversion; do
3820 { { ac_try="$ac_compiler $ac_option >&5"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003821case "(($ac_try" in
3822 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3823 *) ac_try_echo=$ac_try;;
3824esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003825eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3826$as_echo "$ac_try_echo"; } >&5
3827 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003828 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003829 if test -s conftest.err; then
3830 sed '10a\
3831... rest of stderr output deleted ...
3832 10q' conftest.err >conftest.er1
3833 cat conftest.er1 >&5
3834 fi
3835 rm -f conftest.er1 conftest.err
3836 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3837 test $ac_status = 0; }
3838done
Martin v. Löwis11437992002-04-12 09:54:03 +00003839
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003840cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003841/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003842
Martin v. Löwis11437992002-04-12 09:54:03 +00003843int
3844main ()
3845{
3846
3847 ;
3848 return 0;
3849}
3850_ACEOF
3851ac_clean_files_save=$ac_clean_files
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003852ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003853# Try to create an executable without -o first, disregard a.out.
3854# It will help us diagnose broken compilers, and finding out an intuition
3855# of exeext.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3857$as_echo_n "checking whether the C compiler works... " >&6; }
3858ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3859
3860# The possible output files:
3861ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3862
Martin v. Löwiseba40652007-08-30 20:10:57 +00003863ac_rmfiles=
3864for ac_file in $ac_files
3865do
3866 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003867 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00003868 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3869 esac
3870done
3871rm -f $ac_rmfiles
3872
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003873if { { ac_try="$ac_link_default"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003874case "(($ac_try" in
3875 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3876 *) ac_try_echo=$ac_try;;
3877esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003878eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3879$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003880 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003881 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003882 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3883 test $ac_status = 0; }; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003884 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3885# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3886# in a Makefile. We should not override ac_cv_exeext if it was cached,
3887# so that the user can short-circuit this test for compilers unknown to
3888# Autoconf.
3889for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003890do
3891 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003892 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003893 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Skip Montanarof0d5f792004-08-15 14:08:23 +00003894 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003895 [ab].out )
Skip Montanarof0d5f792004-08-15 14:08:23 +00003896 # We found the default executable, but exeext='' is most
3897 # certainly right.
3898 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003899 *.* )
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003900 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Martin v. Löwiseba40652007-08-30 20:10:57 +00003901 then :; else
3902 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3903 fi
3904 # We set ac_cv_exeext here because the later test for it is not
3905 # safe: cross compilers may not add the suffix if given an `-o'
3906 # argument, so we may need to know it at that point already.
3907 # Even if this section looks crufty: it has the advantage of
3908 # actually working.
Skip Montanarof0d5f792004-08-15 14:08:23 +00003909 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003910 * )
Skip Montanarof0d5f792004-08-15 14:08:23 +00003911 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003912 esac
3913done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003914test "$ac_cv_exeext" = no && ac_cv_exeext=
3915
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003916else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003917 ac_file=''
3918fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003919if test -z "$ac_file"; then :
3920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3921$as_echo "no" >&6; }
3922$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003923sed 's/^/| /' conftest.$ac_ext >&5
3924
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003925{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3926$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003927as_fn_error 77 "C compiler cannot create executables
Matthias Klose3cef2a92012-03-14 23:39:33 +01003928See \`config.log' for more details" "$LINENO" 5; }
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003929else
3930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3931$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003932fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3934$as_echo_n "checking for C compiler default output file name... " >&6; }
3935{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3936$as_echo "$ac_file" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003937ac_exeext=$ac_cv_exeext
Michael W. Hudson54241132001-12-07 15:38:26 +00003938
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003939rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00003940ac_clean_files=$ac_clean_files_save
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3942$as_echo_n "checking for suffix of executables... " >&6; }
3943if { { ac_try="$ac_link"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003944case "(($ac_try" in
3945 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3946 *) ac_try_echo=$ac_try;;
3947esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003948eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3949$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003950 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003951 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003952 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3953 test $ac_status = 0; }; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00003954 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3955# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3956# work properly (i.e., refer to `conftest.exe'), while it won't with
3957# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00003958for ac_file in conftest.exe conftest conftest.*; do
3959 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003960 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003961 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003962 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
Skip Montanarof0d5f792004-08-15 14:08:23 +00003963 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003964 * ) break;;
3965 esac
3966done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003967else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003968 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3969$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003970as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Matthias Klose3cef2a92012-03-14 23:39:33 +01003971See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003972fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003973rm -f conftest conftest$ac_cv_exeext
3974{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3975$as_echo "$ac_cv_exeext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003976
3977rm -f conftest.$ac_ext
3978EXEEXT=$ac_cv_exeext
3979ac_exeext=$EXEEXT
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003980cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3981/* end confdefs.h. */
3982#include <stdio.h>
3983int
3984main ()
3985{
3986FILE *f = fopen ("conftest.out", "w");
3987 return ferror (f) || fclose (f) != 0;
3988
3989 ;
3990 return 0;
3991}
Skip Montanaro6dead952003-09-25 14:50:04 +00003992_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003993ac_clean_files="$ac_clean_files conftest.out"
3994# Check that the compiler produces executables we can run. If not, either
3995# the compiler is broken, or we cross compile.
3996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3997$as_echo_n "checking whether we are cross compiling... " >&6; }
3998if test "$cross_compiling" != yes; then
3999 { { ac_try="$ac_link"
4000case "(($ac_try" in
4001 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4002 *) ac_try_echo=$ac_try;;
4003esac
4004eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4005$as_echo "$ac_try_echo"; } >&5
4006 (eval "$ac_link") 2>&5
4007 ac_status=$?
4008 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4009 test $ac_status = 0; }
4010 if { ac_try='./conftest$ac_cv_exeext'
4011 { { case "(($ac_try" in
4012 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4013 *) ac_try_echo=$ac_try;;
4014esac
4015eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4016$as_echo "$ac_try_echo"; } >&5
4017 (eval "$ac_try") 2>&5
4018 ac_status=$?
4019 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4020 test $ac_status = 0; }; }; then
4021 cross_compiling=no
4022 else
4023 if test "$cross_compiling" = maybe; then
4024 cross_compiling=yes
4025 else
4026 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4027$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004028as_fn_error $? "cannot run C compiled programs.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004029If you meant to cross compile, use \`--host'.
Matthias Klose3cef2a92012-03-14 23:39:33 +01004030See \`config.log' for more details" "$LINENO" 5; }
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004031 fi
4032 fi
4033fi
4034{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4035$as_echo "$cross_compiling" >&6; }
4036
4037rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4038ac_clean_files=$ac_clean_files_save
4039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4040$as_echo_n "checking for suffix of object files... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004041if ${ac_cv_objext+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004042 $as_echo_n "(cached) " >&6
4043else
4044 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004045/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004046
Martin v. Löwis11437992002-04-12 09:54:03 +00004047int
4048main ()
4049{
4050
4051 ;
4052 return 0;
4053}
4054_ACEOF
4055rm -f conftest.o conftest.obj
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004056if { { ac_try="$ac_compile"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004057case "(($ac_try" in
4058 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4059 *) ac_try_echo=$ac_try;;
4060esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004061eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4062$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00004063 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004064 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004065 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4066 test $ac_status = 0; }; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004067 for ac_file in conftest.o conftest.obj conftest.*; do
4068 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004069 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004070 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004071 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4072 break;;
4073 esac
4074done
4075else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004076 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004077sed 's/^/| /' conftest.$ac_ext >&5
4078
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004079{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4080$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004081as_fn_error $? "cannot compute suffix of object files: cannot compile
Matthias Klose3cef2a92012-03-14 23:39:33 +01004082See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004083fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004084rm -f conftest.$ac_cv_objext conftest.$ac_ext
4085fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004086{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4087$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004088OBJEXT=$ac_cv_objext
4089ac_objext=$OBJEXT
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4091$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004092if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004093 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004094else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004095 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004096/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004097
Martin v. Löwis11437992002-04-12 09:54:03 +00004098int
4099main ()
4100{
4101#ifndef __GNUC__
4102 choke me
4103#endif
4104
4105 ;
4106 return 0;
4107}
4108_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004109if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004110 ac_compiler_gnu=yes
4111else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004112 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004113fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004114rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004115ac_cv_c_compiler_gnu=$ac_compiler_gnu
4116
4117fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004118{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4119$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4120if test $ac_compiler_gnu = yes; then
4121 GCC=yes
4122else
4123 GCC=
4124fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004125ac_test_CFLAGS=${CFLAGS+set}
4126ac_save_CFLAGS=$CFLAGS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4128$as_echo_n "checking whether $CC accepts -g... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004129if ${ac_cv_prog_cc_g+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004130 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004131else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004132 ac_save_c_werror_flag=$ac_c_werror_flag
4133 ac_c_werror_flag=yes
4134 ac_cv_prog_cc_g=no
4135 CFLAGS="-g"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004136 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004137/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004138
Martin v. Löwis11437992002-04-12 09:54:03 +00004139int
4140main ()
4141{
4142
4143 ;
4144 return 0;
4145}
4146_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004147if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004148 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004149else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004150 CFLAGS=""
4151 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004152/* end confdefs.h. */
4153
4154int
4155main ()
4156{
4157
4158 ;
4159 return 0;
4160}
4161_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004162if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004163
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004164else
4165 ac_c_werror_flag=$ac_save_c_werror_flag
Martin v. Löwiseba40652007-08-30 20:10:57 +00004166 CFLAGS="-g"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004167 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004168/* end confdefs.h. */
4169
4170int
4171main ()
4172{
4173
4174 ;
4175 return 0;
4176}
4177_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004178if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004179 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004180fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004181rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004182fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004183rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4184fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004185rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4186 ac_c_werror_flag=$ac_save_c_werror_flag
4187fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004188{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4189$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004190if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004191 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004192elif test $ac_cv_prog_cc_g = yes; then
4193 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004194 CFLAGS="-g -O2"
4195 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004196 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004197 fi
4198else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004199 if test "$GCC" = yes; then
4200 CFLAGS="-O2"
4201 else
4202 CFLAGS=
4203 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004204fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4206$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004207if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004208 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004209else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004210 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004211ac_save_CC=$CC
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004212cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004213/* end confdefs.h. */
4214#include <stdarg.h>
4215#include <stdio.h>
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004216struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004217/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4218struct buf { int x; };
4219FILE * (*rcsopen) (struct buf *, struct stat *, int);
4220static char *e (p, i)
4221 char **p;
4222 int i;
4223{
4224 return p[i];
4225}
4226static char *f (char * (*g) (char **, int), char **p, ...)
4227{
4228 char *s;
4229 va_list v;
4230 va_start (v,p);
4231 s = g (p, va_arg (v,int));
4232 va_end (v);
4233 return s;
4234}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004235
4236/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4237 function prototypes and stuff, but not '\xHH' hex character constants.
4238 These don't provoke an error unfortunately, instead are silently treated
Martin v. Löwiseba40652007-08-30 20:10:57 +00004239 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004240 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4241 array size at least. It's necessary to write '\x00'==0 to get something
Martin v. Löwiseba40652007-08-30 20:10:57 +00004242 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004243int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4244
Martin v. Löwiseba40652007-08-30 20:10:57 +00004245/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4246 inside strings and character constants. */
4247#define FOO(x) 'x'
4248int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4249
Skip Montanaro6dead952003-09-25 14:50:04 +00004250int test (int i, double x);
4251struct s1 {int (*f) (int a);};
4252struct s2 {int (*f) (double a);};
4253int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4254int argc;
4255char **argv;
4256int
4257main ()
4258{
4259return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4260 ;
4261 return 0;
4262}
4263_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00004264for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4265 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004266do
4267 CC="$ac_save_CC $ac_arg"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004268 if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004269 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004270fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004271rm -f core conftest.err conftest.$ac_objext
4272 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004273done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004274rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004275CC=$ac_save_CC
4276
4277fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004278# AC_CACHE_VAL
4279case "x$ac_cv_prog_cc_c89" in
4280 x)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4282$as_echo "none needed" >&6; } ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00004283 xno)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4285$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004286 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00004287 CC="$CC $ac_cv_prog_cc_c89"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004288 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4289$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004290esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004291if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004292
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004293fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004294
Martin v. Löwis11437992002-04-12 09:54:03 +00004295ac_ext=c
4296ac_cpp='$CPP $CPPFLAGS'
4297ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4298ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4299ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004300
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00004301if test ! -z "$preset_cflags"
4302then
4303 CFLAGS=$preset_cflags
4304fi
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004305
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004306
4307
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4309$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004310
Martin v. Löwiseba40652007-08-30 20:10:57 +00004311# Check whether --with-cxx_main was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004312if test "${with_cxx_main+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004313 withval=$with_cxx_main;
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004314
4315 case $withval in
4316 no) with_cxx_main=no
4317 MAINCC='$(CC)';;
4318 yes) with_cxx_main=yes
4319 MAINCC='$(CXX)';;
4320 *) with_cxx_main=yes
4321 MAINCC=$withval
4322 if test -z "$CXX"
4323 then
4324 CXX=$withval
4325 fi;;
4326 esac
4327else
4328
4329 with_cxx_main=no
4330 MAINCC='$(CC)'
4331
Martin v. Löwiseba40652007-08-30 20:10:57 +00004332fi
4333
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004334{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4335$as_echo "$with_cxx_main" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004336
4337preset_cxx="$CXX"
4338if test -z "$CXX"
4339then
4340 case "$CC" in
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004341 gcc) if test -n "$ac_tool_prefix"; then
4342 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4343set dummy ${ac_tool_prefix}g++; ac_word=$2
4344{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4345$as_echo_n "checking for $ac_word... " >&6; }
4346if ${ac_cv_path_CXX+:} false; then :
4347 $as_echo_n "(cached) " >&6
4348else
4349 case $CXX in
4350 [\\/]* | ?:[\\/]*)
4351 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4352 ;;
4353 *)
4354 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4355for as_dir in notfound
4356do
4357 IFS=$as_save_IFS
4358 test -z "$as_dir" && as_dir=.
4359 for ac_exec_ext in '' $ac_executable_extensions; do
4360 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4361 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4362 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4363 break 2
4364 fi
4365done
4366 done
4367IFS=$as_save_IFS
4368
4369 ;;
4370esac
4371fi
4372CXX=$ac_cv_path_CXX
4373if test -n "$CXX"; then
4374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4375$as_echo "$CXX" >&6; }
4376else
4377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4378$as_echo "no" >&6; }
4379fi
4380
4381
4382fi
4383if test -z "$ac_cv_path_CXX"; then
4384 ac_pt_CXX=$CXX
4385 # Extract the first word of "g++", so it can be a program name with args.
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004386set dummy g++; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4388$as_echo_n "checking for $ac_word... " >&6; }
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004389if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004390 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004391else
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004392 case $ac_pt_CXX in
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004393 [\\/]* | ?:[\\/]*)
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004394 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 +00004395 ;;
4396 *)
4397 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4398for as_dir in notfound
4399do
4400 IFS=$as_save_IFS
4401 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004402 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004403 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004404 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004405 $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 +00004406 break 2
4407 fi
4408done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004409 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004410IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004411
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004412 ;;
4413esac
4414fi
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004415ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4416if test -n "$ac_pt_CXX"; then
4417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4418$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004419else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4421$as_echo "no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004422fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004423
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004424 if test "x$ac_pt_CXX" = x; then
4425 CXX="g++"
4426 else
4427 case $cross_compiling:$ac_tool_warned in
4428yes:)
4429{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4430$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4431ac_tool_warned=yes ;;
4432esac
4433 CXX=$ac_pt_CXX
4434 fi
4435else
4436 CXX="$ac_cv_path_CXX"
4437fi
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004438 ;;
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004439 cc) if test -n "$ac_tool_prefix"; then
4440 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4441set dummy ${ac_tool_prefix}c++; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4443$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004444if ${ac_cv_path_CXX+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004445 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004446else
4447 case $CXX in
4448 [\\/]* | ?:[\\/]*)
4449 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4450 ;;
4451 *)
4452 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4453for as_dir in notfound
4454do
4455 IFS=$as_save_IFS
4456 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004457 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004458 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004459 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004460 $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 +00004461 break 2
4462 fi
4463done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004464 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004465IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004466
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004467 ;;
4468esac
4469fi
4470CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00004471if test -n "$CXX"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4473$as_echo "$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004474else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4476$as_echo "no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004477fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004478
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004479
4480fi
4481if test -z "$ac_cv_path_CXX"; then
4482 ac_pt_CXX=$CXX
4483 # Extract the first word of "c++", so it can be a program name with args.
4484set dummy c++; ac_word=$2
4485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4486$as_echo_n "checking for $ac_word... " >&6; }
4487if ${ac_cv_path_ac_pt_CXX+:} false; then :
4488 $as_echo_n "(cached) " >&6
4489else
4490 case $ac_pt_CXX in
4491 [\\/]* | ?:[\\/]*)
4492 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4493 ;;
4494 *)
4495 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4496for as_dir in notfound
4497do
4498 IFS=$as_save_IFS
4499 test -z "$as_dir" && as_dir=.
4500 for ac_exec_ext in '' $ac_executable_extensions; do
4501 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4502 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4503 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4504 break 2
4505 fi
4506done
4507 done
4508IFS=$as_save_IFS
4509
4510 ;;
4511esac
4512fi
4513ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4514if test -n "$ac_pt_CXX"; then
4515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4516$as_echo "$ac_pt_CXX" >&6; }
4517else
4518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4519$as_echo "no" >&6; }
4520fi
4521
4522 if test "x$ac_pt_CXX" = x; then
4523 CXX="c++"
4524 else
4525 case $cross_compiling:$ac_tool_warned in
4526yes:)
4527{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4528$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4529ac_tool_warned=yes ;;
4530esac
4531 CXX=$ac_pt_CXX
4532 fi
4533else
4534 CXX="$ac_cv_path_CXX"
4535fi
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004536 ;;
4537 esac
4538 if test "$CXX" = "notfound"
4539 then
4540 CXX=""
4541 fi
4542fi
4543if test -z "$CXX"
4544then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004545 if test -n "$ac_tool_prefix"; then
4546 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4547 do
4548 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4549set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4551$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004552if ${ac_cv_prog_CXX+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004553 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004554else
4555 if test -n "$CXX"; then
4556 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4557else
4558as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4559for as_dir in $PATH
4560do
4561 IFS=$as_save_IFS
4562 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004563 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004564 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004565 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004566 $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 +00004567 break 2
4568 fi
4569done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004570 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004571IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004572
4573fi
4574fi
4575CXX=$ac_cv_prog_CXX
4576if test -n "$CXX"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4578$as_echo "$CXX" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004579else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004580 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4581$as_echo "no" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004582fi
4583
Martin v. Löwiseba40652007-08-30 20:10:57 +00004584
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004585 test -n "$CXX" && break
4586 done
4587fi
4588if test -z "$CXX"; then
4589 ac_ct_CXX=$CXX
4590 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4591do
4592 # Extract the first word of "$ac_prog", so it can be a program name with args.
4593set dummy $ac_prog; ac_word=$2
4594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4595$as_echo_n "checking for $ac_word... " >&6; }
4596if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4597 $as_echo_n "(cached) " >&6
4598else
4599 if test -n "$ac_ct_CXX"; then
4600 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4601else
4602as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4603for as_dir in $PATH
4604do
4605 IFS=$as_save_IFS
4606 test -z "$as_dir" && as_dir=.
4607 for ac_exec_ext in '' $ac_executable_extensions; do
4608 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4609 ac_cv_prog_ac_ct_CXX="$ac_prog"
4610 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4611 break 2
4612 fi
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004613done
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004614 done
4615IFS=$as_save_IFS
4616
4617fi
4618fi
4619ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4620if test -n "$ac_ct_CXX"; then
4621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4622$as_echo "$ac_ct_CXX" >&6; }
4623else
4624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4625$as_echo "no" >&6; }
4626fi
4627
4628
4629 test -n "$ac_ct_CXX" && break
4630done
4631
4632 if test "x$ac_ct_CXX" = x; then
4633 CXX="notfound"
4634 else
4635 case $cross_compiling:$ac_tool_warned in
4636yes:)
4637{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4638$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4639ac_tool_warned=yes ;;
4640esac
4641 CXX=$ac_ct_CXX
4642 fi
4643fi
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004644
4645 if test "$CXX" = "notfound"
4646 then
4647 CXX=""
4648 fi
4649fi
4650if test "$preset_cxx" != "$CXX"
4651then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004652 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004653
4654 By default, distutils will build C++ extension modules with \"$CXX\".
4655 If this is not intended, then set CXX on the configure command line.
4656 " >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004657$as_echo "$as_me: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004658
4659 By default, distutils will build C++ extension modules with \"$CXX\".
4660 If this is not intended, then set CXX on the configure command line.
4661 " >&2;}
4662fi
4663
doko@python.org4e63fbe2013-01-25 13:08:27 +01004664MULTIARCH=$($CC --print-multiarch 2>/dev/null)
4665
4666
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004667
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004668# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004669
4670ac_ext=c
4671ac_cpp='$CPP $CPPFLAGS'
4672ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4673ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4674ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4676$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004677# On Suns, sometimes $CPP names a directory.
4678if test -n "$CPP" && test -d "$CPP"; then
4679 CPP=
4680fi
4681if test -z "$CPP"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +01004682 if ${ac_cv_prog_CPP+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004683 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004684else
Martin v. Löwis11437992002-04-12 09:54:03 +00004685 # Double quotes because CPP needs to be expanded
4686 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4687 do
4688 ac_preproc_ok=false
4689for ac_c_preproc_warn_flag in '' yes
4690do
4691 # Use a header file that comes with gcc, so configuring glibc
4692 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004693 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4694 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004695 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004696 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004697 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004698/* end confdefs.h. */
4699#ifdef __STDC__
4700# include <limits.h>
4701#else
4702# include <assert.h>
4703#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004704 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004705_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004706if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004707
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004708else
Martin v. Löwis11437992002-04-12 09:54:03 +00004709 # Broken: fails on valid input.
4710continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004711fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004712rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004713
Martin v. Löwiseba40652007-08-30 20:10:57 +00004714 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004715 # can be detected and how.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004716 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004717/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004718#include <ac_nonexistent.h>
4719_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004720if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004721 # Broken: success on invalid input.
4722continue
4723else
Martin v. Löwis11437992002-04-12 09:54:03 +00004724 # Passes both tests.
4725ac_preproc_ok=:
4726break
4727fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004728rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004729
4730done
4731# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004732rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004733if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004734 break
4735fi
4736
4737 done
4738 ac_cv_prog_CPP=$CPP
4739
4740fi
4741 CPP=$ac_cv_prog_CPP
4742else
4743 ac_cv_prog_CPP=$CPP
4744fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004745{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4746$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004747ac_preproc_ok=false
4748for ac_c_preproc_warn_flag in '' yes
4749do
4750 # Use a header file that comes with gcc, so configuring glibc
4751 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004752 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4753 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004754 # On the NeXT, cc -E runs the code through the compiler's parser,
4755 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004756 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004757/* end confdefs.h. */
4758#ifdef __STDC__
4759# include <limits.h>
4760#else
4761# include <assert.h>
4762#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004763 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004764_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004765if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004766
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004767else
Martin v. Löwis11437992002-04-12 09:54:03 +00004768 # Broken: fails on valid input.
4769continue
4770fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004771rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004772
Martin v. Löwiseba40652007-08-30 20:10:57 +00004773 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004774 # can be detected and how.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004775 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004776/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004777#include <ac_nonexistent.h>
4778_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004779if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004780 # Broken: success on invalid input.
4781continue
4782else
Martin v. Löwis11437992002-04-12 09:54:03 +00004783 # Passes both tests.
4784ac_preproc_ok=:
4785break
4786fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004787rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004788
4789done
4790# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004791rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004792if $ac_preproc_ok; then :
4793
Martin v. Löwis11437992002-04-12 09:54:03 +00004794else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004795 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4796$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004797as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
Matthias Klose3cef2a92012-03-14 23:39:33 +01004798See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004799fi
4800
4801ac_ext=c
4802ac_cpp='$CPP $CPPFLAGS'
4803ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4804ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4805ac_compiler_gnu=$ac_cv_c_compiler_gnu
4806
4807
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4809$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004810if ${ac_cv_path_GREP+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004811 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004812else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004813 if test -z "$GREP"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004814 ac_path_GREP_found=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004815 # Loop through the user's path and test for each of PROGNAME-LIST
4816 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00004817for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4818do
4819 IFS=$as_save_IFS
4820 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004821 for ac_prog in grep ggrep; do
4822 for ac_exec_ext in '' $ac_executable_extensions; do
4823 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004824 as_fn_executable_p "$ac_path_GREP" || continue
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004825# Check for GNU ac_path_GREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004826 # Check for GNU $ac_path_GREP
4827case `"$ac_path_GREP" --version 2>&1` in
4828*GNU*)
4829 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4830*)
4831 ac_count=0
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004832 $as_echo_n 0123456789 >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004833 while :
4834 do
4835 cat "conftest.in" "conftest.in" >"conftest.tmp"
4836 mv "conftest.tmp" "conftest.in"
4837 cp "conftest.in" "conftest.nl"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004838 $as_echo 'GREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004839 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4840 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004841 as_fn_arith $ac_count + 1 && ac_count=$as_val
Martin v. Löwiseba40652007-08-30 20:10:57 +00004842 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4843 # Best one so far, save it but keep looking for a better one
4844 ac_cv_path_GREP="$ac_path_GREP"
4845 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00004846 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004847 # 10*(2^10) chars as input seems more than enough
4848 test $ac_count -gt 10 && break
4849 done
4850 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4851esac
4852
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004853 $ac_path_GREP_found && break 3
4854 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004855 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004856 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004857IFS=$as_save_IFS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004858 if test -z "$ac_cv_path_GREP"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004859 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 +00004860 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004861else
4862 ac_cv_path_GREP=$GREP
4863fi
4864
Martin v. Löwiseba40652007-08-30 20:10:57 +00004865fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004866{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4867$as_echo "$ac_cv_path_GREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00004868 GREP="$ac_cv_path_GREP"
4869
4870
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4872$as_echo_n "checking for egrep... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004873if ${ac_cv_path_EGREP+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004874 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +00004875else
4876 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4877 then ac_cv_path_EGREP="$GREP -E"
4878 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004879 if test -z "$EGREP"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004880 ac_path_EGREP_found=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004881 # Loop through the user's path and test for each of PROGNAME-LIST
4882 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00004883for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4884do
4885 IFS=$as_save_IFS
4886 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004887 for ac_prog in egrep; do
4888 for ac_exec_ext in '' $ac_executable_extensions; do
4889 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004890 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004891# Check for GNU ac_path_EGREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004892 # Check for GNU $ac_path_EGREP
4893case `"$ac_path_EGREP" --version 2>&1` in
4894*GNU*)
4895 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4896*)
4897 ac_count=0
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004898 $as_echo_n 0123456789 >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004899 while :
4900 do
4901 cat "conftest.in" "conftest.in" >"conftest.tmp"
4902 mv "conftest.tmp" "conftest.in"
4903 cp "conftest.in" "conftest.nl"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004904 $as_echo 'EGREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004905 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4906 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004907 as_fn_arith $ac_count + 1 && ac_count=$as_val
Martin v. Löwiseba40652007-08-30 20:10:57 +00004908 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4909 # Best one so far, save it but keep looking for a better one
4910 ac_cv_path_EGREP="$ac_path_EGREP"
4911 ac_path_EGREP_max=$ac_count
4912 fi
4913 # 10*(2^10) chars as input seems more than enough
4914 test $ac_count -gt 10 && break
4915 done
4916 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4917esac
4918
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004919 $ac_path_EGREP_found && break 3
4920 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004921 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004922 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004923IFS=$as_save_IFS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004924 if test -z "$ac_cv_path_EGREP"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004925 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 +00004926 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004927else
4928 ac_cv_path_EGREP=$EGREP
4929fi
4930
Martin v. Löwiseba40652007-08-30 20:10:57 +00004931 fi
4932fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004933{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4934$as_echo "$ac_cv_path_EGREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00004935 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00004936
4937
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4939$as_echo_n "checking for ANSI C header files... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004940if ${ac_cv_header_stdc+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004941 $as_echo_n "(cached) " >&6
4942else
4943 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00004944/* end confdefs.h. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004945#include <stdlib.h>
4946#include <stdarg.h>
4947#include <string.h>
4948#include <float.h>
4949
4950int
4951main ()
4952{
4953
4954 ;
4955 return 0;
4956}
4957_ACEOF
4958if ac_fn_c_try_compile "$LINENO"; then :
4959 ac_cv_header_stdc=yes
4960else
4961 ac_cv_header_stdc=no
4962fi
4963rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4964
4965if test $ac_cv_header_stdc = yes; then
4966 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4967 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4968/* end confdefs.h. */
4969#include <string.h>
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00004970
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00004971_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004972if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004973 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004974
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004975else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004976 ac_cv_header_stdc=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004977fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00004978rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004979
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004980fi
4981
4982if test $ac_cv_header_stdc = yes; then
4983 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4984 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4985/* end confdefs.h. */
4986#include <stdlib.h>
4987
4988_ACEOF
4989if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4990 $EGREP "free" >/dev/null 2>&1; then :
4991
4992else
4993 ac_cv_header_stdc=no
4994fi
4995rm -f conftest*
4996
4997fi
4998
4999if test $ac_cv_header_stdc = yes; then
5000 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5001 if test "$cross_compiling" = yes; then :
5002 :
5003else
5004 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5005/* end confdefs.h. */
5006#include <ctype.h>
5007#include <stdlib.h>
5008#if ((' ' & 0x0FF) == 0x020)
5009# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5010# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5011#else
5012# define ISLOWER(c) \
5013 (('a' <= (c) && (c) <= 'i') \
5014 || ('j' <= (c) && (c) <= 'r') \
5015 || ('s' <= (c) && (c) <= 'z'))
5016# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5017#endif
5018
5019#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5020int
5021main ()
5022{
5023 int i;
5024 for (i = 0; i < 256; i++)
5025 if (XOR (islower (i), ISLOWER (i))
5026 || toupper (i) != TOUPPER (i))
5027 return 2;
5028 return 0;
5029}
5030_ACEOF
5031if ac_fn_c_try_run "$LINENO"; then :
5032
5033else
5034 ac_cv_header_stdc=no
5035fi
5036rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5037 conftest.$ac_objext conftest.beam conftest.$ac_ext
5038fi
5039
5040fi
5041fi
5042{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5043$as_echo "$ac_cv_header_stdc" >&6; }
5044if test $ac_cv_header_stdc = yes; then
5045
5046$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5047
5048fi
5049
5050# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5051for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5052 inttypes.h stdint.h unistd.h
5053do :
5054 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5055ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5056"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00005057if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005058 cat >>confdefs.h <<_ACEOF
5059#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5060_ACEOF
5061
5062fi
5063
5064done
5065
5066
5067
5068 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 +01005069if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005070 MINIX=yes
5071else
5072 MINIX=
5073fi
5074
5075
5076 if test "$MINIX" = yes; then
5077
5078$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5079
5080
5081$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5082
5083
5084$as_echo "#define _MINIX 1" >>confdefs.h
5085
5086 fi
5087
5088
5089 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5090$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005091if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005092 $as_echo_n "(cached) " >&6
5093else
5094 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5095/* end confdefs.h. */
5096
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005097# define __EXTENSIONS__ 1
5098 $ac_includes_default
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005099int
5100main ()
5101{
5102
5103 ;
5104 return 0;
5105}
5106_ACEOF
5107if ac_fn_c_try_compile "$LINENO"; then :
5108 ac_cv_safe_to_define___extensions__=yes
5109else
5110 ac_cv_safe_to_define___extensions__=no
5111fi
5112rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5113fi
5114{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5115$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5116 test $ac_cv_safe_to_define___extensions__ = yes &&
5117 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5118
5119 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5120
5121 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5122
5123 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5124
5125 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5126
5127
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005128
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005129# Check for unsupported systems
5130case $ac_sys_system/$ac_sys_release in
5131atheos*|Linux*/1*)
5132 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5133 echo See README for details.
5134 exit 1;;
5135esac
5136
5137
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5139$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005140
5141# Check whether --with-suffix was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005142if test "${with_suffix+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005143 withval=$with_suffix;
5144 case $withval in
5145 no) EXEEXT=;;
5146 yes) EXEEXT=.exe;;
5147 *) EXEEXT=$withval;;
5148 esac
5149fi
5150
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005151{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5152$as_echo "$EXEEXT" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005153
5154# Test whether we're running on a non-case-sensitive system, in which
5155# case we give a warning if no ext is given
5156
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5158$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005159if test ! -d CaseSensitiveTestDir; then
5160mkdir CaseSensitiveTestDir
5161fi
5162
5163if test -d casesensitivetestdir
5164then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005165 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5166$as_echo "yes" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005167 BUILDEXEEXT=.exe
5168else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005169 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5170$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005171 BUILDEXEEXT=$EXEEXT
5172fi
5173rmdir CaseSensitiveTestDir
5174
5175case $MACHDEP in
5176bsdos*)
5177 case $CC in
5178 gcc) CC="$CC -D_HAVE_BSDI";;
5179 esac;;
5180esac
5181
5182case $ac_sys_system in
5183hp*|HP*)
5184 case $CC in
5185 cc|*/cc) CC="$CC -Ae";;
5186 esac;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005187SunOS*)
5188 # Some functions have a prototype only with that define, e.g. confstr
5189
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005190$as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005191
5192 ;;
5193esac
5194
5195
5196
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5198$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005199if test -z "$LIBRARY"
5200then
5201 LIBRARY='libpython$(VERSION).a'
5202fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005203{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5204$as_echo "$LIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005205
5206# LDLIBRARY is the name of the library to link against (as opposed to the
5207# name of the library into which to insert object files). BLDLIBRARY is also
5208# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5209# is blank as the main program is not linked directly against LDLIBRARY.
5210# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5211# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5212# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5213# DLLLIBRARY is the shared (i.e., DLL) library.
5214#
5215# RUNSHARED is used to run shared python without installed libraries
5216#
5217# INSTSONAME is the name of the shared library that will be use to install
5218# on the system - some systems like version suffix, others don't
5219
5220
5221
5222
5223
5224
5225LDLIBRARY="$LIBRARY"
5226BLDLIBRARY='$(LDLIBRARY)'
5227INSTSONAME='$(LDLIBRARY)'
5228DLLLIBRARY=''
5229LDLIBRARYDIR=''
5230RUNSHARED=''
5231
5232# LINKCC is the command that links the python executable -- default is $(CC).
5233# If CXX is set, and if it is needed to link a main function that was
5234# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5235# python might then depend on the C++ runtime
5236# This is altered for AIX in order to build the export list before
5237# linking.
5238
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5240$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005241if test -z "$LINKCC"
5242then
5243 LINKCC='$(PURIFY) $(MAINCC)'
5244 case $ac_sys_system in
5245 AIX*)
5246 exp_extra="\"\""
5247 if test $ac_sys_release -ge 5 -o \
5248 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5249 exp_extra="."
5250 fi
5251 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005252 QNX*)
5253 # qcc must be used because the other compilers do not
5254 # support -N.
5255 LINKCC=qcc;;
5256 esac
5257fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005258{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5259$as_echo "$LINKCC" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005260
5261# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5262# make sure we default having it set to "no": this is used by
5263# distutils.unixccompiler to know if it should add --enable-new-dtags
5264# to linker command lines, and failing to detect GNU ld simply results
5265# in the same bahaviour as before.
5266
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5268$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005269ac_prog=ld
5270if test "$GCC" = yes; then
5271 ac_prog=`$CC -print-prog-name=ld`
5272fi
5273case `"$ac_prog" -V 2>&1 < /dev/null` in
5274 *GNU*)
5275 GNULD=yes;;
5276 *)
5277 GNULD=no;;
5278esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005279{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5280$as_echo "$GNULD" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005281
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005282{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5283$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005284# Check whether --enable-shared was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005285if test "${enable_shared+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005286 enableval=$enable_shared;
5287fi
5288
5289
5290if test -z "$enable_shared"
5291then
5292 case $ac_sys_system in
5293 CYGWIN* | atheos*)
5294 enable_shared="yes";;
5295 *)
5296 enable_shared="no";;
5297 esac
5298fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005299{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5300$as_echo "$enable_shared" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005301
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5303$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005304# Check whether --enable-profiling was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005305if test "${enable_profiling+set}" = set; then :
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005306 enableval=$enable_profiling;
5307fi
5308
5309if test "x$enable_profiling" = xyes; then
5310 ac_save_cc="$CC"
Benjamin Petersonb9be7bb2013-03-26 08:55:37 -04005311 CC="$CC -pg"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005312 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005313/* end confdefs.h. */
5314int main() { return 0; }
5315_ACEOF
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005316if ac_fn_c_try_link "$LINENO"; then :
5317
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005318else
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005319 enable_profiling=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005320fi
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005321rm -f core conftest.err conftest.$ac_objext \
5322 conftest$ac_exeext conftest.$ac_ext
5323 CC="$ac_save_cc"
5324else
5325 enable_profiling=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005326fi
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005327{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5328$as_echo "$enable_profiling" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005329
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005330if test "x$enable_profiling" = xyes; then
5331 BASECFLAGS="-pg $BASECFLAGS"
5332 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005333fi
5334
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5336$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005337
5338# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5339# library that we build, but we do not want to link against it (we
5340# will find it with a -framework option). For this reason there is an
5341# extra variable BLDLIBRARY against which Python and the extension
5342# modules are linked, BLDLIBRARY. This is normally the same as
5343# LDLIBRARY, but empty for MacOSX framework builds.
5344if test "$enable_framework"
5345then
5346 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005347 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005348 BLDLIBRARY=''
5349else
5350 BLDLIBRARY='$(LDLIBRARY)'
5351fi
5352
5353# Other platforms follow
5354if test $enable_shared = "yes"; then
5355
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005356$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005357
5358 case $ac_sys_system in
5359 BeOS*)
5360 LDLIBRARY='libpython$(VERSION).so'
5361 ;;
5362 CYGWIN*)
5363 LDLIBRARY='libpython$(VERSION).dll.a'
5364 DLLLIBRARY='libpython$(VERSION).dll'
5365 ;;
5366 SunOS*)
5367 LDLIBRARY='libpython$(VERSION).so'
5368 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005369 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005370 INSTSONAME="$LDLIBRARY".$SOVERSION
5371 ;;
Charles-François Natali3de8c732011-07-24 22:33:35 +02005372 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005373 LDLIBRARY='libpython$(VERSION).so'
5374 BLDLIBRARY='-L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005375 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005376 case $ac_sys_system in
5377 FreeBSD*)
5378 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
5379 ;;
5380 esac
5381 INSTSONAME="$LDLIBRARY".$SOVERSION
5382 ;;
5383 hp*|HP*)
5384 case `uname -m` in
5385 ia64)
5386 LDLIBRARY='libpython$(VERSION).so'
5387 ;;
5388 *)
5389 LDLIBRARY='libpython$(VERSION).sl'
5390 ;;
5391 esac
5392 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005393 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005394 ;;
5395 OSF*)
5396 LDLIBRARY='libpython$(VERSION).so'
5397 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005398 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005399 ;;
5400 atheos*)
5401 LDLIBRARY='libpython$(VERSION).so'
5402 BLDLIBRARY='-L. -lpython$(VERSION)'
5403 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
5404 ;;
5405 Darwin*)
5406 LDLIBRARY='libpython$(VERSION).dylib'
5407 BLDLIBRARY='-L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005408 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005409 ;;
Antoine Pitrouaabdceb2010-09-10 20:03:17 +00005410 AIX*)
5411 LDLIBRARY='libpython$(VERSION).so'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005412 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrouaabdceb2010-09-10 20:03:17 +00005413 ;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005414
5415 esac
5416else # shared is disabled
5417 case $ac_sys_system in
5418 CYGWIN*)
5419 BLDLIBRARY='$(LIBRARY)'
5420 LDLIBRARY='libpython$(VERSION).dll.a'
5421 ;;
5422 esac
5423fi
5424
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005425if test "$cross_compiling" = yes; then
5426 RUNSHARED=
5427fi
5428
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005429{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5430$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005431
5432if test -n "$ac_tool_prefix"; then
5433 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5434set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5436$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005437if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005438 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005439else
5440 if test -n "$RANLIB"; then
5441 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5442else
5443as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5444for as_dir in $PATH
5445do
5446 IFS=$as_save_IFS
5447 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005448 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005449 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005450 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005451 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005452 break 2
5453 fi
5454done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005455 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005456IFS=$as_save_IFS
5457
5458fi
5459fi
5460RANLIB=$ac_cv_prog_RANLIB
5461if test -n "$RANLIB"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5463$as_echo "$RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005464else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5466$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005467fi
5468
5469
5470fi
5471if test -z "$ac_cv_prog_RANLIB"; then
5472 ac_ct_RANLIB=$RANLIB
5473 # Extract the first word of "ranlib", so it can be a program name with args.
5474set dummy ranlib; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5476$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005477if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005478 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005479else
5480 if test -n "$ac_ct_RANLIB"; then
5481 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5482else
5483as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5484for as_dir in $PATH
5485do
5486 IFS=$as_save_IFS
5487 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005488 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005489 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005490 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005491 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005492 break 2
5493 fi
5494done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005495 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005496IFS=$as_save_IFS
5497
5498fi
5499fi
5500ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5501if test -n "$ac_ct_RANLIB"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005502 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5503$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005504else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005505 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5506$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005507fi
5508
5509 if test "x$ac_ct_RANLIB" = x; then
5510 RANLIB=":"
5511 else
5512 case $cross_compiling:$ac_tool_warned in
5513yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005514{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5515$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005516ac_tool_warned=yes ;;
5517esac
5518 RANLIB=$ac_ct_RANLIB
5519 fi
5520else
5521 RANLIB="$ac_cv_prog_RANLIB"
5522fi
5523
5524
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005525if test -n "$ac_tool_prefix"; then
5526 for ac_prog in ar aal
5527 do
5528 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5529set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5531$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005532if ${ac_cv_prog_AR+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005533 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005534else
5535 if test -n "$AR"; then
5536 ac_cv_prog_AR="$AR" # Let the user override the test.
5537else
5538as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5539for as_dir in $PATH
5540do
5541 IFS=$as_save_IFS
5542 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005543 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005544 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005545 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005546 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005547 break 2
5548 fi
5549done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005550 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005551IFS=$as_save_IFS
5552
5553fi
5554fi
5555AR=$ac_cv_prog_AR
5556if test -n "$AR"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5558$as_echo "$AR" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005559else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5561$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005562fi
5563
5564
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005565 test -n "$AR" && break
5566 done
5567fi
5568if test -z "$AR"; then
5569 ac_ct_AR=$AR
5570 for ac_prog in ar aal
5571do
5572 # Extract the first word of "$ac_prog", so it can be a program name with args.
5573set dummy $ac_prog; ac_word=$2
5574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5575$as_echo_n "checking for $ac_word... " >&6; }
5576if ${ac_cv_prog_ac_ct_AR+:} false; then :
5577 $as_echo_n "(cached) " >&6
5578else
5579 if test -n "$ac_ct_AR"; then
5580 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5581else
5582as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5583for as_dir in $PATH
5584do
5585 IFS=$as_save_IFS
5586 test -z "$as_dir" && as_dir=.
5587 for ac_exec_ext in '' $ac_executable_extensions; do
5588 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5589 ac_cv_prog_ac_ct_AR="$ac_prog"
5590 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5591 break 2
5592 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005593done
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005594 done
5595IFS=$as_save_IFS
5596
5597fi
5598fi
5599ac_ct_AR=$ac_cv_prog_ac_ct_AR
5600if test -n "$ac_ct_AR"; then
5601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5602$as_echo "$ac_ct_AR" >&6; }
5603else
5604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5605$as_echo "no" >&6; }
5606fi
5607
5608
5609 test -n "$ac_ct_AR" && break
5610done
5611
5612 if test "x$ac_ct_AR" = x; then
5613 AR="ar"
5614 else
5615 case $cross_compiling:$ac_tool_warned in
5616yes:)
5617{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5618$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5619ac_tool_warned=yes ;;
5620esac
5621 AR=$ac_ct_AR
5622 fi
5623fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005624
5625
5626# tweak ARFLAGS only if the user didn't set it on the command line
5627
5628if test -z "$ARFLAGS"
5629then
5630 ARFLAGS="rc"
5631fi
5632
5633
5634# Extract the first word of "svnversion", so it can be a program name with args.
5635set dummy svnversion; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5637$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005638if ${ac_cv_prog_SVNVERSION+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005639 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005640else
5641 if test -n "$SVNVERSION"; then
5642 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
5643else
5644as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5645for as_dir in $PATH
5646do
5647 IFS=$as_save_IFS
5648 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005649 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005650 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005651 ac_cv_prog_SVNVERSION="found"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005652 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005653 break 2
5654 fi
5655done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005656 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005657IFS=$as_save_IFS
5658
5659 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
5660fi
5661fi
5662SVNVERSION=$ac_cv_prog_SVNVERSION
5663if test -n "$SVNVERSION"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SVNVERSION" >&5
5665$as_echo "$SVNVERSION" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005666else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5668$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005669fi
5670
5671
5672if test $SVNVERSION = found
5673then
5674 SVNVERSION="svnversion \$(srcdir)"
5675else
5676 SVNVERSION="echo Unversioned directory"
5677fi
5678
Trent Nelsond86ceec2012-10-16 09:42:45 -04005679
Trent Nelsonabf20512012-10-17 04:32:49 -04005680if test "$abs_srcdir" != "$abs_builddir"; then
Trent Nelsond86ceec2012-10-16 09:42:45 -04005681 # If we're building out-of-tree make sure Include (in the current dir)
5682 # gets picked up before its $srcdir counterpart in order for Python-ast.h
5683 # and graminit.h to get picked up from the correct directory.
5684 # (A side effect of this is that these resources will automatically be
5685 # regenerated when building out-of-tree, regardless of whether or not
5686 # the $srcdir counterpart is up-to-date. This is an acceptable trade
5687 # off.)
5688 BASECPPFLAGS="-IInclude"
5689else
5690 BASECPPFLAGS=""
5691fi
5692
Georg Brandl3a5508e2011-03-06 10:42:21 +01005693
5694
5695
5696# Extract the first word of "hg", so it can be a program name with args.
5697set dummy hg; ac_word=$2
5698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5699$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005700if ${ac_cv_prog_HAS_HG+:} false; then :
Georg Brandl3a5508e2011-03-06 10:42:21 +01005701 $as_echo_n "(cached) " >&6
5702else
5703 if test -n "$HAS_HG"; then
5704 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
5705else
5706as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5707for as_dir in $PATH
5708do
5709 IFS=$as_save_IFS
5710 test -z "$as_dir" && as_dir=.
5711 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005712 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Georg Brandl3a5508e2011-03-06 10:42:21 +01005713 ac_cv_prog_HAS_HG="found"
5714 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5715 break 2
5716 fi
5717done
5718 done
5719IFS=$as_save_IFS
5720
5721 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
5722fi
5723fi
5724HAS_HG=$ac_cv_prog_HAS_HG
5725if test -n "$HAS_HG"; then
5726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
5727$as_echo "$HAS_HG" >&6; }
5728else
5729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5730$as_echo "no" >&6; }
5731fi
5732
5733
5734if test $HAS_HG = found
5735then
5736 HGVERSION="hg id -i \$(srcdir)"
5737 HGTAG="hg id -t \$(srcdir)"
5738 HGBRANCH="hg id -b \$(srcdir)"
5739else
5740 HGVERSION=""
5741 HGTAG=""
5742 HGBRANCH=""
5743fi
5744
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005745case $MACHDEP in
5746bsdos*|hp*|HP*)
5747 # install -d does not work on BSDI or HP-UX
5748 if test -z "$INSTALL"
5749 then
5750 INSTALL="${srcdir}/install-sh -c"
5751 fi
5752esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005753# Find a good install program. We prefer a C program (faster),
5754# so one script is as good as another. But avoid the broken or
5755# incompatible versions:
5756# SysV /etc/install, /usr/sbin/install
5757# SunOS /usr/etc/install
5758# IRIX /sbin/install
5759# AIX /bin/install
5760# AmigaOS /C/install, which installs bootblocks on floppy discs
5761# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5762# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5763# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5764# OS/2's system install, which has a completely different semantic
5765# ./install, which can be erroneously created by make from ./install.sh.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005766# Reject install programs that cannot install multiple files.
5767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5768$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005769if test -z "$INSTALL"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +01005770if ${ac_cv_path_install+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005771 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005772else
5773 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5774for as_dir in $PATH
5775do
5776 IFS=$as_save_IFS
5777 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005778 # Account for people who put trailing slashes in PATH elements.
5779case $as_dir/ in #((
5780 ./ | .// | /[cC]/* | \
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005781 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005782 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005783 /usr/ucb/* ) ;;
5784 *)
5785 # OSF1 and SCO ODT 3.0 have their own names for install.
5786 # Don't use installbsd from OSF since it installs stuff as root
5787 # by default.
5788 for ac_prog in ginstall scoinst install; do
5789 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005790 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005791 if test $ac_prog = install &&
5792 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5793 # AIX install. It has an incompatible calling convention.
5794 :
5795 elif test $ac_prog = install &&
5796 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5797 # program-specific install script used by HP pwplus--don't use.
5798 :
5799 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005800 rm -rf conftest.one conftest.two conftest.dir
5801 echo one > conftest.one
5802 echo two > conftest.two
5803 mkdir conftest.dir
5804 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5805 test -s conftest.one && test -s conftest.two &&
5806 test -s conftest.dir/conftest.one &&
5807 test -s conftest.dir/conftest.two
5808 then
5809 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5810 break 3
5811 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005812 fi
5813 fi
5814 done
5815 done
5816 ;;
5817esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005818
5819 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005820IFS=$as_save_IFS
5821
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005822rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005823
5824fi
5825 if test "${ac_cv_path_install+set}" = set; then
5826 INSTALL=$ac_cv_path_install
5827 else
5828 # As a last resort, use the slow shell script. Don't cache a
5829 # value for INSTALL within a source directory, because that will
5830 # break other packages using the cache if that directory is
5831 # removed, or if the value is a relative name.
5832 INSTALL=$ac_install_sh
5833 fi
5834fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005835{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5836$as_echo "$INSTALL" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005837
5838# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5839# It thinks the first close brace ends the variable substitution.
5840test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5841
5842test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5843
5844test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5845
Trent Nelsonf6407a12012-08-30 14:56:13 +00005846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
5847$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
5848if test -z "$MKDIR_P"; then
5849 if ${ac_cv_path_mkdir+:} false; then :
5850 $as_echo_n "(cached) " >&6
5851else
5852 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5853for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
5854do
5855 IFS=$as_save_IFS
5856 test -z "$as_dir" && as_dir=.
5857 for ac_prog in mkdir gmkdir; do
5858 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005859 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Trent Nelsonf6407a12012-08-30 14:56:13 +00005860 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
5861 'mkdir (GNU coreutils) '* | \
5862 'mkdir (coreutils) '* | \
5863 'mkdir (fileutils) '4.1*)
5864 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
5865 break 3;;
5866 esac
5867 done
5868 done
5869 done
5870IFS=$as_save_IFS
5871
5872fi
5873
5874 test -d ./--version && rmdir ./--version
5875 if test "${ac_cv_path_mkdir+set}" = set; then
5876 MKDIR_P="$ac_cv_path_mkdir -p"
5877 else
5878 # As a last resort, use the slow shell script. Don't cache a
5879 # value for MKDIR_P within a source directory, because that will
5880 # break other packages using the cache if that directory is
5881 # removed, or if the value is a relative name.
5882 MKDIR_P="$ac_install_sh -d"
5883 fi
5884fi
5885{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
5886$as_echo "$MKDIR_P" >&6; }
5887
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005888
5889# Not every filesystem supports hard links
5890
5891if test -z "$LN" ; then
5892 case $ac_sys_system in
5893 BeOS*) LN="ln -s";;
5894 CYGWIN*) LN="ln -s";;
5895 atheos*) LN="ln -s";;
5896 *) LN=ln;;
5897 esac
5898fi
5899
5900# Check for --with-pydebug
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
5902$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005903
5904# Check whether --with-pydebug was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005905if test "${with_pydebug+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005906 withval=$with_pydebug;
5907if test "$withval" != no
5908then
5909
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005910$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005911
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5913$as_echo "yes" >&6; };
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005914 Py_DEBUG='true'
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005915else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5916$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005917fi
5918else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5920$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005921fi
5922
5923
5924# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5925# merged with this chunk of code?
5926
5927# Optimizer/debugger flags
5928# ------------------------
5929# (The following bit of code is complicated enough - please keep things
5930# indented properly. Just pretend you're editing Python code. ;-)
5931
5932# There are two parallel sets of case statements below, one that checks to
5933# see if OPT was set and one that does BASECFLAGS setting based upon
5934# compiler and platform. BASECFLAGS tweaks need to be made even if the
5935# user set OPT.
5936
5937# tweak OPT based on compiler and platform, only if the user didn't set
5938# it on the command line
5939
Benjamin Petersond4b721b2010-03-23 20:58:37 +00005940if test "${OPT-unset}" = "unset"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005941then
5942 case $GCC in
5943 yes)
5944 if test "$CC" != 'g++' ; then
5945 STRICT_PROTO="-Wstrict-prototypes"
5946 fi
5947 # For gcc 4.x we need to use -fwrapv so lets check if its supported
5948 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
5949 WRAP="-fwrapv"
5950 fi
Stefan Krah503e5e12011-09-14 15:19:42 +02005951
5952 # Clang also needs -fwrapv
Stefan Krah2bc1e8f2011-12-08 22:26:06 +01005953 case $CC in
5954 *clang*) WRAP="-fwrapv"
5955 ;;
5956 esac
Stefan Krah503e5e12011-09-14 15:19:42 +02005957
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005958 case $ac_cv_prog_cc_g in
5959 yes)
5960 if test "$Py_DEBUG" = 'true' ; then
5961 # Optimization messes up debuggers, so turn it off for
5962 # debug builds.
Mark Dickinsond2f3e3f2010-05-05 22:23:58 +00005963 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005964 else
5965 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
5966 fi
5967 ;;
5968 *)
5969 OPT="-O3 -Wall $STRICT_PROTO"
5970 ;;
5971 esac
5972 case $ac_sys_system in
5973 SCO_SV*) OPT="$OPT -m486 -DSCO5"
5974 ;;
5975 esac
5976 ;;
5977
5978 *)
5979 OPT="-O"
5980 ;;
5981 esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005982fi
5983
5984
5985
5986# The -arch flags for universal builds on OSX
5987UNIVERSAL_ARCH_FLAGS=
5988
5989
5990# tweak BASECFLAGS based on compiler and platform
5991case $GCC in
5992yes)
5993 # Python violates C99 rules, by casting between incompatible
5994 # pointer types. GCC may generate bad code as a result of that,
5995 # so use -fno-strict-aliasing if supported.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005996 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -fno-strict-aliasing" >&5
5997$as_echo_n "checking whether $CC accepts -fno-strict-aliasing... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005998 ac_save_cc="$CC"
5999 CC="$CC -fno-strict-aliasing"
Matthias Klose3cef2a92012-03-14 23:39:33 +01006000 if ${ac_cv_no_strict_aliasing_ok+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006001 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00006002else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006003 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006004/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00006005
6006int
6007main ()
6008{
Mark Dickinson5e13e292010-05-11 08:55:06 +00006009
Gregory P. Smith373469a2009-11-01 21:03:38 +00006010 ;
6011 return 0;
6012}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006013_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006014if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006015 ac_cv_no_strict_aliasing_ok=yes
6016else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006017 ac_cv_no_strict_aliasing_ok=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006018fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00006019rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00006020fi
6021
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006022 CC="$ac_save_cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing_ok" >&5
6024$as_echo "$ac_cv_no_strict_aliasing_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006025 if test $ac_cv_no_strict_aliasing_ok = yes
6026 then
6027 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6028 fi
6029
6030 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
6031 # support. Without this, treatment of subnormals doesn't follow
6032 # the standard.
doko@python.orgd65e2ba2013-01-31 23:52:03 +01006033 case $host in
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006034 alpha*)
6035 BASECFLAGS="$BASECFLAGS -mieee"
6036 ;;
6037 esac
6038
6039 case $ac_sys_system in
6040 SCO_SV*)
6041 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
6042 ;;
6043 # is there any other compiler on Darwin besides gcc?
6044 Darwin*)
6045 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
6046 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006047 if test "${CC}" = gcc
6048 then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006049 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
6050$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006051 case "${UNIVERSALSDK}" in
6052 */MacOSX10.4u.sdk)
6053 # Build using 10.4 SDK, force usage of gcc when the
6054 # compiler is gcc, otherwise the user will get very
6055 # confusing error messages when building on OSX 10.6
6056 CC=gcc-4.0
6057 CPP=cpp-4.0
6058 ;;
6059 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
6061$as_echo "$CC" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006062 fi
6063
6064 # Calculate the right deployment target for this build.
6065 #
Ned Deilyc40b9032014-06-25 13:48:46 -07006066 cur_target_major=`sw_vers -productVersion | \
6067 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
6068 cur_target_minor=`sw_vers -productVersion | \
6069 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
6070 cur_target="${cur_target_major}.${cur_target_minor}"
6071 if test ${cur_target_major} -eq 10 && \
6072 test ${cur_target_minor} -ge 3
6073 then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006074 cur_target=10.3
Ronald Oussoren25967582009-09-06 10:00:26 +00006075 if test ${enable_universalsdk}; then
6076 if test "${UNIVERSAL_ARCHS}" = "all"; then
6077 # Ensure that the default platform for a
6078 # 4-way universal build is OSX 10.5,
6079 # that's the first OS release where
6080 # 4-way builds make sense.
6081 cur_target='10.5'
Ronald Oussoren23d92532009-09-07 06:12:00 +00006082
6083 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
6084 cur_target='10.5'
6085
6086 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
6087 cur_target='10.5'
6088
6089 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
6090 cur_target='10.5'
Ronald Oussoren25967582009-09-06 10:00:26 +00006091 fi
6092 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00006093 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren25967582009-09-06 10:00:26 +00006094 # On Intel macs default to a deployment
6095 # target of 10.4, that's the first OSX
6096 # release with Intel support.
6097 cur_target="10.4"
6098 fi
6099 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006100 fi
6101 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
6102
6103 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
6104 # environment with a value that is the same as what we'll use
6105 # in the Makefile to ensure that we'll get the same compiler
6106 # environment during configure and build time.
6107 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
6108 export MACOSX_DEPLOYMENT_TARGET
6109 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
6110
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006111 if test "${enable_universalsdk}"; then
6112 UNIVERSAL_ARCH_FLAGS=""
6113 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
6114 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
6115 ARCH_RUN_32BIT=""
Ronald Oussoren75912852010-04-08 08:13:31 +00006116 LIPO_32BIT_FLAGS=""
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006117
6118 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
6119 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
6120 LIPO_32BIT_FLAGS=""
6121 ARCH_RUN_32BIT="true"
6122
6123 elif test "$UNIVERSAL_ARCHS" = "all" ; then
6124 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
6125 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren92397ce2010-01-17 19:32:00 +00006126 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006127
6128 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
6129 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
6130 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren92397ce2010-01-17 19:32:00 +00006131 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006132
6133 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
6134 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
6135 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren9922f172010-02-11 13:19:34 +00006136 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006137
6138 else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006139 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 +00006140
6141 fi
6142
6143
Ronald Oussoren974eb5e2010-04-18 17:59:37 +00006144 CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
6145 if test "${UNIVERSALSDK}" != "/"
6146 then
6147 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
6148 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
6149 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006150 fi
6151
6152 fi
6153
6154
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006155 ;;
6156 OSF*)
6157 BASECFLAGS="$BASECFLAGS -mieee"
6158 ;;
6159 esac
6160 ;;
6161
6162*)
6163 case $ac_sys_system in
6164 OpenUNIX*|UnixWare*)
6165 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
6166 ;;
6167 OSF*)
6168 BASECFLAGS="$BASECFLAGS -ieee -std"
6169 ;;
6170 SCO_SV*)
6171 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
6172 ;;
6173 esac
6174 ;;
6175esac
6176
6177if test "$Py_DEBUG" = 'true'; then
6178 :
6179else
6180 OPT="-DNDEBUG $OPT"
6181fi
6182
6183if test "$ac_arch_flags"
6184then
6185 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
6186fi
6187
6188# disable check for icc since it seems to pass, but generates a warning
6189if test "$CC" = icc
6190then
6191 ac_cv_opt_olimit_ok=no
6192fi
6193
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -OPT:Olimit=0" >&5
6195$as_echo_n "checking whether $CC accepts -OPT:Olimit=0... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006196if ${ac_cv_opt_olimit_ok+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006197 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006198else
6199 ac_save_cc="$CC"
6200CC="$CC -OPT:Olimit=0"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006201cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006202/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00006203
6204int
6205main ()
6206{
Mark Dickinson5e13e292010-05-11 08:55:06 +00006207
Gregory P. Smith373469a2009-11-01 21:03:38 +00006208 ;
6209 return 0;
6210}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006211_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006212if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006213 ac_cv_opt_olimit_ok=yes
6214else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006215 ac_cv_opt_olimit_ok=no
Matthias Klosec511b472010-05-08 11:01:39 +00006216
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006217fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00006218rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006219CC="$ac_save_cc"
6220fi
6221
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006222{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_opt_olimit_ok" >&5
6223$as_echo "$ac_cv_opt_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006224if test $ac_cv_opt_olimit_ok = yes; then
6225 case $ac_sys_system in
6226 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
6227 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
6228 # environment?
6229 Darwin*)
6230 ;;
Trent Nelson34562e12012-10-17 18:01:12 -04006231 # XXX thankfully this useless troublemaker of a flag has been
6232 # eradicated in the 3.x line. For now, make sure it isn't picked
6233 # up by any of our other platforms that use CC.
6234 AIX*|SunOS*|HP-UX*|IRIX*)
6235 ;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006236 *)
6237 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
6238 ;;
6239 esac
6240else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006241 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Olimit 1500" >&5
6242$as_echo_n "checking whether $CC accepts -Olimit 1500... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006243 if ${ac_cv_olimit_ok+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006244 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006245else
6246 ac_save_cc="$CC"
6247 CC="$CC -Olimit 1500"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006248 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006249/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00006250
6251int
6252main ()
6253{
Mark Dickinson5e13e292010-05-11 08:55:06 +00006254
Gregory P. Smith373469a2009-11-01 21:03:38 +00006255 ;
6256 return 0;
6257}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006258_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006259if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006260 ac_cv_olimit_ok=yes
6261else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006262 ac_cv_olimit_ok=no
Matthias Klosec511b472010-05-08 11:01:39 +00006263
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006264fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00006265rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006266 CC="$ac_save_cc"
6267fi
6268
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006269 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_olimit_ok" >&5
6270$as_echo "$ac_cv_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006271 if test $ac_cv_olimit_ok = yes; then
Stefan Krah67473262012-11-29 00:17:05 +01006272 case $ac_sys_system in
6273 # Issue #16534: On HP-UX ac_cv_olimit_ok=yes is a false positive.
6274 HP-UX*)
6275 ;;
6276 *)
6277 BASECFLAGS="$BASECFLAGS -Olimit 1500"
6278 ;;
6279 esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006280 fi
6281fi
6282
6283# Check whether GCC supports PyArg_ParseTuple format
6284if test "$GCC" = "yes"
6285then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006286 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
6287$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006288 save_CFLAGS=$CFLAGS
Benjamin Petersonc8759662013-05-11 13:00:05 -05006289 CFLAGS="$CFLAGS -Werror -Wformat"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006290 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006291/* end confdefs.h. */
6292
6293 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006294int
6295main ()
6296{
6297
6298 ;
6299 return 0;
6300}
Matthias Klosec511b472010-05-08 11:01:39 +00006301
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006302_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006303if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006304
Matthias Klosec511b472010-05-08 11:01:39 +00006305
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006306$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006307
Matthias Klosec511b472010-05-08 11:01:39 +00006308 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006309$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00006310
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006311else
Matthias Klosec511b472010-05-08 11:01:39 +00006312
6313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006314$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006315
6316fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006317rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6318 CFLAGS=$save_CFLAGS
6319fi
6320
6321# On some compilers, pthreads are available without further options
6322# (e.g. MacOS X). On some of these systems, the compiler will not
6323# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
6324# So we have to see first whether pthreads are available without
6325# options before we can check whether -Kpthread improves anything.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006326{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
6327$as_echo_n "checking whether pthreads are available without options... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006328if ${ac_cv_pthread_is_default+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006329 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006330else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006331 if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006332 ac_cv_pthread_is_default=no
6333else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006334 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006335/* end confdefs.h. */
6336
Stefan Krahae66ca62012-11-22 22:36:57 +01006337#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006338#include <pthread.h>
6339
6340void* routine(void* p){return NULL;}
6341
6342int main(){
6343 pthread_t p;
6344 if(pthread_create(&p,NULL,routine,NULL)!=0)
6345 return 1;
6346 (void)pthread_detach(p);
6347 return 0;
6348}
6349
6350_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006351if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006352
6353 ac_cv_pthread_is_default=yes
6354 ac_cv_kthread=no
6355 ac_cv_pthread=no
6356
6357else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006358 ac_cv_pthread_is_default=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006359fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006360rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6361 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006362fi
6363
6364
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006365fi
6366
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006367{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
6368$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006369
6370
6371if test $ac_cv_pthread_is_default = yes
6372then
6373 ac_cv_kpthread=no
6374else
6375# -Kpthread, if available, provides the right #defines
6376# and linker options to make pthread_create available
6377# Some compilers won't report that they do not support -Kpthread,
6378# so we need to run a program to see whether it really made the
6379# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006380{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
6381$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006382if ${ac_cv_kpthread+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006383 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006384else
6385 ac_save_cc="$CC"
6386CC="$CC -Kpthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006387if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006388 ac_cv_kpthread=no
6389else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006390 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006391/* end confdefs.h. */
6392
Stefan Krahae66ca62012-11-22 22:36:57 +01006393#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006394#include <pthread.h>
6395
6396void* routine(void* p){return NULL;}
6397
6398int main(){
6399 pthread_t p;
6400 if(pthread_create(&p,NULL,routine,NULL)!=0)
6401 return 1;
6402 (void)pthread_detach(p);
6403 return 0;
6404}
6405
6406_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006407if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006408 ac_cv_kpthread=yes
6409else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006410 ac_cv_kpthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006411fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006412rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6413 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006414fi
6415
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006416CC="$ac_save_cc"
6417fi
6418
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006419{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
6420$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006421fi
6422
6423if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
6424then
6425# -Kthread, if available, provides the right #defines
6426# and linker options to make pthread_create available
6427# Some compilers won't report that they do not support -Kthread,
6428# so we need to run a program to see whether it really made the
6429# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
6431$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006432if ${ac_cv_kthread+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006433 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006434else
6435 ac_save_cc="$CC"
6436CC="$CC -Kthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006437if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006438 ac_cv_kthread=no
6439else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006440 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006441/* end confdefs.h. */
6442
Stefan Krahae66ca62012-11-22 22:36:57 +01006443#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006444#include <pthread.h>
6445
6446void* routine(void* p){return NULL;}
6447
6448int main(){
6449 pthread_t p;
6450 if(pthread_create(&p,NULL,routine,NULL)!=0)
6451 return 1;
6452 (void)pthread_detach(p);
6453 return 0;
6454}
6455
6456_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006457if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006458 ac_cv_kthread=yes
6459else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006460 ac_cv_kthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006461fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006462rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6463 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006464fi
6465
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006466CC="$ac_save_cc"
6467fi
6468
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006469{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
6470$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006471fi
6472
6473if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
6474then
6475# -pthread, if available, provides the right #defines
6476# and linker options to make pthread_create available
6477# Some compilers won't report that they do not support -pthread,
6478# so we need to run a program to see whether it really made the
6479# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
6481$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.orgfa3f9a32013-01-25 15:32:31 +01006482if ${ac_cv_pthread+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006483 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006484else
6485 ac_save_cc="$CC"
6486CC="$CC -pthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006487if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006488 ac_cv_pthread=no
6489else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006490 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006491/* end confdefs.h. */
6492
Stefan Krahae66ca62012-11-22 22:36:57 +01006493#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006494#include <pthread.h>
6495
6496void* routine(void* p){return NULL;}
6497
6498int main(){
6499 pthread_t p;
6500 if(pthread_create(&p,NULL,routine,NULL)!=0)
6501 return 1;
6502 (void)pthread_detach(p);
6503 return 0;
6504}
6505
6506_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006507if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006508 ac_cv_pthread=yes
6509else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006510 ac_cv_pthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006511fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006512rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6513 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006514fi
6515
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006516CC="$ac_save_cc"
6517fi
6518
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006519{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
6520$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006521fi
6522
6523# If we have set a CC compiler flag for thread support then
6524# check if it works for CXX, too.
6525ac_cv_cxx_thread=no
6526if test ! -z "$CXX"
6527then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
6529$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006530ac_save_cxx="$CXX"
6531
6532if test "$ac_cv_kpthread" = "yes"
6533then
6534 CXX="$CXX -Kpthread"
6535 ac_cv_cxx_thread=yes
6536elif test "$ac_cv_kthread" = "yes"
6537then
6538 CXX="$CXX -Kthread"
6539 ac_cv_cxx_thread=yes
6540elif test "$ac_cv_pthread" = "yes"
6541then
6542 CXX="$CXX -pthread"
6543 ac_cv_cxx_thread=yes
6544fi
6545
6546if test $ac_cv_cxx_thread = yes
6547then
6548 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
6549 $CXX -c conftest.$ac_ext 2>&5
6550 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
6551 && test -s conftest$ac_exeext && ./conftest$ac_exeext
6552 then
6553 ac_cv_cxx_thread=yes
6554 else
6555 ac_cv_cxx_thread=no
6556 fi
6557 rm -fr conftest*
6558fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006559{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
6560$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006561fi
6562CXX="$ac_save_cxx"
6563
6564
6565# checks for header files
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6567$as_echo_n "checking for ANSI C header files... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006568if ${ac_cv_header_stdc+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006569 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006570else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006571 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006572/* end confdefs.h. */
6573#include <stdlib.h>
6574#include <stdarg.h>
6575#include <string.h>
6576#include <float.h>
6577
6578int
6579main ()
6580{
6581
6582 ;
6583 return 0;
6584}
6585_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006586if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006587 ac_cv_header_stdc=yes
6588else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006589 ac_cv_header_stdc=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006590fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006591rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6592
6593if test $ac_cv_header_stdc = yes; then
6594 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006595 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006596/* end confdefs.h. */
6597#include <string.h>
6598
6599_ACEOF
6600if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006601 $EGREP "memchr" >/dev/null 2>&1; then :
6602
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006603else
6604 ac_cv_header_stdc=no
6605fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006606rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006607
6608fi
6609
6610if test $ac_cv_header_stdc = yes; then
6611 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006612 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006613/* end confdefs.h. */
6614#include <stdlib.h>
6615
6616_ACEOF
6617if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006618 $EGREP "free" >/dev/null 2>&1; then :
6619
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006620else
6621 ac_cv_header_stdc=no
6622fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006623rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006624
6625fi
6626
6627if test $ac_cv_header_stdc = yes; then
6628 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006629 if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006630 :
6631else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006632 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006633/* end confdefs.h. */
6634#include <ctype.h>
6635#include <stdlib.h>
6636#if ((' ' & 0x0FF) == 0x020)
6637# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6638# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6639#else
6640# define ISLOWER(c) \
6641 (('a' <= (c) && (c) <= 'i') \
6642 || ('j' <= (c) && (c) <= 'r') \
6643 || ('s' <= (c) && (c) <= 'z'))
6644# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6645#endif
6646
6647#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6648int
6649main ()
6650{
6651 int i;
6652 for (i = 0; i < 256; i++)
6653 if (XOR (islower (i), ISLOWER (i))
6654 || toupper (i) != TOUPPER (i))
6655 return 2;
6656 return 0;
6657}
6658_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006659if ac_fn_c_try_run "$LINENO"; then :
6660
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006661else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006662 ac_cv_header_stdc=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006663fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006664rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6665 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006666fi
6667
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006668fi
6669fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006670{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6671$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006672if test $ac_cv_header_stdc = yes; then
6673
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006674$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006675
6676fi
6677
doko@ubuntu.comf27ec3e2014-04-17 20:11:19 +02006678for ac_header in asm/types.h conio.h direct.h dlfcn.h errno.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00006679fcntl.h grp.h \
doko@ubuntu.comf27ec3e2014-04-17 20:11:19 +02006680ieeefp.h io.h langinfo.h libintl.h poll.h process.h pthread.h \
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00006681shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006682unistd.h utime.h \
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00006683sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
6684sys/lock.h sys/mkdev.h sys/modem.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00006685sys/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 +00006686sys/termio.h sys/time.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00006687sys/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 +00006688sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimes3aa138f2013-06-18 13:25:24 +02006689bluetooth/bluetooth.h linux/tipc.h spawn.h util.h alloca.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006690do :
6691 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6692ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006693if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006694 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006695#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006696_ACEOF
6697
6698fi
6699
Guido van Rossum627b2d71993-12-24 10:39:16 +00006700done
6701
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006702ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006703for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006704 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6706$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006707if eval \${$as_ac_Header+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006708 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006709else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006710 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006711/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006712#include <sys/types.h>
6713#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006714
Martin v. Löwis11437992002-04-12 09:54:03 +00006715int
6716main ()
6717{
6718if ((DIR *) 0)
6719return 0;
6720 ;
6721 return 0;
6722}
6723_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006724if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006725 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006726else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006727 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006728fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006729rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006730fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006731eval ac_res=\$$as_ac_Header
6732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6733$as_echo "$ac_res" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006734if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006735 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006736#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006737_ACEOF
6738
6739ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006740fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006741
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006742done
6743# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6744if test $ac_header_dirent = dirent.h; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006745 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6746$as_echo_n "checking for library containing opendir... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006747if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006748 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006749else
Martin v. Löwis11437992002-04-12 09:54:03 +00006750 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006751cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006752/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006753
Martin v. Löwiseba40652007-08-30 20:10:57 +00006754/* Override any GCC internal prototype to avoid an error.
6755 Use char because int might match the return type of a GCC
6756 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006757#ifdef __cplusplus
6758extern "C"
6759#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006760char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006761int
6762main ()
6763{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006764return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006765 ;
6766 return 0;
6767}
6768_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006769for ac_lib in '' dir; do
6770 if test -z "$ac_lib"; then
6771 ac_res="none required"
6772 else
6773 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00006774 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00006775 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006776 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006777 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00006778fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006779rm -f core conftest.err conftest.$ac_objext \
6780 conftest$ac_exeext
Matthias Klose3cef2a92012-03-14 23:39:33 +01006781 if ${ac_cv_search_opendir+:} false; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006782 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00006783fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006784done
Matthias Klose3cef2a92012-03-14 23:39:33 +01006785if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006786
Martin v. Löwiseba40652007-08-30 20:10:57 +00006787else
6788 ac_cv_search_opendir=no
6789fi
6790rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006791LIBS=$ac_func_search_save_LIBS
6792fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006793{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6794$as_echo "$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006795ac_res=$ac_cv_search_opendir
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006796if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006797 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006798
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006799fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006800
Michael W. Hudson54241132001-12-07 15:38:26 +00006801else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006802 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6803$as_echo_n "checking for library containing opendir... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006804if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006805 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006806else
6807 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006808cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006809/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006810
Martin v. Löwiseba40652007-08-30 20:10:57 +00006811/* Override any GCC internal prototype to avoid an error.
6812 Use char because int might match the return type of a GCC
6813 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006814#ifdef __cplusplus
6815extern "C"
6816#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006817char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006818int
6819main ()
6820{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006821return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006822 ;
6823 return 0;
6824}
6825_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006826for ac_lib in '' x; do
6827 if test -z "$ac_lib"; then
6828 ac_res="none required"
6829 else
6830 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00006831 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00006832 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006833 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006834 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00006835fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006836rm -f core conftest.err conftest.$ac_objext \
6837 conftest$ac_exeext
Matthias Klose3cef2a92012-03-14 23:39:33 +01006838 if ${ac_cv_search_opendir+:} false; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006839 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00006840fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006841done
Matthias Klose3cef2a92012-03-14 23:39:33 +01006842if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006843
Martin v. Löwiseba40652007-08-30 20:10:57 +00006844else
6845 ac_cv_search_opendir=no
6846fi
6847rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006848LIBS=$ac_func_search_save_LIBS
6849fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006850{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6851$as_echo "$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006852ac_res=$ac_cv_search_opendir
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006853if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006854 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006855
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006856fi
6857
6858fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006859
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
6861$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006862if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006863 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006864else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006865 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006866/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006867#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006868int
6869main ()
6870{
6871return makedev(0, 0);
6872 ;
6873 return 0;
6874}
6875_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006876if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006877 ac_cv_header_sys_types_h_makedev=yes
6878else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006879 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006880fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006881rm -f core conftest.err conftest.$ac_objext \
6882 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006883
6884fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006885{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
6886$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006887
6888if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006889ac_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 +01006890if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006891
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006892$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006893
6894fi
6895
6896
6897
6898 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006899 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 +01006900if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006901
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006902$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006903
6904fi
6905
6906
6907 fi
6908fi
6909
Michael W. Hudson54241132001-12-07 15:38:26 +00006910
Martin v. Löwis11017b12006-01-14 18:12:57 +00006911# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00006912for ac_header in linux/netlink.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006913do :
6914 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 +00006915#ifdef HAVE_ASM_TYPES_H
6916#include <asm/types.h>
6917#endif
6918#ifdef HAVE_SYS_SOCKET_H
6919#include <sys/socket.h>
6920#endif
6921
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006922"
Matthias Klose3cef2a92012-03-14 23:39:33 +01006923if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00006924 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006925#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006926_ACEOF
6927
6928fi
6929
6930done
6931
6932
Guido van Rossum627b2d71993-12-24 10:39:16 +00006933# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006934was_it_defined=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
6936$as_echo_n "checking for clock_t in time.h... " >&6; }
6937cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006938/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006939#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006940
6941_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006942if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006943 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00006944 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006945else
Martin v. Löwis11437992002-04-12 09:54:03 +00006946
6947
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006948$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00006949
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006950
Guido van Rossum627b2d71993-12-24 10:39:16 +00006951fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006952rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006953
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006954{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
6955$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006956
Neal Norwitz11690112002-07-30 01:08:28 +00006957# Check whether using makedev requires defining _OSF_SOURCE
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
6959$as_echo_n "checking for makedev... " >&6; }
6960cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006961/* end confdefs.h. */
Jesus Cea616de772010-04-28 10:32:30 +00006962
6963#if defined(MAJOR_IN_MKDEV)
6964#include <sys/mkdev.h>
6965#elif defined(MAJOR_IN_SYSMACROS)
6966#include <sys/sysmacros.h>
6967#else
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006968#include <sys/types.h>
Jesus Cea616de772010-04-28 10:32:30 +00006969#endif
Neal Norwitz11690112002-07-30 01:08:28 +00006970int
6971main ()
6972{
6973 makedev(0, 0)
6974 ;
6975 return 0;
6976}
6977_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006978if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006979 ac_cv_has_makedev=yes
6980else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006981 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006982fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006983rm -f core conftest.err conftest.$ac_objext \
6984 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006985if test "$ac_cv_has_makedev" = "no"; then
6986 # we didn't link, try if _OSF_SOURCE will allow us to link
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006987 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006988/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006989
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006990#define _OSF_SOURCE 1
6991#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006992
Neal Norwitz11690112002-07-30 01:08:28 +00006993int
6994main ()
6995{
6996 makedev(0, 0)
6997 ;
6998 return 0;
6999}
7000_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007001if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007002 ac_cv_has_makedev=yes
7003else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007004 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007005fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007006rm -f core conftest.err conftest.$ac_objext \
7007 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00007008 if test "$ac_cv_has_makedev" = "yes"; then
7009
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007010$as_echo "#define _OSF_SOURCE 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007011
7012 fi
7013fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007014{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
7015$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007016if test "$ac_cv_has_makedev" = "yes"; then
7017
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007018$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007019
7020fi
7021
Martin v. Löwis399a6892002-10-04 10:22:02 +00007022# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
7023# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
7024# defined, but the compiler does not support pragma redefine_extname,
7025# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
7026# structures (such as rlimit64) without declaring them. As a
7027# work-around, disable LFS on such configurations
7028
7029use_lfs=yes
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
7031$as_echo_n "checking Solaris LFS bug... " >&6; }
7032cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007033/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00007034
7035#define _LARGEFILE_SOURCE 1
7036#define _FILE_OFFSET_BITS 64
7037#include <sys/resource.h>
7038
Martin v. Löwis399a6892002-10-04 10:22:02 +00007039int
7040main ()
7041{
7042struct rlimit foo;
7043 ;
7044 return 0;
7045}
7046_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007047if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00007048 sol_lfs_bug=no
7049else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007050 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00007051fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007052rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007053{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
7054$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00007055if test "$sol_lfs_bug" = "yes"; then
7056 use_lfs=no
7057fi
7058
7059if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00007060# Two defines needed to enable largefile support on various platforms
7061# These may affect some typedefs
Georg Brandl94800df2011-02-25 11:09:02 +00007062case $ac_sys_system/$ac_sys_release in
7063AIX*)
7064
7065$as_echo "#define _LARGE_FILES 1" >>confdefs.h
7066
7067 ;;
7068esac
Guido van Rossum810cc512001-09-09 23:51:39 +00007069
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007070$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007071
7072
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007073$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00007074
Martin v. Löwis399a6892002-10-04 10:22:02 +00007075fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007076
Guido van Rossum84e7b241996-08-19 21:59:00 +00007077# Add some code to confdefs.h so that the test for off_t works on SCO
7078cat >> confdefs.h <<\EOF
7079#if defined(SCO_DS)
7080#undef _OFF_T
7081#endif
7082EOF
7083
Guido van Rossumef2255b2000-03-10 22:30:29 +00007084# Type availability checks
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007085ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007086if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007087
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007088else
Martin v. Löwis11437992002-04-12 09:54:03 +00007089
7090cat >>confdefs.h <<_ACEOF
7091#define mode_t int
7092_ACEOF
7093
7094fi
7095
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007096ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007097if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007098
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007099else
Martin v. Löwis11437992002-04-12 09:54:03 +00007100
7101cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007102#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00007103_ACEOF
7104
7105fi
7106
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007107ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007108if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007109
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007110else
Martin v. Löwis11437992002-04-12 09:54:03 +00007111
7112cat >>confdefs.h <<_ACEOF
7113#define pid_t int
7114_ACEOF
7115
7116fi
7117
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007118
Martin v. Löwis11437992002-04-12 09:54:03 +00007119cat >>confdefs.h <<_ACEOF
Matthias Klosecbf54b12010-05-08 11:04:18 +00007120#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00007121_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007122
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007123ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007124if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007125
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007126else
Martin v. Löwis11437992002-04-12 09:54:03 +00007127
7128cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007129#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007130_ACEOF
7131
7132fi
7133
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
7135$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007136if ${ac_cv_type_uid_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007137 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007138else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007139 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007140/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007141#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007142
7143_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007144if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007145 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007146 ac_cv_type_uid_t=yes
7147else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007148 ac_cv_type_uid_t=no
7149fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00007150rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007151
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007152fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007153{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
7154$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007155if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007156
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007157$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007158
7159
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007160$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007161
7162fi
7163
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007164
7165# There are two separate checks for each of the exact-width integer types we
7166# need. First we check whether the type is available using the usual
7167# AC_CHECK_TYPE macro with the default includes (which includes <inttypes.h>
7168# and <stdint.h> where available). We then also use the special type checks of
7169# the form AC_TYPE_UINT32_T, which in the case that uint32_t is not available
7170# directly, #define's uint32_t to be a suitable type.
7171
7172ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
7173if test "x$ac_cv_type_uint32_t" = xyes; then :
7174
7175$as_echo "#define HAVE_UINT32_T 1" >>confdefs.h
7176
7177fi
7178
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007179ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
7180case $ac_cv_c_uint32_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007181 no|yes) ;; #(
7182 *)
7183
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007184$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007185
7186
7187cat >>confdefs.h <<_ACEOF
7188#define uint32_t $ac_cv_c_uint32_t
7189_ACEOF
7190;;
7191 esac
7192
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007193
7194ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
7195if test "x$ac_cv_type_uint64_t" = xyes; then :
7196
7197$as_echo "#define HAVE_UINT64_T 1" >>confdefs.h
7198
7199fi
7200
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007201ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
7202case $ac_cv_c_uint64_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007203 no|yes) ;; #(
7204 *)
7205
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007206$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007207
7208
7209cat >>confdefs.h <<_ACEOF
7210#define uint64_t $ac_cv_c_uint64_t
7211_ACEOF
7212;;
7213 esac
7214
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007215
7216ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
7217if test "x$ac_cv_type_int32_t" = xyes; then :
7218
7219$as_echo "#define HAVE_INT32_T 1" >>confdefs.h
7220
7221fi
7222
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007223ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
7224case $ac_cv_c_int32_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007225 no|yes) ;; #(
7226 *)
7227
7228cat >>confdefs.h <<_ACEOF
7229#define int32_t $ac_cv_c_int32_t
7230_ACEOF
7231;;
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007232esac
7233
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007234
7235ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
7236if test "x$ac_cv_type_int64_t" = xyes; then :
7237
7238$as_echo "#define HAVE_INT64_T 1" >>confdefs.h
7239
7240fi
7241
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007242ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
7243case $ac_cv_c_int64_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007244 no|yes) ;; #(
7245 *)
7246
7247cat >>confdefs.h <<_ACEOF
7248#define int64_t $ac_cv_c_int64_t
7249_ACEOF
7250;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007251esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00007252
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007253
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007254ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007255if test "x$ac_cv_type_ssize_t" = xyes; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007256
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007257$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00007258
7259fi
7260
Jack Jansendd19cf82001-12-06 22:36:17 +00007261
Michael W. Hudson54241132001-12-07 15:38:26 +00007262# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007263# ANSI C requires sizeof(char) == 1, so no need to check it
Martin v. Löwiseba40652007-08-30 20:10:57 +00007264# The cast to long int works around a bug in the HP C Compiler
7265# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7266# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7267# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
7269$as_echo_n "checking size of int... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007270if ${ac_cv_sizeof_int+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007271 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007272else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007273 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 +00007274
Martin v. Löwis11437992002-04-12 09:54:03 +00007275else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007276 if test "$ac_cv_type_int" = yes; then
7277 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7278$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007279as_fn_error 77 "cannot compute sizeof (int)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007280See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007281 else
7282 ac_cv_sizeof_int=0
7283 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007284fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007285
Martin v. Löwis11437992002-04-12 09:54:03 +00007286fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007287{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
7288$as_echo "$ac_cv_sizeof_int" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007289
7290
7291
Martin v. Löwis11437992002-04-12 09:54:03 +00007292cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007293#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007294_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007295
7296
Martin v. Löwiseba40652007-08-30 20:10:57 +00007297# The cast to long int works around a bug in the HP C Compiler
7298# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7299# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7300# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
7302$as_echo_n "checking size of long... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007303if ${ac_cv_sizeof_long+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007304 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007305else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007306 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 +00007307
Martin v. Löwis11437992002-04-12 09:54:03 +00007308else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007309 if test "$ac_cv_type_long" = yes; then
7310 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7311$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007312as_fn_error 77 "cannot compute sizeof (long)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007313See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007314 else
7315 ac_cv_sizeof_long=0
7316 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007317fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007318
Martin v. Löwis11437992002-04-12 09:54:03 +00007319fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007320{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
7321$as_echo "$ac_cv_sizeof_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007322
7323
7324
Martin v. Löwis11437992002-04-12 09:54:03 +00007325cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007326#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007327_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007328
7329
Martin v. Löwiseba40652007-08-30 20:10:57 +00007330# The cast to long int works around a bug in the HP C Compiler
7331# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7332# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7333# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
7335$as_echo_n "checking size of void *... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007336if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007337 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007338else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007339 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 +00007340
Martin v. Löwis11437992002-04-12 09:54:03 +00007341else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007342 if test "$ac_cv_type_void_p" = yes; then
7343 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7344$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007345as_fn_error 77 "cannot compute sizeof (void *)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007346See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007347 else
7348 ac_cv_sizeof_void_p=0
7349 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007350fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007351
Martin v. Löwis11437992002-04-12 09:54:03 +00007352fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007353{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
7354$as_echo "$ac_cv_sizeof_void_p" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007355
7356
7357
Martin v. Löwis11437992002-04-12 09:54:03 +00007358cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007359#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00007360_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007361
7362
Martin v. Löwiseba40652007-08-30 20:10:57 +00007363# The cast to long int works around a bug in the HP C Compiler
7364# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7365# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7366# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
7368$as_echo_n "checking size of short... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007369if ${ac_cv_sizeof_short+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007370 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007371else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007372 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 +00007373
Martin v. Löwis11437992002-04-12 09:54:03 +00007374else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007375 if test "$ac_cv_type_short" = yes; then
7376 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7377$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007378as_fn_error 77 "cannot compute sizeof (short)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007379See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007380 else
7381 ac_cv_sizeof_short=0
7382 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007383fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007384
Martin v. Löwis11437992002-04-12 09:54:03 +00007385fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007386{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
7387$as_echo "$ac_cv_sizeof_short" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007388
7389
7390
Martin v. Löwis11437992002-04-12 09:54:03 +00007391cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007392#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007393_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007394
7395
Martin v. Löwiseba40652007-08-30 20:10:57 +00007396# The cast to long int works around a bug in the HP C Compiler
7397# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7398# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7399# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
7401$as_echo_n "checking size of float... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007402if ${ac_cv_sizeof_float+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007403 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007404else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007405 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 +00007406
Martin v. Löwis11437992002-04-12 09:54:03 +00007407else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007408 if test "$ac_cv_type_float" = yes; then
7409 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7410$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007411as_fn_error 77 "cannot compute sizeof (float)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007412See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007413 else
7414 ac_cv_sizeof_float=0
7415 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007416fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007417
Martin v. Löwis11437992002-04-12 09:54:03 +00007418fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007419{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
7420$as_echo "$ac_cv_sizeof_float" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007421
7422
7423
Martin v. Löwis11437992002-04-12 09:54:03 +00007424cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007425#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007426_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007427
7428
Martin v. Löwiseba40652007-08-30 20:10:57 +00007429# The cast to long int works around a bug in the HP C Compiler
7430# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7431# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7432# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
7434$as_echo_n "checking size of double... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007435if ${ac_cv_sizeof_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007436 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007437else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007438 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 +00007439
Martin v. Löwis11437992002-04-12 09:54:03 +00007440else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007441 if test "$ac_cv_type_double" = yes; then
7442 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7443$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007444as_fn_error 77 "cannot compute sizeof (double)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007445See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007446 else
7447 ac_cv_sizeof_double=0
7448 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007449fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007450
Martin v. Löwis11437992002-04-12 09:54:03 +00007451fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007452{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
7453$as_echo "$ac_cv_sizeof_double" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007454
7455
7456
Martin v. Löwis11437992002-04-12 09:54:03 +00007457cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007458#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007459_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007460
7461
Martin v. Löwiseba40652007-08-30 20:10:57 +00007462# The cast to long int works around a bug in the HP C Compiler
7463# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7464# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7465# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
7467$as_echo_n "checking size of fpos_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007468if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007469 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007470else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007471 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 +00007472
Martin v. Löwis11437992002-04-12 09:54:03 +00007473else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007474 if test "$ac_cv_type_fpos_t" = yes; then
7475 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7476$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007477as_fn_error 77 "cannot compute sizeof (fpos_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007478See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007479 else
7480 ac_cv_sizeof_fpos_t=0
7481 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007482fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007483
Martin v. Löwis11437992002-04-12 09:54:03 +00007484fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007485{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
7486$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007487
7488
7489
Martin v. Löwis11437992002-04-12 09:54:03 +00007490cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007491#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007492_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007493
Michael W. Hudson54241132001-12-07 15:38:26 +00007494
Martin v. Löwiseba40652007-08-30 20:10:57 +00007495# The cast to long int works around a bug in the HP C Compiler
7496# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7497# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7498# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
7500$as_echo_n "checking size of size_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007501if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007502 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007503else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007504 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 +00007505
Martin v. Löwis18e16552006-02-15 17:27:45 +00007506else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007507 if test "$ac_cv_type_size_t" = yes; then
7508 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7509$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007510as_fn_error 77 "cannot compute sizeof (size_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007511See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007512 else
7513 ac_cv_sizeof_size_t=0
7514 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00007515fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007516
Martin v. Löwis18e16552006-02-15 17:27:45 +00007517fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007518{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
7519$as_echo "$ac_cv_sizeof_size_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007520
7521
7522
Martin v. Löwis18e16552006-02-15 17:27:45 +00007523cat >>confdefs.h <<_ACEOF
7524#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
7525_ACEOF
7526
7527
Christian Heimes951cc0f2008-01-31 23:08:23 +00007528# The cast to long int works around a bug in the HP C Compiler
7529# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7530# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7531# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
7533$as_echo_n "checking size of pid_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007534if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007535 $as_echo_n "(cached) " >&6
Christian Heimes951cc0f2008-01-31 23:08:23 +00007536else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007537 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 +00007538
Christian Heimes951cc0f2008-01-31 23:08:23 +00007539else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007540 if test "$ac_cv_type_pid_t" = yes; then
7541 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7542$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007543as_fn_error 77 "cannot compute sizeof (pid_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007544See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes951cc0f2008-01-31 23:08:23 +00007545 else
7546 ac_cv_sizeof_pid_t=0
7547 fi
7548fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007549
Christian Heimes951cc0f2008-01-31 23:08:23 +00007550fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007551{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
7552$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes951cc0f2008-01-31 23:08:23 +00007553
7554
7555
7556cat >>confdefs.h <<_ACEOF
7557#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
7558_ACEOF
7559
7560
Michael W. Hudson54241132001-12-07 15:38:26 +00007561
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
7563$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007564have_long_long=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007565cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007566/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007567
Martin v. Löwis11437992002-04-12 09:54:03 +00007568int
7569main ()
7570{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007571long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007572 ;
7573 return 0;
7574}
7575_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007576if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007577
7578
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007579$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007580
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007581 have_long_long=yes
7582
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007583fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007584rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007585{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
7586$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007587if test "$have_long_long" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00007588# The cast to long int works around a bug in the HP C Compiler
7589# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7590# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7591# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
7593$as_echo_n "checking size of long long... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007594if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007595 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007596else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007597 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 +00007598
Martin v. Löwis11437992002-04-12 09:54:03 +00007599else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007600 if test "$ac_cv_type_long_long" = yes; then
7601 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7602$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007603as_fn_error 77 "cannot compute sizeof (long long)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007604See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007605 else
7606 ac_cv_sizeof_long_long=0
7607 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007608fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007609
Martin v. Löwis11437992002-04-12 09:54:03 +00007610fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007611{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
7612$as_echo "$ac_cv_sizeof_long_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007613
7614
7615
Martin v. Löwis11437992002-04-12 09:54:03 +00007616cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007617#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007618_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007619
Michael W. Hudson54241132001-12-07 15:38:26 +00007620
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007621fi
7622
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
7624$as_echo_n "checking for long double support... " >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007625have_long_double=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007626cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007627/* end confdefs.h. */
7628
7629int
7630main ()
7631{
Matthias Klosec511b472010-05-08 11:01:39 +00007632long double x; x = (long double)0;
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007633 ;
7634 return 0;
7635}
7636_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007637if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007638
7639
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007640$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007641
7642 have_long_double=yes
7643
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007644fi
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007645rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007646{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
7647$as_echo "$have_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007648if test "$have_long_double" = yes ; then
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007649# The cast to long int works around a bug in the HP C Compiler
7650# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7651# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7652# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
7654$as_echo_n "checking size of long double... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007655if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007656 $as_echo_n "(cached) " >&6
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007657else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007658 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 +00007659
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007660else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007661 if test "$ac_cv_type_long_double" = yes; then
7662 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7663$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007664as_fn_error 77 "cannot compute sizeof (long double)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007665See \`config.log' for more details" "$LINENO" 5; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007666 else
7667 ac_cv_sizeof_long_double=0
7668 fi
7669fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007670
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007671fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007672{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
7673$as_echo "$ac_cv_sizeof_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007674
7675
7676
7677cat >>confdefs.h <<_ACEOF
7678#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
7679_ACEOF
7680
7681
7682fi
7683
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
7685$as_echo_n "checking for _Bool support... " >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007686have_c99_bool=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007687cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007688/* end confdefs.h. */
7689
7690int
7691main ()
7692{
7693_Bool x; x = (_Bool)0;
7694 ;
7695 return 0;
7696}
7697_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007698if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007699
7700
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007701$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007702
7703 have_c99_bool=yes
7704
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007705fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007706rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007707{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7708$as_echo "$have_c99_bool" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007709if test "$have_c99_bool" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00007710# The cast to long int works around a bug in the HP C Compiler
7711# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7712# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7713# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7715$as_echo_n "checking size of _Bool... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007716if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007717 $as_echo_n "(cached) " >&6
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007718else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007719 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 +00007720
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007721else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007722 if test "$ac_cv_type__Bool" = yes; then
7723 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7724$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007725as_fn_error 77 "cannot compute sizeof (_Bool)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007726See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007727 else
7728 ac_cv_sizeof__Bool=0
7729 fi
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007730fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007731
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007732fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007733{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7734$as_echo "$ac_cv_sizeof__Bool" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007735
7736
7737
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007738cat >>confdefs.h <<_ACEOF
7739#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7740_ACEOF
7741
7742
7743fi
7744
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007745ac_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 +00007746 #include <stdint.h>
7747 #endif
Antoine Pitrou7be5a652010-10-10 08:14:41 +00007748 #ifdef HAVE_INTTYPES_H
7749 #include <inttypes.h>
7750 #endif
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007751"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007752if test "x$ac_cv_type_uintptr_t" = xyes; then :
Martin v. Löwisebe26702006-10-02 14:55:51 +00007753
7754cat >>confdefs.h <<_ACEOF
7755#define HAVE_UINTPTR_T 1
7756_ACEOF
7757
Martin v. Löwiseba40652007-08-30 20:10:57 +00007758# The cast to long int works around a bug in the HP C Compiler
7759# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7760# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7761# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7763$as_echo_n "checking size of uintptr_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007764if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007765 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007766else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007767 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 +00007768
Martin v. Löwis11437992002-04-12 09:54:03 +00007769else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007770 if test "$ac_cv_type_uintptr_t" = yes; then
7771 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7772$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007773as_fn_error 77 "cannot compute sizeof (uintptr_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007774See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007775 else
7776 ac_cv_sizeof_uintptr_t=0
7777 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007778fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007779
Martin v. Löwis11437992002-04-12 09:54:03 +00007780fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007781{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7782$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007783
7784
7785
Martin v. Löwis11437992002-04-12 09:54:03 +00007786cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007787#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007788_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007789
Michael W. Hudson54241132001-12-07 15:38:26 +00007790
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007791fi
7792
Martin v. Löwisebe26702006-10-02 14:55:51 +00007793
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007794# The cast to long int works around a bug in the HP C Compiler
7795# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7796# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7797# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
7799$as_echo_n "checking size of off_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007800if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007801 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007802else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007803 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007804#ifdef HAVE_SYS_TYPES_H
7805#include <sys/types.h>
7806#endif
7807
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007808"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007809
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007810else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007811 if test "$ac_cv_type_off_t" = yes; then
7812 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7813$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007814as_fn_error 77 "cannot compute sizeof (off_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007815See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007816 else
7817 ac_cv_sizeof_off_t=0
7818 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007819fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007820
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007821fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007822{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
7823$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007824
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007825
7826
Martin v. Löwis11437992002-04-12 09:54:03 +00007827cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007828#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007829_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007830
Michael W. Hudson54241132001-12-07 15:38:26 +00007831
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007832
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
7834$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson0ef0b912009-12-31 21:11:48 +00007835if test "$have_long_long" = yes
7836then
7837if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007838 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007839
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007840$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007841
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7843$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007844else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7846$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007847fi
Mark Dickinson0ef0b912009-12-31 21:11:48 +00007848else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7850$as_echo "no" >&6; }
Mark Dickinson0ef0b912009-12-31 21:11:48 +00007851fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007852
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007853# The cast to long int works around a bug in the HP C Compiler
7854# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7855# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7856# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
7858$as_echo_n "checking size of time_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007859if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007860 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007861else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007862 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007863#ifdef HAVE_SYS_TYPES_H
7864#include <sys/types.h>
7865#endif
7866#ifdef HAVE_TIME_H
7867#include <time.h>
7868#endif
7869
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007870"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007871
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007872else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007873 if test "$ac_cv_type_time_t" = yes; then
7874 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7875$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007876as_fn_error 77 "cannot compute sizeof (time_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007877See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007878 else
7879 ac_cv_sizeof_time_t=0
7880 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007881fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007882
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007883fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007884{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
7885$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007886
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007887
7888
Martin v. Löwis11437992002-04-12 09:54:03 +00007889cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007890#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007891_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007892
Michael W. Hudson54241132001-12-07 15:38:26 +00007893
7894
Trent Mick635f6fb2000-08-23 21:33:05 +00007895# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007896ac_save_cc="$CC"
7897if test "$ac_cv_kpthread" = "yes"
7898then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00007899elif test "$ac_cv_kthread" = "yes"
7900then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00007901elif test "$ac_cv_pthread" = "yes"
7902then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007903fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
7905$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007906have_pthread_t=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007907cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007908/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00007909
7910 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007911int
7912main ()
7913{
Guido van Rossum12580492000-09-24 16:47:19 +00007914pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007915 ;
7916 return 0;
7917}
Matthias Klosec511b472010-05-08 11:01:39 +00007918
Martin v. Löwis11437992002-04-12 09:54:03 +00007919_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007920if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00007921 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00007922fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007923rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007924{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
7925$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007926if test "$have_pthread_t" = yes ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007927 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007928# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7929# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7930# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
7932$as_echo_n "checking size of pthread_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007933if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007934 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007935else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007936 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007937#ifdef HAVE_PTHREAD_H
7938#include <pthread.h>
7939#endif
7940
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007941"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007942
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007943else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007944 if test "$ac_cv_type_pthread_t" = yes; then
7945 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7946$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007947as_fn_error 77 "cannot compute sizeof (pthread_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007948See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007949 else
7950 ac_cv_sizeof_pthread_t=0
7951 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00007952fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007953
Trent Mick635f6fb2000-08-23 21:33:05 +00007954fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007955{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
7956$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007957
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007958
7959
Martin v. Löwis11437992002-04-12 09:54:03 +00007960cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007961#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007962_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007963
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007964
Trent Mick635f6fb2000-08-23 21:33:05 +00007965fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007966CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00007967
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-toolbox-glue" >&5
7969$as_echo_n "checking for --enable-toolbox-glue... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007970# Check whether --enable-toolbox-glue was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007971if test "${enable_toolbox_glue+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007972 enableval=$enable_toolbox_glue;
7973fi
Jack Jansene578a632001-08-15 01:27:14 +00007974
7975
7976if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +00007977then
Jack Jansene578a632001-08-15 01:27:14 +00007978 case $ac_sys_system/$ac_sys_release in
7979 Darwin/*)
7980 enable_toolbox_glue="yes";;
7981 *)
7982 enable_toolbox_glue="no";;
7983 esac
7984fi
7985case "$enable_toolbox_glue" in
7986yes)
Jack Jansene578a632001-08-15 01:27:14 +00007987 extra_machdep_objs="Python/mactoolboxglue.o"
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007988 extra_undefs="-u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +00007989
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007990$as_echo "#define USE_TOOLBOX_OBJECT_GLUE 1" >>confdefs.h
Jack Jansene578a632001-08-15 01:27:14 +00007991
7992 ;;
7993*)
Jack Jansene578a632001-08-15 01:27:14 +00007994 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00007995 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00007996 ;;
7997esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007998{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_toolbox_glue" >&5
7999$as_echo "$enable_toolbox_glue" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008000
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008001
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00008002
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008003case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +00008004 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008005 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8006 ;;
8007 Darwin/*)
8008 OTHER_LIBTOOL_OPT=""
8009 ;;
8010esac
8011
8012
Ronald Oussoren25967582009-09-06 10:00:26 +00008013
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008014case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +00008015 Darwin/[01567]\..*)
Ronald Oussoren988117f2006-04-29 11:31:35 +00008016 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8017 if test "${enable_universalsdk}"; then
8018 :
8019 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00008020 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Ronald Oussoren988117f2006-04-29 11:31:35 +00008021 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008022 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008023 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008024 Darwin/*)
Ronald Oussorena55af9a2010-01-17 16:25:57 +00008025 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008026 if test ${gcc_version} '<' 4.0
8027 then
8028 LIBTOOL_CRUFT="-lcc_dynamic"
8029 else
8030 LIBTOOL_CRUFT=""
8031 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008032 if test "$cross_compiling" = yes; then :
Ronald Oussoren23d92532009-09-07 06:12:00 +00008033 ac_osx_32bit=yes
Ronald Oussoren25967582009-09-06 10:00:26 +00008034else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008035 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren25967582009-09-06 10:00:26 +00008036/* end confdefs.h. */
Ronald Oussoren23d92532009-09-07 06:12:00 +00008037
Ronald Oussoren25967582009-09-06 10:00:26 +00008038 #include <unistd.h>
8039 int main(int argc, char*argv[])
8040 {
8041 if (sizeof(long) == 4) {
8042 return 0;
8043 } else {
8044 return 1;
8045 }
Ronald Oussoren84ddd722009-09-08 07:17:10 +00008046 }
Ronald Oussoren23d92532009-09-07 06:12:00 +00008047
Ronald Oussoren25967582009-09-06 10:00:26 +00008048_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008049if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren25967582009-09-06 10:00:26 +00008050 ac_osx_32bit=yes
8051else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008052 ac_osx_32bit=no
Ronald Oussoren25967582009-09-06 10:00:26 +00008053fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008054rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8055 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren25967582009-09-06 10:00:26 +00008056fi
8057
8058
Ronald Oussoren25967582009-09-06 10:00:26 +00008059 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00008060 case `/usr/bin/arch` in
Ronald Oussoren25967582009-09-06 10:00:26 +00008061 i386)
8062 MACOSX_DEFAULT_ARCH="i386"
8063 ;;
8064 ppc)
8065 MACOSX_DEFAULT_ARCH="ppc"
8066 ;;
8067 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008068 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren25967582009-09-06 10:00:26 +00008069 ;;
8070 esac
8071 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00008072 case `/usr/bin/arch` in
Ronald Oussoren25967582009-09-06 10:00:26 +00008073 i386)
8074 MACOSX_DEFAULT_ARCH="x86_64"
8075 ;;
8076 ppc)
8077 MACOSX_DEFAULT_ARCH="ppc64"
8078 ;;
8079 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008080 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren25967582009-09-06 10:00:26 +00008081 ;;
8082 esac
8083
8084 #ARCH_RUN_32BIT="true"
8085 fi
8086
8087 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00008088 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008089 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008090esac
8091
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
8093$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008094if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008095then
Skip Montanarodecc6a42003-01-01 20:07:49 +00008096 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00008097 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008098 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008099
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008100$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008101
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8103$as_echo "yes" >&6; }
Ronald Oussoren450d5612009-06-08 21:12:41 +00008104 if test $enable_shared = "yes"
8105 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008106 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 +00008107 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008108else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8110$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008111fi
8112
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
8114$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008115case $ac_sys_system/$ac_sys_release in
8116 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008117
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008118$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008119
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
8121$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008122 ;;
8123 *)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8125$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008126 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008127esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008128
Guido van Rossum0a516c91994-09-12 10:58:40 +00008129# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008130
Michael W. Hudson54241132001-12-07 15:38:26 +00008131
8132
8133
8134
Ronald Oussoren75912852010-04-08 08:13:31 +00008135
Guido van Rossum0a516c91994-09-12 10:58:40 +00008136# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00008137# -- usually .so, .sl on HP-UX, .dll on Cygwin
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
8139$as_echo_n "checking SO... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008140if test -z "$SO"
8141then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008142 case $ac_sys_system in
Neal Norwitz58e28882006-05-19 07:00:58 +00008143 hp*|HP*)
8144 case `uname -m` in
8145 ia64) SO=.so;;
8146 *) SO=.sl;;
8147 esac
8148 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00008149 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00008150 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008151 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +00008152else
8153 # this might also be a termcap variable, see #610332
8154 echo
8155 echo '====================================================================='
8156 echo '+ +'
8157 echo '+ WARNING: You have set SO in your environment. +'
8158 echo '+ Do you really mean to change the extension for shared libraries? +'
8159 echo '+ Continuing in 10 seconds to let you to ponder. +'
8160 echo '+ +'
8161 echo '====================================================================='
8162 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +00008163fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008164{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
8165$as_echo "$SO" >&6; }
Neal Norwitz58e28882006-05-19 07:00:58 +00008166
Ronald Oussoren79f90492009-01-02 10:44:46 +00008167
Neal Norwitz58e28882006-05-19 07:00:58 +00008168cat >>confdefs.h <<_ACEOF
8169#define SHLIB_EXT "$SO"
8170_ACEOF
8171
Guido van Rossum0a516c91994-09-12 10:58:40 +00008172# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00008173# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008174# (Shared libraries in this instance are shared modules to be loaded into
8175# Python, as opposed to building Python itself as a shared library.)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
8177$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008178if test -z "$LDSHARED"
8179then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008180 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008181 AIX*)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008182 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00008183 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008184 ;;
8185 BeOS*)
8186 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +00008187 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008188 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00008189 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00008190 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008191 SunOS/5*)
Ronald Oussoren75912852010-04-08 08:13:31 +00008192 if test "$GCC" = "yes" ; then
8193 LDSHARED='$(CC) -shared'
8194 LDCXXSHARED='$(CXX) -shared'
8195 else
8196 LDSHARED='$(CC) -G'
8197 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a662000-05-26 12:22:54 +00008198 fi ;;
Thomas Hellerdc96a772008-04-04 10:07:55 +00008199 hp*|HP*)
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='ld -b'
Thomas Hellerdc96a772008-04-04 10:07:55 +00008205 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +00008206 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +00008207 Darwin/1.3*)
Stefan Krah3a3e2032010-11-28 15:30:05 +00008208 LDSHARED='$(CC) -bundle'
8209 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00008210 if test "$enable_framework" ; then
8211 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008212 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8213 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008214 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008215 else
8216 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00008217 LDSHARED="$LDSHARED -undefined suppress"
Ronald Oussoren75912852010-04-08 08:13:31 +00008218 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00008219 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008220 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Stefan Krah3a3e2032010-11-28 15:30:05 +00008221 LDSHARED='$(CC) -bundle'
8222 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00008223 if test "$enable_framework" ; then
8224 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008225 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8226 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008227 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008228 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00008229 # No framework, use the Python app as bundle-loader
8230 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00008231 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008232 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008233 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008234 Darwin/*)
8235 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
8236 # This allows an extension to be used in any Python
Ronald Oussoren38f1b982007-09-02 09:46:07 +00008237
Ned Deilyc40b9032014-06-25 13:48:46 -07008238 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
8239 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
8240 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
8241 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
8242 if test ${dep_target_major} -eq 10 && \
8243 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00008244 then
Ned Deilyc40b9032014-06-25 13:48:46 -07008245 # building for OS X 10.0 through 10.2
Stefan Krah3a3e2032010-11-28 15:30:05 +00008246 LDSHARED='$(CC) -bundle'
8247 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00008248 if test "$enable_framework" ; then
8249 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008250 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8251 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008252 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008253 else
8254 # No framework, use the Python app as bundle-loader
8255 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
8256 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008257 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008258 fi
Ned Deilyc40b9032014-06-25 13:48:46 -07008259 else
8260 # building for OS X 10.3 and later
8261 if test "${enable_universalsdk}"; then
8262 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
8263 fi
8264 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
8265 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
8266 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00008267 fi
8268 ;;
Ronald Oussoren75912852010-04-08 08:13:31 +00008269 Linux*|GNU*|QNX*)
8270 LDSHARED='$(CC) -shared'
8271 LDCXXSHARED='$(CXX) -shared';;
8272 BSD/OS*/4*)
8273 LDSHARED="gcc -shared"
8274 LDCXXSHARED="g++ -shared";;
Martin v. Löwis222c5152006-06-03 07:37:13 +00008275 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00008276 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00008277 then
Stefan Krah3a3e2032010-11-28 15:30:05 +00008278 LDSHARED='$(CC) -shared'
8279 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00008280 else
Stefan Krah3a3e2032010-11-28 15:30:05 +00008281 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00008282 fi;;
Martin v. Löwis222c5152006-06-03 07:37:13 +00008283 OpenBSD*)
8284 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8285 then
Stefan Krah3a3e2032010-11-28 15:30:05 +00008286 LDSHARED='$(CC) -shared $(CCSHARED)'
8287 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Martin v. Löwis222c5152006-06-03 07:37:13 +00008288 else
8289 case `uname -r` in
8290 [01].* | 2.[0-7] | 2.[0-7].*)
8291 LDSHARED="ld -Bshareable ${LDFLAGS}"
8292 ;;
8293 *)
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 ;;
8297 esac
8298 fi;;
Ronald Oussoren75912852010-04-08 08:13:31 +00008299 NetBSD*|DragonFly*)
Antoine Pitroucb402772011-01-02 20:51:34 +00008300 LDSHARED='$(CC) -shared'
8301 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008302 OpenUNIX*|UnixWare*)
Ronald Oussoren75912852010-04-08 08:13:31 +00008303 if test "$GCC" = "yes" ; then
8304 LDSHARED='$(CC) -shared'
8305 LDCXXSHARED='$(CXX) -shared'
8306 else
8307 LDSHARED='$(CC) -G'
8308 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00008309 fi;;
Ronald Oussoren75912852010-04-08 08:13:31 +00008310 SCO_SV*)
8311 LDSHARED='$(CC) -Wl,-G,-Bexport'
8312 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
8313 CYGWIN*)
8314 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
8315 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
8316 atheos*)
8317 LDSHARED="gcc -shared"
8318 LDCXXSHARED="g++ -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008319 *) LDSHARED="ld";;
8320 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008321fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008322{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
8323$as_echo "$LDSHARED" >&6; }
Ronald Oussoren75912852010-04-08 08:13:31 +00008324LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008325BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00008326# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008327# library (module) -- this is only needed for a few systems
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
8329$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008330if test -z "$CCSHARED"
8331then
Guido van Rossum07397971997-04-29 21:49:50 +00008332 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008333 SunOS*) if test "$GCC" = yes;
Martin v. Löwiseb623572007-03-12 10:50:39 +00008334 then CCSHARED="-fPIC";
8335 elif test `uname -p` = sparc;
8336 then CCSHARED="-xcode=pic32";
8337 else CCSHARED="-Kpic";
8338 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00008339 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00008340 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00008341 else CCSHARED="+z";
8342 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008343 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008344 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008345 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008346 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008347 if test "$GCC" = "yes"
8348 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008349 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008350 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008351 SCO_SV*)
8352 if test "$GCC" = "yes"
8353 then CCSHARED="-fPIC"
8354 else CCSHARED="-Kpic -belf"
8355 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008356 IRIX*/6*) case $CC in
8357 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00008358 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008359 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008360 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008361 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008362fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008363{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
8364$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008365# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008366# the python executable -- this is only needed for a few systems
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
8368$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008369if test -z "$LINKFORSHARED"
8370then
Guido van Rossum07397971997-04-29 21:49:50 +00008371 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008372 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008373 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00008374 LINKFORSHARED="-Wl,-E -Wl,+s";;
8375# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008376 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008377 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008378 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00008379 Darwin/*)
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008380 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
8381 # which is
Jack Jansene578a632001-08-15 01:27:14 +00008382 # not used by the core itself but which needs to be in the core so
8383 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +00008384 # -prebind is no longer used, because it actually seems to give a
8385 # slowdown in stead of a speedup, maybe due to the large number of
8386 # dynamic loads Python does.
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008387
8388 LINKFORSHARED="$extra_undefs"
Jack Jansene578a632001-08-15 01:27:14 +00008389 if test "$enable_framework"
8390 then
Jack Jansenda49e192005-01-07 13:08:22 +00008391 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008392 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008393 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008394 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008395 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00008396 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008397 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00008398 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8399 then
8400 LINKFORSHARED="-Wl,--export-dynamic"
8401 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008402 SunOS/5*) case $CC in
8403 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00008404 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00008405 then
8406 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008407 fi;;
8408 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00008409 CYGWIN*)
8410 if test $enable_shared = "no"
8411 then
8412 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
8413 fi;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00008414 QNX*)
8415 # -Wl,-E causes the symbols to be added to the dynamic
8416 # symbol table so that they can be found when a module
8417 # is loaded. -N 2048K causes the stack size to be set
8418 # to 2048 kilobytes so that the stack doesn't overflow
8419 # when running test_compile.py.
8420 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008421 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008422fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008423{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
8424$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008425
Michael W. Hudson54241132001-12-07 15:38:26 +00008426
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00008427
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
8429$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008430if test ! "$LIBRARY" = "$LDLIBRARY"
8431then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00008432 case $ac_sys_system in
8433 CYGWIN*)
8434 # Cygwin needs CCSHARED when building extension DLLs
8435 # but not when building the interpreter DLL.
8436 CFLAGSFORSHARED='';;
8437 *)
8438 CFLAGSFORSHARED='$(CCSHARED)'
8439 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008440fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008441{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
8442$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008443
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008444# SHLIBS are libraries (except -lc and -lm) to link to the python shared
8445# library (with --enable-shared).
8446# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008447# symbols, this must be set to $(LIBS) (expanded by make). We do this even
8448# if it is not required, since it creates a dependency of the shared library
8449# to LIBS. This, in turn, means that applications linking the shared libpython
8450# don't need to link LIBS explicitly. The default should be only changed
8451# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008452
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
8454$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008455case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008456 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008457 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008458esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008459{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
8460$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008461
8462
Guido van Rossum627b2d71993-12-24 10:39:16 +00008463# checks for libraries
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
8465$as_echo_n "checking for dlopen in -ldl... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008466if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008467 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008468else
Martin v. Löwis11437992002-04-12 09:54:03 +00008469 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008470LIBS="-ldl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008471cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008472/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008473
Martin v. Löwiseba40652007-08-30 20:10:57 +00008474/* Override any GCC internal prototype to avoid an error.
8475 Use char because int might match the return type of a GCC
8476 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008477#ifdef __cplusplus
8478extern "C"
8479#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008480char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008481int
8482main ()
8483{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008484return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008485 ;
8486 return 0;
8487}
8488_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008489if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008490 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008491else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008492 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008493fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008494rm -f core conftest.err conftest.$ac_objext \
8495 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008496LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008497fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008498{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
8499$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008500if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008501 cat >>confdefs.h <<_ACEOF
8502#define HAVE_LIBDL 1
8503_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008504
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008505 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00008506
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008507fi
8508 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
8510$as_echo_n "checking for shl_load in -ldld... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008511if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008512 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008513else
Martin v. Löwis11437992002-04-12 09:54:03 +00008514 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008515LIBS="-ldld $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008516cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008517/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008518
Martin v. Löwiseba40652007-08-30 20:10:57 +00008519/* Override any GCC internal prototype to avoid an error.
8520 Use char because int might match the return type of a GCC
8521 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008522#ifdef __cplusplus
8523extern "C"
8524#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008525char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008526int
8527main ()
8528{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008529return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008530 ;
8531 return 0;
8532}
8533_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008534if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008535 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008536else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008537 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008538fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008539rm -f core conftest.err conftest.$ac_objext \
8540 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008541LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008542fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008543{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
8544$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008545if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008546 cat >>confdefs.h <<_ACEOF
8547#define HAVE_LIBDLD 1
8548_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008549
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008550 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008551
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008552fi
8553 # Dynamic linking for HP-UX
Victor Stinner7c906672015-01-06 13:53:37 +01008554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for RAND_egd in -lcrypto" >&5
8555$as_echo_n "checking for RAND_egd in -lcrypto... " >&6; }
8556if ${ac_cv_lib_crypto_RAND_egd+:} false; then :
8557 $as_echo_n "(cached) " >&6
8558else
8559 ac_check_lib_save_LIBS=$LIBS
8560LIBS="-lcrypto $LIBS"
8561cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8562/* end confdefs.h. */
8563
8564/* Override any GCC internal prototype to avoid an error.
8565 Use char because int might match the return type of a GCC
8566 builtin and then its argument prototype would still apply. */
8567#ifdef __cplusplus
8568extern "C"
8569#endif
8570char RAND_egd ();
8571int
8572main ()
8573{
8574return RAND_egd ();
8575 ;
8576 return 0;
8577}
8578_ACEOF
8579if ac_fn_c_try_link "$LINENO"; then :
8580 ac_cv_lib_crypto_RAND_egd=yes
8581else
8582 ac_cv_lib_crypto_RAND_egd=no
8583fi
8584rm -f core conftest.err conftest.$ac_objext \
8585 conftest$ac_exeext conftest.$ac_ext
8586LIBS=$ac_check_lib_save_LIBS
8587fi
8588{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_RAND_egd" >&5
8589$as_echo "$ac_cv_lib_crypto_RAND_egd" >&6; }
8590if test "x$ac_cv_lib_crypto_RAND_egd" = xyes; then :
8591
8592$as_echo "#define HAVE_RAND_EGD 1" >>confdefs.h
8593
8594fi
8595
Martin v. Löwis519adae2003-09-20 10:47:47 +00008596
Ronald Oussoren79f90492009-01-02 10:44:46 +00008597# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00008598if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008599 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
8600$as_echo_n "checking for library containing sem_init... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008601if ${ac_cv_search_sem_init+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008602 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008603else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008604 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008605cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008606/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008607
Martin v. Löwiseba40652007-08-30 20:10:57 +00008608/* Override any GCC internal prototype to avoid an error.
8609 Use char because int might match the return type of a GCC
8610 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008611#ifdef __cplusplus
8612extern "C"
8613#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008614char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008615int
8616main ()
8617{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008618return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008619 ;
8620 return 0;
8621}
8622_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00008623for ac_lib in '' pthread rt posix4; do
8624 if test -z "$ac_lib"; then
8625 ac_res="none required"
8626 else
8627 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00008628 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00008629 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008630 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008631 ac_cv_search_sem_init=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00008632fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008633rm -f core conftest.err conftest.$ac_objext \
8634 conftest$ac_exeext
Matthias Klose3cef2a92012-03-14 23:39:33 +01008635 if ${ac_cv_search_sem_init+:} false; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008636 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00008637fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008638done
Matthias Klose3cef2a92012-03-14 23:39:33 +01008639if ${ac_cv_search_sem_init+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008640
Martin v. Löwiseba40652007-08-30 20:10:57 +00008641else
8642 ac_cv_search_sem_init=no
8643fi
8644rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008645LIBS=$ac_func_search_save_LIBS
8646fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008647{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
8648$as_echo "$ac_cv_search_sem_init" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008649ac_res=$ac_cv_search_sem_init
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008650if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008651 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008652
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008653fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00008654 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00008655 # posix4 on Solaris 2.6
8656 # pthread (first!) on Linux
8657fi
8658
Martin v. Löwis19d17342003-06-14 21:03:05 +00008659# check if we need libintl for locale functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
8661$as_echo_n "checking for textdomain in -lintl... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008662if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008663 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00008664else
8665 ac_check_lib_save_LIBS=$LIBS
8666LIBS="-lintl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008667cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008668/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008669
Martin v. Löwiseba40652007-08-30 20:10:57 +00008670/* Override any GCC internal prototype to avoid an error.
8671 Use char because int might match the return type of a GCC
8672 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008673#ifdef __cplusplus
8674extern "C"
8675#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00008676char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008677int
8678main ()
8679{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008680return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008681 ;
8682 return 0;
8683}
8684_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008685if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008686 ac_cv_lib_intl_textdomain=yes
8687else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008688 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00008689fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008690rm -f core conftest.err conftest.$ac_objext \
8691 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00008692LIBS=$ac_check_lib_save_LIBS
8693fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008694{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
8695$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008696if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008697
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008698$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00008699
8700fi
8701
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008702
8703# checks for system dependent C++ extensions support
8704case "$ac_sys_system" in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008705 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
8706$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
8707 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008708/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00008709
Georg Brandl94800df2011-02-25 11:09:02 +00008710 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008711int
8712main ()
8713{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008714loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00008715 ;
8716 return 0;
8717}
Matthias Klosec511b472010-05-08 11:01:39 +00008718
Martin v. Löwis11437992002-04-12 09:54:03 +00008719_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008720if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008721
Matthias Klosec511b472010-05-08 11:01:39 +00008722
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008723$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008724
Matthias Klosec511b472010-05-08 11:01:39 +00008725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008726$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00008727
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008728else
Matthias Klosec511b472010-05-08 11:01:39 +00008729
8730 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008731$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00008732
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008733fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008734rm -f core conftest.err conftest.$ac_objext \
8735 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008736 *) ;;
8737esac
8738
Guido van Rossum70c7f481998-03-26 18:44:10 +00008739# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008740# BeOS' sockets are stashed in libnet.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
8742$as_echo_n "checking for t_open in -lnsl... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008743if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008744 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008745else
Martin v. Löwis11437992002-04-12 09:54:03 +00008746 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008747LIBS="-lnsl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008748cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008749/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008750
Martin v. Löwiseba40652007-08-30 20:10:57 +00008751/* Override any GCC internal prototype to avoid an error.
8752 Use char because int might match the return type of a GCC
8753 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008754#ifdef __cplusplus
8755extern "C"
8756#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008757char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008758int
8759main ()
8760{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008761return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008762 ;
8763 return 0;
8764}
8765_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008766if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008767 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008768else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008769 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008770fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008771rm -f core conftest.err conftest.$ac_objext \
8772 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008773LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008774fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008775{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
8776$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008777if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008778 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008779fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00008780 # SVR4
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8782$as_echo_n "checking for socket in -lsocket... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008783if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008784 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008785else
Martin v. Löwis11437992002-04-12 09:54:03 +00008786 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008787LIBS="-lsocket $LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008788cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008789/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008790
Martin v. Löwiseba40652007-08-30 20:10:57 +00008791/* Override any GCC internal prototype to avoid an error.
8792 Use char because int might match the return type of a GCC
8793 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008794#ifdef __cplusplus
8795extern "C"
8796#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008797char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008798int
8799main ()
8800{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008801return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008802 ;
8803 return 0;
8804}
8805_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008806if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008807 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008808else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008809 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008810fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008811rm -f core conftest.err conftest.$ac_objext \
8812 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008813LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008814fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008815{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8816$as_echo "$ac_cv_lib_socket_socket" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008817if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00008818 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00008819fi
8820 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00008821
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +00008822case "$ac_sys_system" in
8823BeOS*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lnet" >&5
8825$as_echo_n "checking for socket in -lnet... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008826if ${ac_cv_lib_net_socket+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008827 $as_echo_n "(cached) " >&6
Guido van Rossumad678af1998-10-02 14:42:15 +00008828else
Martin v. Löwis11437992002-04-12 09:54:03 +00008829 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00008830LIBS="-lnet $LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008831cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008832/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008833
Martin v. Löwiseba40652007-08-30 20:10:57 +00008834/* Override any GCC internal prototype to avoid an error.
8835 Use char because int might match the return type of a GCC
8836 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008837#ifdef __cplusplus
8838extern "C"
8839#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008840char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008841int
8842main ()
8843{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008844return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008845 ;
8846 return 0;
8847}
8848_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008849if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008850 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +00008851else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008852 ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +00008853fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008854rm -f core conftest.err conftest.$ac_objext \
8855 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008856LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00008857fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008858{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_net_socket" >&5
8859$as_echo "$ac_cv_lib_net_socket" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008860if test "x$ac_cv_lib_net_socket" = xyes; then :
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008861 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008862fi
8863 # BeOS
8864;;
8865esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00008866
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
8868$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008869
Martin v. Löwiseba40652007-08-30 20:10:57 +00008870# Check whether --with-libs was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008871if test "${with_libs+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008872 withval=$with_libs;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008873{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8874$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00008875LIBS="$withval $LIBS"
8876
8877else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8879$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008880fi
8881
Guido van Rossum7f43da71994-08-01 12:15:30 +00008882
Benjamin Peterson64e8f6e2014-12-15 00:00:23 -05008883
8884
8885
8886
8887
8888
8889
8890if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
8891 if test -n "$ac_tool_prefix"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008892 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8893set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8895$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008896if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008897 $as_echo_n "(cached) " >&6
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008898else
8899 case $PKG_CONFIG in
8900 [\\/]* | ?:[\\/]*)
8901 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8902 ;;
8903 *)
8904 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8905for as_dir in $PATH
8906do
8907 IFS=$as_save_IFS
8908 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008909 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01008910 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008911 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008912 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008913 break 2
8914 fi
8915done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008916 done
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008917IFS=$as_save_IFS
8918
8919 ;;
8920esac
8921fi
8922PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8923if test -n "$PKG_CONFIG"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8925$as_echo "$PKG_CONFIG" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008926else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8928$as_echo "no" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008929fi
8930
8931
8932fi
8933if test -z "$ac_cv_path_PKG_CONFIG"; then
8934 ac_pt_PKG_CONFIG=$PKG_CONFIG
8935 # Extract the first word of "pkg-config", so it can be a program name with args.
8936set dummy pkg-config; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8938$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008939if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008940 $as_echo_n "(cached) " >&6
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008941else
8942 case $ac_pt_PKG_CONFIG in
8943 [\\/]* | ?:[\\/]*)
8944 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8945 ;;
8946 *)
8947 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8948for as_dir in $PATH
8949do
8950 IFS=$as_save_IFS
8951 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008952 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01008953 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008954 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008955 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008956 break 2
8957 fi
8958done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008959 done
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008960IFS=$as_save_IFS
8961
8962 ;;
8963esac
8964fi
8965ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8966if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
8968$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008969else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8971$as_echo "no" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008972fi
8973
8974 if test "x$ac_pt_PKG_CONFIG" = x; then
8975 PKG_CONFIG=""
8976 else
8977 case $cross_compiling:$ac_tool_warned in
8978yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008979{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8980$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008981ac_tool_warned=yes ;;
8982esac
8983 PKG_CONFIG=$ac_pt_PKG_CONFIG
8984 fi
8985else
8986 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8987fi
8988
Benjamin Peterson64e8f6e2014-12-15 00:00:23 -05008989fi
8990if test -n "$PKG_CONFIG"; then
8991 _pkg_min_version=0.9.0
8992 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
8993$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
8994 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
8995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8996$as_echo "yes" >&6; }
8997 else
8998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8999$as_echo "no" >&6; }
9000 PKG_CONFIG=""
9001 fi
9002fi
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009003
9004# Check for use of the system expat library
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
9006$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009007
9008# Check whether --with-system_expat was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009009if test "${with_system_expat+set}" = set; then :
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009010 withval=$with_system_expat;
Benjamin Petersonf2d1b2a2010-10-31 16:53:53 +00009011else
9012 with_system_expat="no"
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009013fi
9014
9015
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009016{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
9017$as_echo "$with_system_expat" >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009018
9019# Check for use of the system libffi library
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
9021$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009022
9023# Check whether --with-system_ffi was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009024if test "${with_system_ffi+set}" = set; then :
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009025 withval=$with_system_ffi;
Benjamin Petersonf2d1b2a2010-10-31 16:53:53 +00009026else
9027 with_system_ffi="no"
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009028fi
9029
9030
9031if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009032 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
9033else
9034 LIBFFI_INCLUDEDIR=""
9035fi
9036
9037
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009038{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
9039$as_echo "$with_system_ffi" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +00009040
Ned Deilya2a9f572013-10-25 00:30:10 -07009041# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
9042
9043
9044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
9045$as_echo_n "checking for --with-tcltk-includes... " >&6; }
9046
9047# Check whether --with-tcltk-includes was given.
9048if test "${with_tcltk_includes+set}" = set; then :
9049 withval=$with_tcltk_includes;
9050else
9051 with_tcltk_includes="default"
9052fi
9053
9054{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
9055$as_echo "$with_tcltk_includes" >&6; }
9056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
9057$as_echo_n "checking for --with-tcltk-libs... " >&6; }
9058
9059# Check whether --with-tcltk-libs was given.
9060if test "${with_tcltk_libs+set}" = set; then :
9061 withval=$with_tcltk_libs;
9062else
9063 with_tcltk_libs="default"
9064fi
9065
9066{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
9067$as_echo "$with_tcltk_libs" >&6; }
9068if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
9069then
9070 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
9071 then
9072 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
9073 fi
9074 TCLTK_INCLUDES=""
9075 TCLTK_LIBS=""
9076else
9077 TCLTK_INCLUDES="$with_tcltk_includes"
9078 TCLTK_LIBS="$with_tcltk_libs"
9079fi
9080
Benjamin Peterson867475c2009-04-29 20:36:25 +00009081# Check for --with-dbmliborder
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
9083$as_echo_n "checking for --with-dbmliborder... " >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +00009084
9085# Check whether --with-dbmliborder was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009086if test "${with_dbmliborder+set}" = set; then :
Benjamin Peterson867475c2009-04-29 20:36:25 +00009087 withval=$with_dbmliborder;
9088if test x$with_dbmliborder = xyes
9089then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009090as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Benjamin Peterson867475c2009-04-29 20:36:25 +00009091else
9092 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
9093 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
9094 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009095 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Benjamin Peterson867475c2009-04-29 20:36:25 +00009096 fi
9097 done
9098fi
9099fi
9100
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009101{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
9102$as_echo "$with_dbmliborder" >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +00009103
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009104# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009105
9106
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
9108$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009109
Martin v. Löwiseba40652007-08-30 20:10:57 +00009110# Check whether --with-signal-module was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009111if test "${with_signal_module+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009112 withval=$with_signal_module;
9113fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009114
9115
9116if test -z "$with_signal_module"
9117then with_signal_module="yes"
9118fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009119{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
9120$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009121
9122if test "${with_signal_module}" = "yes"; then
9123 USE_SIGNAL_MODULE=""
9124 SIGNAL_OBJS=""
9125else
9126 USE_SIGNAL_MODULE="#"
9127 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9128fi
9129
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009130# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009131
Barry Warsawc0d24d82000-06-29 16:12:00 +00009132USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009133
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dec-threads" >&5
9135$as_echo_n "checking for --with-dec-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009136
Guido van Rossumec2f0731997-01-22 20:54:01 +00009137
Martin v. Löwiseba40652007-08-30 20:10:57 +00009138# Check whether --with-dec-threads was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009139if test "${with_dec_threads+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009140 withval=$with_dec_threads;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009141{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9142$as_echo "$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +00009143LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00009144if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00009145 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00009146fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009147else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9149$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009150fi
9151
Martin v. Löwis11437992002-04-12 09:54:03 +00009152
9153# Templates for things AC_DEFINEd more than once.
9154# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009155
9156
Martin v. Löwis11437992002-04-12 09:54:03 +00009157
9158
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
9160$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009161
Martin v. Löwiseba40652007-08-30 20:10:57 +00009162# Check whether --with-threads was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009163if test "${with_threads+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009164 withval=$with_threads;
9165fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009166
9167
Barry Warsawc0d24d82000-06-29 16:12:00 +00009168# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009169
Martin v. Löwiseba40652007-08-30 20:10:57 +00009170# Check whether --with-thread was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009171if test "${with_thread+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009172 withval=$with_thread; with_threads=$with_thread
9173fi
9174
Barry Warsawc0d24d82000-06-29 16:12:00 +00009175
9176if test -z "$with_threads"
9177then with_threads="yes"
9178fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009179{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
9180$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d82000-06-29 16:12:00 +00009181
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009182
Barry Warsawc0d24d82000-06-29 16:12:00 +00009183if test "$with_threads" = "no"
9184then
9185 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009186elif test "$ac_cv_pthread_is_default" = yes
9187then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009188 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009189
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009190 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009191 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009192
9193 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009194 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009195elif test "$ac_cv_kpthread" = "yes"
9196then
9197 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009198 if test "$ac_cv_cxx_thread" = "yes"; then
9199 CXX="$CXX -Kpthread"
9200 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009201 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009202
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009203 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009204 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009205elif test "$ac_cv_kthread" = "yes"
9206then
9207 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009208 if test "$ac_cv_cxx_thread" = "yes"; then
9209 CXX="$CXX -Kthread"
9210 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009211 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009212
9213 posix_threads=yes
9214 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009215elif test "$ac_cv_pthread" = "yes"
9216then
9217 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009218 if test "$ac_cv_cxx_thread" = "yes"; then
9219 CXX="$CXX -pthread"
9220 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009221 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009222
9223 posix_threads=yes
9224 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009225else
9226 if test ! -z "$with_threads" -a -d "$with_threads"
9227 then LDFLAGS="$LDFLAGS -L$with_threads"
9228 fi
9229 if test ! -z "$withval" -a -d "$withval"
9230 then LDFLAGS="$LDFLAGS -L$withval"
9231 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009232
9233 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00009234 # define _POSIX_THREADS in unistd.h. Some apparently don't
9235 # (e.g. gnu pth with pthread emulation)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009236 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
9237$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
9238 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009239/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009240
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009241#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009242#ifdef _POSIX_THREADS
9243yes
9244#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009245
9246_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009247if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009248 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009249 unistd_defines_pthreads=yes
9250else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009251 unistd_defines_pthreads=no
9252fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009253rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009254
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009255 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
9256$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009257
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009258 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009259
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009260 ac_fn_c_check_header_mongrel "$LINENO" "cthreads.h" "ac_cv_header_cthreads_h" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01009261if test "x$ac_cv_header_cthreads_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009262 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00009263
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009264 $as_echo "#define C_THREADS 1" >>confdefs.h
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009265
Martin v. Löwis11437992002-04-12 09:54:03 +00009266
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009267$as_echo "#define HURD_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009268
9269 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009270 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009271else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009272
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009273 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 +01009274if test "x$ac_cv_header_mach_cthreads_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009275 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00009276
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009277 $as_echo "#define C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009278
Martin v. Löwis11437992002-04-12 09:54:03 +00009279
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009280$as_echo "#define MACH_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009281
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009282 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009283else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009284
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009285 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pth" >&5
9286$as_echo_n "checking for --with-pth... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009287
Martin v. Löwiseba40652007-08-30 20:10:57 +00009288# Check whether --with-pth was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009289if test "${with_pth+set}" = set; then :
9290 withval=$with_pth; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9291$as_echo "$withval" >&6; }
9292 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009293
9294
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009295$as_echo "#define HAVE_PTH 1" >>confdefs.h
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009296
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009297 LIBS="-lpth $LIBS"
9298 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009299else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9301$as_echo "no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009302
9303 # Just looking for pthread_create in libpthread is not enough:
9304 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
9305 # So we really have to include pthread.h, and then link.
9306 _libs=$LIBS
9307 LIBS="$LIBS -lpthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009308 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
9309$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
9310 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009311/* end confdefs.h. */
Stefan Krahae66ca62012-11-22 22:36:57 +01009312
9313#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009314#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00009315
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009316void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00009317int
9318main ()
9319{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009320
9321pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00009322 ;
9323 return 0;
9324}
9325_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009326if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009327
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9329$as_echo "yes" >&6; }
9330 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00009331
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009332 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009333 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009334else
Martin v. Löwis11437992002-04-12 09:54:03 +00009335
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009336 LIBS=$_libs
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009337 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Matthias Klose3cef2a92012-03-14 23:39:33 +01009338if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009339 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00009340
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009341 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009342 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00009343else
Guido van Rossumad678af1998-10-02 14:42:15 +00009344
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009345 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 +01009346if test "x$ac_cv_header_atheos_threads_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009347 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009348
9349
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009350$as_echo "#define ATHEOS_THREADS 1" >>confdefs.h
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009351
9352 THREADOBJ="Python/thread.o"
9353else
9354
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009355 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 +01009356if test "x$ac_cv_header_kernel_OS_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009357 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009358
9359
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009360$as_echo "#define BEOS_THREADS 1" >>confdefs.h
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009361
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009362 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009363else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009364
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009365 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
9366$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009367if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009368 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009369else
Martin v. Löwis11437992002-04-12 09:54:03 +00009370 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009371LIBS="-lpthreads $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009372cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009373/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009374
Martin v. Löwiseba40652007-08-30 20:10:57 +00009375/* Override any GCC internal prototype to avoid an error.
9376 Use char because int might match the return type of a GCC
9377 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009378#ifdef __cplusplus
9379extern "C"
9380#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009381char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009382int
9383main ()
9384{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009385return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009386 ;
9387 return 0;
9388}
9389_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009390if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009391 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00009392else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009393 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00009394fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009395rm -f core conftest.err conftest.$ac_objext \
9396 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009397LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009398fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009399{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
9400$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009401if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009402 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00009403
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009404 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009405 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009406 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00009407else
Greg Steinadf63d62000-07-05 10:38:09 +00009408
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009409 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
9410$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009411if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009412 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00009413else
Martin v. Löwis11437992002-04-12 09:54:03 +00009414 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009415LIBS="-lc_r $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009416cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009417/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009418
Martin v. Löwiseba40652007-08-30 20:10:57 +00009419/* Override any GCC internal prototype to avoid an error.
9420 Use char because int might match the return type of a GCC
9421 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009422#ifdef __cplusplus
9423extern "C"
9424#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009425char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009426int
9427main ()
9428{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009429return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009430 ;
9431 return 0;
9432}
9433_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009434if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009435 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00009436else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009437 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00009438fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009439rm -f core conftest.err conftest.$ac_objext \
9440 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009441LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00009442fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009443{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
9444$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009445if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009446 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00009447
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009448 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009449 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009450 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009451else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009452
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009453 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
9454$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009455if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009456 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009457else
Martin v. Löwis11437992002-04-12 09:54:03 +00009458 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009459LIBS="-lpthread $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009460cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009461/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009462
Martin v. Löwiseba40652007-08-30 20:10:57 +00009463/* Override any GCC internal prototype to avoid an error.
9464 Use char because int might match the return type of a GCC
9465 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009466#ifdef __cplusplus
9467extern "C"
9468#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009469char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009470int
9471main ()
9472{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009473return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009474 ;
9475 return 0;
9476}
9477_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009478if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009479 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009480else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009481 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009482fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009483rm -f core conftest.err conftest.$ac_objext \
9484 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009485LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009486fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009487{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
9488$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009489if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009490 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009491
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009492 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009493 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009494 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009495else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009496
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009497 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
9498$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009499if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009500 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00009501else
Martin v. Löwis11437992002-04-12 09:54:03 +00009502 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009503LIBS="-lcma $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009504cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009505/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009506
Martin v. Löwiseba40652007-08-30 20:10:57 +00009507/* Override any GCC internal prototype to avoid an error.
9508 Use char because int might match the return type of a GCC
9509 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009510#ifdef __cplusplus
9511extern "C"
9512#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009513char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009514int
9515main ()
9516{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009517return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009518 ;
9519 return 0;
9520}
9521_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009522if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009523 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00009524else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009525 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00009526fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009527rm -f core conftest.err conftest.$ac_objext \
9528 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009529LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009530fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009531{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
9532$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009533if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009534 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00009535
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009536 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009537 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009538 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00009539else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00009540
Martin v. Löwis130fb172001-07-19 11:00:41 +00009541 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00009542fi
9543
Guido van Rossum627b2d71993-12-24 10:39:16 +00009544
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009545fi
9546
Guido van Rossum0be3e491997-05-22 20:33:33 +00009547fi
9548
Guido van Rossum49545951997-12-02 19:28:29 +00009549fi
9550
Guido van Rossumb93a8621998-05-07 13:27:32 +00009551fi
9552
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009553
Michael W. Hudson54241132001-12-07 15:38:26 +00009554fi
9555
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009556
9557fi
9558
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009559fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009560rm -f core conftest.err conftest.$ac_objext \
9561 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009562fi
9563
Martin v. Löwis11437992002-04-12 09:54:03 +00009564fi
9565
9566
9567fi
9568
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009569
Michael W. Hudson54241132001-12-07 15:38:26 +00009570
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009571 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
9572$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009573if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009574 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009575else
Martin v. Löwis11437992002-04-12 09:54:03 +00009576 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009577LIBS="-lmpc $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009578cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009579/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009580
Martin v. Löwiseba40652007-08-30 20:10:57 +00009581/* Override any GCC internal prototype to avoid an error.
9582 Use char because int might match the return type of a GCC
9583 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009584#ifdef __cplusplus
9585extern "C"
9586#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009587char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009588int
9589main ()
9590{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009591return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009592 ;
9593 return 0;
9594}
9595_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009596if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009597 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009598else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009599 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009600fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009601rm -f core conftest.err conftest.$ac_objext \
9602 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009603LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009604fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009605{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
9606$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009607if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009608 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009609
Martin v. Löwis130fb172001-07-19 11:00:41 +00009610 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009611 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009612 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009613fi
9614
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009615
Neal Norwitza978ab02002-11-02 16:58:05 +00009616 if test "$posix_threads" != "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009617 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
9618$as_echo_n "checking for thr_create in -lthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009619if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009620 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009621else
Martin v. Löwis11437992002-04-12 09:54:03 +00009622 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009623LIBS="-lthread $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009624cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009625/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009626
Martin v. Löwiseba40652007-08-30 20:10:57 +00009627/* Override any GCC internal prototype to avoid an error.
9628 Use char because int might match the return type of a GCC
9629 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009630#ifdef __cplusplus
9631extern "C"
9632#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009633char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009634int
9635main ()
9636{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009637return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009638 ;
9639 return 0;
9640}
9641_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009642if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009643 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009644else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009645 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009646fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009647rm -f core conftest.err conftest.$ac_objext \
9648 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009649LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009650fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009651{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
9652$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009653if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009654 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009655
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009656 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009657 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009658 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009659fi
9660
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009661 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009662
Martin v. Löwis130fb172001-07-19 11:00:41 +00009663 if test "$USE_THREAD_MODULE" != "#"
9664 then
9665 # If the above checks didn't disable threads, (at least) OSF1
9666 # needs this '-threads' argument during linking.
9667 case $ac_sys_system in
9668 OSF1) LDLAST=-threads;;
9669 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00009670 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009671fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009672
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009673if test "$posix_threads" = "yes"; then
9674 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009675
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009676$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009677
9678 fi
9679
9680 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
9681 case $ac_sys_system/$ac_sys_release in
Charles-François Natali4929eb92011-07-21 19:41:04 +02009682 SunOS/5.6)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009683$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009684
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009685 ;;
9686 SunOS/5.8)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009687$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009688
9689 ;;
Charles-François Natali4929eb92011-07-21 19:41:04 +02009690 AIX/*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009691$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimescba36bb2008-01-30 22:54:18 +00009692
9693 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009694 esac
9695
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009696 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
9697$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009698 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009699 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009700else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009701 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009702 ac_cv_pthread_system_supported=no
9703else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009704 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009705/* end confdefs.h. */
Stefan Krahae66ca62012-11-22 22:36:57 +01009706
9707 #include <stdio.h>
9708 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009709 void *foo(void *parm) {
9710 return NULL;
9711 }
9712 main() {
9713 pthread_attr_t attr;
9714 pthread_t id;
9715 if (pthread_attr_init(&attr)) exit(-1);
9716 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
9717 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
9718 exit(0);
9719 }
9720_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009721if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009722 ac_cv_pthread_system_supported=yes
9723else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009724 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009725fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009726rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9727 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009728fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009729
Martin v. Löwiseba40652007-08-30 20:10:57 +00009730
Guido van Rossum627b2d71993-12-24 10:39:16 +00009731fi
9732
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
9734$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009735 if test "$ac_cv_pthread_system_supported" = "yes"; then
9736
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009737$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009738
9739 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009740 for ac_func in pthread_sigmask
9741do :
9742 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Matthias Klose3cef2a92012-03-14 23:39:33 +01009743if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009744 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009745#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009746_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00009747 case $ac_sys_system in
9748 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009749
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009750$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00009751
9752 ;;
9753 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009754fi
9755done
9756
Christian Heimes0d604cf2013-08-21 13:26:05 +02009757 for ac_func in pthread_atfork
9758do :
9759 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
9760if test "x$ac_cv_func_pthread_atfork" = xyes; then :
9761 cat >>confdefs.h <<_ACEOF
9762#define HAVE_PTHREAD_ATFORK 1
9763_ACEOF
9764
9765fi
9766done
9767
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009768fi
9769
9770
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009771# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00009772
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
9774$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009775# Check whether --enable-ipv6 was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009776if test "${enable_ipv6+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009777 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009778 no)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9780$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009781 ipv6=no
9782 ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009783 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9784$as_echo "yes" >&6; }
9785 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009786
9787 ipv6=yes
9788 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009789 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009790else
Martin v. Löwis11437992002-04-12 09:54:03 +00009791
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009792 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009793/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009794 /* AF_INET6 available check */
9795#include <sys/types.h>
9796#include <sys/socket.h>
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009797int
9798main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009799{
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009800int domain = AF_INET6;
9801 ;
9802 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009803}
Martin v. Löwis11437992002-04-12 09:54:03 +00009804_ACEOF
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009805if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +00009806
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9808$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009809 ipv6=yes
Matthias Klosec511b472010-05-08 11:01:39 +00009810
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009811else
Matthias Klosec511b472010-05-08 11:01:39 +00009812
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9814$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009815 ipv6=no
Matthias Klosec511b472010-05-08 11:01:39 +00009816
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009817fi
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009818rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009819
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009820if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009821 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
9822$as_echo_n "checking if RFC2553 API is available... " >&6; }
9823 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009824/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00009825
9826 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009827#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009828int
9829main ()
9830{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009831struct sockaddr_in6 x;
Matthias Klosec511b472010-05-08 11:01:39 +00009832 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00009833 ;
9834 return 0;
9835}
Matthias Klosec511b472010-05-08 11:01:39 +00009836
Martin v. Löwis11437992002-04-12 09:54:03 +00009837_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009838if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +00009839
9840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009841$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00009842 ipv6=yes
9843
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009844else
Matthias Klosec511b472010-05-08 11:01:39 +00009845
9846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009847$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00009848 ipv6=no
9849
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009850fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009851rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009852fi
9853
9854if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009855 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009856
9857fi
9858
Martin v. Löwiseba40652007-08-30 20:10:57 +00009859fi
9860
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009861
9862ipv6type=unknown
9863ipv6lib=none
9864ipv6trylibc=no
9865
9866if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009867 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
9868$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00009869 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
9870 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009871 case $i in
9872 inria)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009873 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009874/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009875
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009876#include <netinet/in.h>
9877#ifdef IPV6_INRIA_VERSION
9878yes
9879#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009880_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009881if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009882 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009883 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009884fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009885rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009886
9887 ;;
9888 kame)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009889 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009890/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009891
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009892#include <netinet/in.h>
9893#ifdef __KAME__
9894yes
9895#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009896_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009897if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009898 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009899 ipv6type=$i;
9900 ipv6lib=inet6
9901 ipv6libdir=/usr/local/v6/lib
9902 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009903fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009904rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009905
9906 ;;
9907 linux-glibc)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009908 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009909/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009910
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009911#include <features.h>
9912#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
9913yes
9914#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009915_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009916if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009917 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009918 ipv6type=$i;
9919 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009920fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009921rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009922
9923 ;;
9924 linux-inet6)
9925 if test -d /usr/inet6; then
9926 ipv6type=$i
9927 ipv6lib=inet6
9928 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00009929 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009930 fi
9931 ;;
9932 solaris)
9933 if test -f /etc/netconfig; then
Antoine Pitrou31e85952011-01-03 18:57:14 +00009934 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009935 ipv6type=$i
9936 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009937 fi
9938 fi
9939 ;;
9940 toshiba)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009941 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009942/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009943
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009944#include <sys/param.h>
9945#ifdef _TOSHIBA_INET6
9946yes
9947#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009948_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009949if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009950 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009951 ipv6type=$i;
9952 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009953 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009954fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009955rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009956
9957 ;;
9958 v6d)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009959 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009960/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009961
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009962#include </usr/local/v6/include/sys/v6config.h>
9963#ifdef __V6D__
9964yes
9965#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009966_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009967if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009968 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009969 ipv6type=$i;
9970 ipv6lib=v6;
9971 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009972 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009973fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009974rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009975
9976 ;;
9977 zeta)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009978 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009979/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009980
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009981#include <sys/param.h>
9982#ifdef _ZETA_MINAMI_INET6
9983yes
9984#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009985_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009986if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009987 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009988 ipv6type=$i;
9989 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009990 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009991fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009992rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009993
9994 ;;
9995 esac
9996 if test "$ipv6type" != "unknown"; then
9997 break
9998 fi
9999 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10001$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010002fi
10003
10004if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10005 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10006 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10007 echo "using lib$ipv6lib"
10008 else
10009 if test $ipv6trylibc = "yes"; then
10010 echo "using libc"
10011 else
10012 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10013 echo "You need to fetch lib$ipv6lib.a from appropriate"
10014 echo 'ipv6 kit and compile beforehand.'
10015 exit 1
10016 fi
10017 fi
10018fi
10019
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
10021$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
10022cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010023/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +000010024
10025 #include <Carbon/Carbon.h>
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010026int
10027main ()
10028{
10029FSIORefNum fRef = 0
10030 ;
10031 return 0;
10032}
Mark Dickinson0712b562010-05-08 19:13:21 +000010033
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010034_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010035if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +000010036
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010037
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010038$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010039
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10041$as_echo "yes" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010042
Mark Dickinson0712b562010-05-08 19:13:21 +000010043else
10044
10045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10046$as_echo "no" >&6; }
10047
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010048fi
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010049rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10050
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010051# Check for --with-doc-strings
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10053$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010054
Martin v. Löwiseba40652007-08-30 20:10:57 +000010055# Check whether --with-doc-strings was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010056if test "${with_doc_strings+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000010057 withval=$with_doc_strings;
10058fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010059
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010060
10061if test -z "$with_doc_strings"
10062then with_doc_strings="yes"
10063fi
10064if test "$with_doc_strings" != "no"
10065then
10066
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010067$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010068
10069fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010070{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10071$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010072
Neil Schemenauera35c6882001-02-27 04:45:05 +000010073# Check for Python-specific malloc support
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
10075$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010076
Martin v. Löwiseba40652007-08-30 20:10:57 +000010077# Check whether --with-tsc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010078if test "${with_tsc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000010079 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010080if test "$withval" != no
10081then
10082
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010083$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010084
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10086$as_echo "yes" >&6; }
10087else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10088$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010089fi
10090else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10092$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010093fi
10094
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010095
10096# Check for Python-specific malloc support
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10098$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010099
Martin v. Löwiseba40652007-08-30 20:10:57 +000010100# Check whether --with-pymalloc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010101if test "${with_pymalloc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000010102 withval=$with_pymalloc;
10103fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010104
Neil Schemenauera35c6882001-02-27 04:45:05 +000010105
Neil Schemenauer16c22972002-03-22 15:34:49 +000010106if test -z "$with_pymalloc"
10107then with_pymalloc="yes"
10108fi
10109if test "$with_pymalloc" != "no"
10110then
Martin v. Löwis11437992002-04-12 09:54:03 +000010111
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010112$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000010113
10114fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010115{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
10116$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000010117
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010118# Check for Valgrind support
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
10120$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010121
10122# Check whether --with-valgrind was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010123if test "${with_valgrind+set}" = set; then :
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010124 withval=$with_valgrind;
10125else
10126 with_valgrind=no
10127fi
10128
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010129{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
10130$as_echo "$with_valgrind" >&6; }
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010131if test "$with_valgrind" != no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010132 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 +010010133if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010134
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010135$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010136
10137else
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010138 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010139
10140fi
10141
10142
10143fi
10144
Barry Warsawef82cd72000-06-30 16:21:01 +000010145# Check for --with-wctype-functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-wctype-functions" >&5
10147$as_echo_n "checking for --with-wctype-functions... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010148
Martin v. Löwiseba40652007-08-30 20:10:57 +000010149# Check whether --with-wctype-functions was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010150if test "${with_wctype_functions+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000010151 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000010152if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000010153then
10154
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010155$as_echo "#define WANT_WCTYPE_FUNCTIONS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010156
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10158$as_echo "yes" >&6; }
10159else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10160$as_echo "no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000010161fi
10162else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010163 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10164$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010165fi
10166
Barry Warsawef82cd72000-06-30 16:21:01 +000010167
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010168# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000010169
Guido van Rossum98935bf2001-09-05 19:13:16 +000010170DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000010171
Guido van Rossume97ee181999-12-20 21:27:22 +000010172# the dlopen() function means we might want to use dynload_shlib.o. some
10173# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000010174for ac_func in dlopen
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010175do :
10176 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010177if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010178 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010179#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010180_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000010181
Guido van Rossume97ee181999-12-20 21:27:22 +000010182fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010183done
Guido van Rossume97ee181999-12-20 21:27:22 +000010184
Michael W. Hudson54241132001-12-07 15:38:26 +000010185
Guido van Rossume97ee181999-12-20 21:27:22 +000010186# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
10187# loading of modules.
10188
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
10190$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010191if test -z "$DYNLOADFILE"
10192then
10193 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000010194 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
10195 if test "$ac_cv_func_dlopen" = yes
10196 then DYNLOADFILE="dynload_shlib.o"
10197 else DYNLOADFILE="dynload_aix.o"
10198 fi
10199 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000010200 BeOS*) DYNLOADFILE="dynload_beos.o";;
10201 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Anthony Baxter82201742006-04-09 15:07:40 +000010202 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
10203 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010204 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000010205 *)
10206 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
10207 # out any dynamic loading
10208 if test "$ac_cv_func_dlopen" = yes
10209 then DYNLOADFILE="dynload_shlib.o"
10210 else DYNLOADFILE="dynload_stub.o"
10211 fi
10212 ;;
10213 esac
10214fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010215{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
10216$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010217if test "$DYNLOADFILE" != "dynload_stub.o"
10218then
Martin v. Löwis11437992002-04-12 09:54:03 +000010219
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010220$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000010221
10222fi
10223
Neil Schemenauer4e425612001-06-19 15:44:15 +000010224# MACHDEP_OBJS can be set to platform-specific object files needed by Python
10225
Michael W. Hudson54241132001-12-07 15:38:26 +000010226
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
10228$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010229if test -z "$MACHDEP_OBJS"
10230then
Jack Jansene578a632001-08-15 01:27:14 +000010231 MACHDEP_OBJS=$extra_machdep_objs
10232else
10233 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000010234fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010235{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
10236$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010237
Guido van Rossum627b2d71993-12-24 10:39:16 +000010238# checks for library functions
Martin v. Löwisaef18b12008-03-24 13:31:16 +000010239for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
10240 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Benjamin Peterson27c269a2014-12-26 11:09:00 -060010241 gai_strerror getentropy getgroups getlogin getloadavg getpeername getpgid \
10242 getpid \
Martin v. Löwis50ea4562009-11-27 13:56:01 +000010243 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Benjamin Petersond16e01c2014-02-04 10:20:26 -050010244 initgroups kill killpg lchmod lchown lstat mkfifo mknod mktime mmap \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000010245 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000010246 putenv readlink realpath \
Jesse Noller355b1262009-04-02 00:03:28 +000010247 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
10248 setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000010249 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Martin v. Löwis50ea4562009-11-27 13:56:01 +000010250 setlocale setregid setreuid setresuid setresgid \
10251 setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +000010252 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000010253 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Neal Norwitz05a45592006-03-20 06:30:08 +000010254 truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010255do :
10256 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10257ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010258if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010259 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010260#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010261_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010262
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010263fi
10264done
10265
Michael W. Hudson54241132001-12-07 15:38:26 +000010266
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010267# For some functions, having a definition is not sufficient, since
10268# we want to take their address.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010269{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
10270$as_echo_n "checking for chroot... " >&6; }
10271cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010272/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010273#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010274int
10275main ()
10276{
10277void *x=chroot
10278 ;
10279 return 0;
10280}
10281_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010282if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010283
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010284$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010285
Matthias Klosec511b472010-05-08 11:01:39 +000010286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010287$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010288else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10290$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010291
10292fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010293rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
10295$as_echo_n "checking for link... " >&6; }
10296cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010297/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010298#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010299int
10300main ()
10301{
10302void *x=link
10303 ;
10304 return 0;
10305}
10306_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010307if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010308
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010309$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010310
Matthias Klosec511b472010-05-08 11:01:39 +000010311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010312$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010313else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10315$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010316
10317fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010318rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
10320$as_echo_n "checking for symlink... " >&6; }
10321cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010322/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010323#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010324int
10325main ()
10326{
10327void *x=symlink
10328 ;
10329 return 0;
10330}
10331_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010332if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010333
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010334$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010335
Matthias Klosec511b472010-05-08 11:01:39 +000010336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010337$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010338else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10340$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010341
10342fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010343rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010344{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
10345$as_echo_n "checking for fchdir... " >&6; }
10346cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010347/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010348#include <unistd.h>
10349int
10350main ()
10351{
10352void *x=fchdir
10353 ;
10354 return 0;
10355}
10356_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010357if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010358
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010359$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010360
Matthias Klosec511b472010-05-08 11:01:39 +000010361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010362$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010363else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10365$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010366
10367fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010368rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
10370$as_echo_n "checking for fsync... " >&6; }
10371cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010372/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010373#include <unistd.h>
10374int
10375main ()
10376{
10377void *x=fsync
10378 ;
10379 return 0;
10380}
10381_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010382if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010383
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010384$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010385
Matthias Klosec511b472010-05-08 11:01:39 +000010386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010387$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010388else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10390$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010391
10392fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010393rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
10395$as_echo_n "checking for fdatasync... " >&6; }
10396cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010397/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010398#include <unistd.h>
10399int
10400main ()
10401{
10402void *x=fdatasync
10403 ;
10404 return 0;
10405}
10406_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010407if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010408
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010409$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010410
Matthias Klosec511b472010-05-08 11:01:39 +000010411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010412$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010413else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010414 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10415$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010416
10417fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010418rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
10420$as_echo_n "checking for epoll... " >&6; }
10421cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010422/* end confdefs.h. */
10423#include <sys/epoll.h>
10424int
10425main ()
10426{
10427void *x=epoll_create
10428 ;
10429 return 0;
10430}
10431_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010432if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010433
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010434$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010435
Matthias Klosec511b472010-05-08 11:01:39 +000010436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010437$as_echo "yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010438else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010439 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10440$as_echo "no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010441
10442fi
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010443rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
10445$as_echo_n "checking for kqueue... " >&6; }
10446cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010447/* end confdefs.h. */
10448
10449#include <sys/types.h>
10450#include <sys/event.h>
10451
10452int
10453main ()
10454{
10455int x=kqueue()
10456 ;
10457 return 0;
10458}
10459_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010460if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010461
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010462$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010463
Matthias Klosec511b472010-05-08 11:01:39 +000010464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010465$as_echo "yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010466else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10468$as_echo "no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010469
10470fi
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010471rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010472# On some systems (eg. FreeBSD 5), we would find a definition of the
10473# functions ctermid_r, setgroups in the library, but no prototype
10474# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
10475# address to avoid compiler warnings and potential miscompilations
10476# because of the missing prototypes.
10477
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
10479$as_echo_n "checking for ctermid_r... " >&6; }
10480cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010481/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010482
Martin v. Löwisd5843682002-11-21 20:41:28 +000010483#include <stdio.h>
10484
Martin v. Löwisd5843682002-11-21 20:41:28 +000010485int
10486main ()
10487{
10488void* p = ctermid_r
10489 ;
10490 return 0;
10491}
10492_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010493if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010494
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010495$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010496
Matthias Klosec511b472010-05-08 11:01:39 +000010497 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010498$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010499else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010500 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10501$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010502
10503fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010504rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10505
Antoine Pitroub170f172010-09-10 18:47:36 +000010506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
10507$as_echo_n "checking for flock declaration... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010508if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010509 $as_echo_n "(cached) " >&6
10510else
10511 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010512/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010513#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010514int
10515main ()
10516{
10517void* p = flock
Antoine Pitroub170f172010-09-10 18:47:36 +000010518
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010519 ;
10520 return 0;
10521}
10522_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010523if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010524 ac_cv_flock_decl=yes
10525else
10526 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010527
10528fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010529rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitrou85729812010-09-07 14:55:24 +000010530
Antoine Pitroub170f172010-09-10 18:47:36 +000010531fi
10532{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
10533$as_echo "$ac_cv_flock_decl" >&6; }
10534if test "x${ac_cv_flock_decl}" = xyes; then
10535 for ac_func in flock
10536do :
10537 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010538if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010539 cat >>confdefs.h <<_ACEOF
10540#define HAVE_FLOCK 1
Antoine Pitrou85729812010-09-07 14:55:24 +000010541_ACEOF
Antoine Pitroub170f172010-09-10 18:47:36 +000010542
Antoine Pitrou85729812010-09-07 14:55:24 +000010543else
Antoine Pitroub170f172010-09-10 18:47:36 +000010544 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitrou85729812010-09-07 14:55:24 +000010545$as_echo_n "checking for flock in -lbsd... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010546if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitrou85729812010-09-07 14:55:24 +000010547 $as_echo_n "(cached) " >&6
10548else
10549 ac_check_lib_save_LIBS=$LIBS
10550LIBS="-lbsd $LIBS"
10551cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10552/* end confdefs.h. */
10553
10554/* Override any GCC internal prototype to avoid an error.
10555 Use char because int might match the return type of a GCC
10556 builtin and then its argument prototype would still apply. */
10557#ifdef __cplusplus
10558extern "C"
10559#endif
10560char flock ();
10561int
10562main ()
10563{
10564return flock ();
10565 ;
10566 return 0;
10567}
10568_ACEOF
10569if ac_fn_c_try_link "$LINENO"; then :
10570 ac_cv_lib_bsd_flock=yes
10571else
10572 ac_cv_lib_bsd_flock=no
10573fi
10574rm -f core conftest.err conftest.$ac_objext \
10575 conftest$ac_exeext conftest.$ac_ext
10576LIBS=$ac_check_lib_save_LIBS
10577fi
10578{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
10579$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010580if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010581 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitrou85729812010-09-07 14:55:24 +000010582
10583
10584$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
10585
10586
10587fi
10588
10589
10590fi
Antoine Pitroub170f172010-09-10 18:47:36 +000010591done
10592
Antoine Pitrou85729812010-09-07 14:55:24 +000010593fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010594
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
10596$as_echo_n "checking for getpagesize... " >&6; }
10597cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010598/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010599
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010600#include <unistd.h>
10601
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010602int
10603main ()
10604{
10605void* p = getpagesize
10606 ;
10607 return 0;
10608}
10609_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010610if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010611
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010612$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010613
Matthias Klosec511b472010-05-08 11:01:39 +000010614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010615$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010616else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10618$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010619
10620fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010621rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010622
Charles-François Natali93a11752011-11-27 13:01:35 +010010623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
10624$as_echo_n "checking for broken unsetenv... " >&6; }
10625cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10626/* end confdefs.h. */
10627
10628#include <stdlib.h>
10629
10630int
10631main ()
10632{
10633int res = unsetenv("DUMMY")
10634 ;
10635 return 0;
10636}
10637_ACEOF
10638if ac_fn_c_try_compile "$LINENO"; then :
10639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10640$as_echo "no" >&6; }
10641else
10642
10643$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
10644
10645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10646$as_echo "yes" >&6; }
10647
10648fi
10649rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10650
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010651for ac_prog in true
10652do
10653 # Extract the first word of "$ac_prog", so it can be a program name with args.
10654set dummy $ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10656$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010657if ${ac_cv_prog_TRUE+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010658 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010659else
10660 if test -n "$TRUE"; then
10661 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
10662else
10663as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10664for as_dir in $PATH
10665do
10666 IFS=$as_save_IFS
10667 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010668 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +010010669 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010670 ac_cv_prog_TRUE="$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010671 $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 +000010672 break 2
10673 fi
10674done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010675 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000010676IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010677
10678fi
10679fi
10680TRUE=$ac_cv_prog_TRUE
10681if test -n "$TRUE"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
10683$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010684else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10686$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010687fi
10688
Martin v. Löwiseba40652007-08-30 20:10:57 +000010689
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010690 test -n "$TRUE" && break
10691done
10692test -n "$TRUE" || TRUE="/bin/true"
10693
10694
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
10696$as_echo_n "checking for inet_aton in -lc... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010697if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010698 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010699else
10700 ac_check_lib_save_LIBS=$LIBS
10701LIBS="-lc $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010702cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010703/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010704
Martin v. Löwiseba40652007-08-30 20:10:57 +000010705/* Override any GCC internal prototype to avoid an error.
10706 Use char because int might match the return type of a GCC
10707 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010708#ifdef __cplusplus
10709extern "C"
10710#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010711char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010712int
10713main ()
10714{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010715return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010716 ;
10717 return 0;
10718}
10719_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010720if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010721 ac_cv_lib_c_inet_aton=yes
10722else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010723 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010724fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010725rm -f core conftest.err conftest.$ac_objext \
10726 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010727LIBS=$ac_check_lib_save_LIBS
10728fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010729{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
10730$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010731if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010732 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010733else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010734 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
10735$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010736if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010737 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010738else
10739 ac_check_lib_save_LIBS=$LIBS
10740LIBS="-lresolv $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010741cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010742/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010743
Martin v. Löwiseba40652007-08-30 20:10:57 +000010744/* Override any GCC internal prototype to avoid an error.
10745 Use char because int might match the return type of a GCC
10746 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010747#ifdef __cplusplus
10748extern "C"
10749#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010750char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010751int
10752main ()
10753{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010754return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010755 ;
10756 return 0;
10757}
10758_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010759if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010760 ac_cv_lib_resolv_inet_aton=yes
10761else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010762 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010763fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010764rm -f core conftest.err conftest.$ac_objext \
10765 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010766LIBS=$ac_check_lib_save_LIBS
10767fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010768{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
10769$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010770if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010771 cat >>confdefs.h <<_ACEOF
10772#define HAVE_LIBRESOLV 1
10773_ACEOF
10774
10775 LIBS="-lresolv $LIBS"
10776
10777fi
10778
10779
10780fi
10781
10782
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010783# On Tru64, chflags seems to be present, but calling it will
10784# exit Python
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
10786$as_echo_n "checking for chflags... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010787if ${ac_cv_have_chflags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010788 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010789else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010790 if test "$cross_compiling" = yes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010791 ac_cv_have_chflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010792else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010793 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010794/* end confdefs.h. */
Ned Deily43e10542011-06-27 23:41:53 -070010795
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010796#include <sys/stat.h>
10797#include <unistd.h>
10798int main(int argc, char*argv[])
10799{
10800 if(chflags(argv[0], 0) != 0)
10801 return 1;
10802 return 0;
10803}
Ned Deily43e10542011-06-27 23:41:53 -070010804
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010805_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010806if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010807 ac_cv_have_chflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010808else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010809 ac_cv_have_chflags=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010810fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010811rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10812 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000010813fi
10814
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010815
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010816fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
10818$as_echo "$ac_cv_have_chflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000010819if test "$ac_cv_have_chflags" = cross ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010820 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010821if test "x$ac_cv_func_chflags" = xyes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010822 ac_cv_have_chflags="yes"
10823else
10824 ac_cv_have_chflags="no"
10825fi
10826
10827fi
10828if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010829
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010830$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010831
10832fi
10833
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
10835$as_echo_n "checking for lchflags... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010836if ${ac_cv_have_lchflags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010837 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010838else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010839 if test "$cross_compiling" = yes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010840 ac_cv_have_lchflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010841else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010842 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010843/* end confdefs.h. */
Ned Deily43e10542011-06-27 23:41:53 -070010844
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010845#include <sys/stat.h>
10846#include <unistd.h>
10847int main(int argc, char*argv[])
10848{
10849 if(lchflags(argv[0], 0) != 0)
10850 return 1;
10851 return 0;
10852}
Ned Deily43e10542011-06-27 23:41:53 -070010853
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010854_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010855if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010856 ac_cv_have_lchflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010857else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010858 ac_cv_have_lchflags=no
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010859fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010860rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10861 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010862fi
10863
10864
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010865fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010866{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
10867$as_echo "$ac_cv_have_lchflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000010868if test "$ac_cv_have_lchflags" = cross ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010869 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010870if test "x$ac_cv_func_lchflags" = xyes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010871 ac_cv_have_lchflags="yes"
10872else
10873 ac_cv_have_lchflags="no"
10874fi
10875
10876fi
10877if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010878
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010879$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010880
10881fi
10882
Ronald Oussorenf8752642006-07-06 10:13:35 +000010883case $ac_sys_system/$ac_sys_release in
10884Darwin/*)
10885 _CUR_CFLAGS="${CFLAGS}"
10886 _CUR_LDFLAGS="${LDFLAGS}"
10887 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
10888 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
10889 ;;
10890esac
10891
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
10893$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010894if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010895 $as_echo_n "(cached) " >&6
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010896else
10897 ac_check_lib_save_LIBS=$LIBS
10898LIBS="-lz $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010899cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010900/* end confdefs.h. */
10901
Martin v. Löwiseba40652007-08-30 20:10:57 +000010902/* Override any GCC internal prototype to avoid an error.
10903 Use char because int might match the return type of a GCC
10904 builtin and then its argument prototype would still apply. */
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010905#ifdef __cplusplus
10906extern "C"
10907#endif
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010908char inflateCopy ();
10909int
10910main ()
10911{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010912return inflateCopy ();
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010913 ;
10914 return 0;
10915}
10916_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010917if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010918 ac_cv_lib_z_inflateCopy=yes
10919else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010920 ac_cv_lib_z_inflateCopy=no
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010921fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010922rm -f core conftest.err conftest.$ac_objext \
10923 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010924LIBS=$ac_check_lib_save_LIBS
10925fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010926{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
10927$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010928if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010929
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010930$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010931
10932fi
10933
10934
Ronald Oussorenf8752642006-07-06 10:13:35 +000010935case $ac_sys_system/$ac_sys_release in
10936Darwin/*)
10937 CFLAGS="${_CUR_CFLAGS}"
10938 LDFLAGS="${_CUR_LDFLAGS}"
10939 ;;
10940esac
10941
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
10943$as_echo_n "checking for hstrerror... " >&6; }
10944cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010945/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010946
Martin v. Löwise9416172003-05-03 10:12:45 +000010947#include <netdb.h>
10948
Martin v. Löwise9416172003-05-03 10:12:45 +000010949int
10950main ()
10951{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010952void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010953 ;
10954 return 0;
10955}
10956_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010957if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010958
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010959$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010960
Matthias Klosec511b472010-05-08 11:01:39 +000010961 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010962$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010963else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10965$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010966
10967fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010968rm -f core conftest.err conftest.$ac_objext \
10969 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010970
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
10972$as_echo_n "checking for inet_aton... " >&6; }
10973cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010974/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010975
Martin v. Löwis86d66262006-02-17 08:40:11 +000010976#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010977#include <sys/socket.h>
10978#include <netinet/in.h>
10979#include <arpa/inet.h>
10980
Martin v. Löwise9416172003-05-03 10:12:45 +000010981int
10982main ()
10983{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010984void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010985 ;
10986 return 0;
10987}
10988_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010989if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010990
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010991$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010992
Matthias Klosec511b472010-05-08 11:01:39 +000010993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010994$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010995else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10997$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010998
10999fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011000rm -f core conftest.err conftest.$ac_objext \
11001 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011002
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
11004$as_echo_n "checking for inet_pton... " >&6; }
11005cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011006/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011007
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011008#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011009#include <sys/socket.h>
11010#include <netinet/in.h>
11011#include <arpa/inet.h>
11012
Martin v. Löwise9416172003-05-03 10:12:45 +000011013int
11014main ()
11015{
11016void* p = inet_pton
11017 ;
11018 return 0;
11019}
11020_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011021if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011022
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011023$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011024
Matthias Klosec511b472010-05-08 11:01:39 +000011025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011026$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011027else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11029$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011030
11031fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011032rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000011033
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011034# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
11036$as_echo_n "checking for setgroups... " >&6; }
11037cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011038/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011039
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011040#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011041#ifdef HAVE_GRP_H
11042#include <grp.h>
11043#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000011044
Martin v. Löwisd5843682002-11-21 20:41:28 +000011045int
11046main ()
11047{
11048void* p = setgroups
11049 ;
11050 return 0;
11051}
11052_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011053if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011054
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011055$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011056
Matthias Klosec511b472010-05-08 11:01:39 +000011057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011058$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011059else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11061$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011062
11063fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011064rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000011065
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011066# check for openpty and forkpty
11067
11068for ac_func in openpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011069do :
11070 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011071if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011072 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011073#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011074_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011075
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011076else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011077 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
11078$as_echo_n "checking for openpty in -lutil... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011079if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011080 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011081else
Martin v. Löwis11437992002-04-12 09:54:03 +000011082 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011083LIBS="-lutil $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011084cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011085/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011086
Martin v. Löwiseba40652007-08-30 20:10:57 +000011087/* Override any GCC internal prototype to avoid an error.
11088 Use char because int might match the return type of a GCC
11089 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011090#ifdef __cplusplus
11091extern "C"
11092#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011093char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011094int
11095main ()
11096{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011097return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011098 ;
11099 return 0;
11100}
11101_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011102if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011103 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011104else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011105 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011106fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011107rm -f core conftest.err conftest.$ac_objext \
11108 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011109LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011110fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011111{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
11112$as_echo "$ac_cv_lib_util_openpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011113if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011114 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011115 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011116else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011117 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
11118$as_echo_n "checking for openpty in -lbsd... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011119if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011120 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011121else
11122 ac_check_lib_save_LIBS=$LIBS
11123LIBS="-lbsd $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011124cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011125/* end confdefs.h. */
11126
Martin v. Löwiseba40652007-08-30 20:10:57 +000011127/* Override any GCC internal prototype to avoid an error.
11128 Use char because int might match the return type of a GCC
11129 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011130#ifdef __cplusplus
11131extern "C"
11132#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011133char openpty ();
11134int
11135main ()
11136{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011137return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011138 ;
11139 return 0;
11140}
11141_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011142if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011143 ac_cv_lib_bsd_openpty=yes
11144else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011145 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011146fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011147rm -f core conftest.err conftest.$ac_objext \
11148 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011149LIBS=$ac_check_lib_save_LIBS
11150fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011151{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
11152$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011153if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011154 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011155 LIBS="$LIBS -lbsd"
11156fi
11157
11158
11159fi
11160
Fred Drake8cef4cf2000-06-28 16:40:38 +000011161
11162fi
11163done
11164
11165for ac_func in forkpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011166do :
11167 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011168if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011169 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011170#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011171_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011172
Fred Drake8cef4cf2000-06-28 16:40:38 +000011173else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011174 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
11175$as_echo_n "checking for forkpty in -lutil... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011176if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011177 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011178else
Martin v. Löwis11437992002-04-12 09:54:03 +000011179 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011180LIBS="-lutil $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011181cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011182/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011183
Martin v. Löwiseba40652007-08-30 20:10:57 +000011184/* Override any GCC internal prototype to avoid an error.
11185 Use char because int might match the return type of a GCC
11186 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011187#ifdef __cplusplus
11188extern "C"
11189#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011190char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011191int
11192main ()
11193{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011194return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011195 ;
11196 return 0;
11197}
11198_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011199if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011200 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011201else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011202 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011203fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011204rm -f core conftest.err conftest.$ac_objext \
11205 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011206LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011207fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011208{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
11209$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011210if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011211 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011212 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011213else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011214 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
11215$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011216if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011217 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011218else
11219 ac_check_lib_save_LIBS=$LIBS
11220LIBS="-lbsd $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011221cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011222/* end confdefs.h. */
11223
Martin v. Löwiseba40652007-08-30 20:10:57 +000011224/* Override any GCC internal prototype to avoid an error.
11225 Use char because int might match the return type of a GCC
11226 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011227#ifdef __cplusplus
11228extern "C"
11229#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011230char forkpty ();
11231int
11232main ()
11233{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011234return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011235 ;
11236 return 0;
11237}
11238_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011239if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011240 ac_cv_lib_bsd_forkpty=yes
11241else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011242 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011243fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011244rm -f core conftest.err conftest.$ac_objext \
11245 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011246LIBS=$ac_check_lib_save_LIBS
11247fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011248{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
11249$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011250if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011251 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011252 LIBS="$LIBS -lbsd"
11253fi
11254
11255
11256fi
11257
Fred Drake8cef4cf2000-06-28 16:40:38 +000011258
11259fi
11260done
11261
Jack Jansendd19cf82001-12-06 22:36:17 +000011262
Brett Cannonaa5778d2008-03-18 04:09:00 +000011263# Stuff for expat.
Brett Cannonaa5778d2008-03-18 04:09:00 +000011264for ac_func in memmove
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011265do :
11266 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011267if test "x$ac_cv_func_memmove" = xyes; then :
Brett Cannonaa5778d2008-03-18 04:09:00 +000011268 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011269#define HAVE_MEMMOVE 1
Brett Cannonaa5778d2008-03-18 04:09:00 +000011270_ACEOF
11271
11272fi
11273done
11274
11275
Michael W. Hudson54241132001-12-07 15:38:26 +000011276# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000011277for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011278do :
11279 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11280ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011281if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011282 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011283#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011284_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000011285
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011286fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000011287done
11288
Michael W. Hudson54241132001-12-07 15:38:26 +000011289
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011290ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011291if test "x$ac_cv_func_dup2" = xyes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011292 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000011293
Martin v. Löwis1142de32002-03-29 16:28:31 +000011294else
Martin v. Löwiseba40652007-08-30 20:10:57 +000011295 case " $LIBOBJS " in
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011296 *" dup2.$ac_objext "* ) ;;
11297 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Martin v. Löwiseba40652007-08-30 20:10:57 +000011298 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011299esac
11300
Martin v. Löwis1142de32002-03-29 16:28:31 +000011301fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011302
11303ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011304if test "x$ac_cv_func_getcwd" = xyes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011305 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
11306
11307else
11308 case " $LIBOBJS " in
11309 *" getcwd.$ac_objext "* ) ;;
11310 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
11311 ;;
11312esac
11313
11314fi
11315
11316ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011317if test "x$ac_cv_func_strdup" = xyes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011318 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
11319
11320else
11321 case " $LIBOBJS " in
11322 *" strdup.$ac_objext "* ) ;;
11323 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
11324 ;;
11325esac
11326
11327fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000011328
11329
11330for ac_func in getpgrp
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011331do :
11332 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011333if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011334 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011335#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011336_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011337 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011338/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011339#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011340int
11341main ()
11342{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011343getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011344 ;
11345 return 0;
11346}
11347_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011348if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011349
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011350$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011351
Guido van Rossum627b2d71993-12-24 10:39:16 +000011352fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011353rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011354
Guido van Rossum627b2d71993-12-24 10:39:16 +000011355fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011356done
Guido van Rossum627b2d71993-12-24 10:39:16 +000011357
Jack Jansen150753c2003-03-29 22:07:47 +000011358for ac_func in setpgrp
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011359do :
11360 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011361if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000011362 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011363#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000011364_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011365 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011366/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000011367#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000011368int
11369main ()
11370{
11371setpgrp(0,0);
11372 ;
11373 return 0;
11374}
11375_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011376if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011377
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011378$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011379
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011380fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011381rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000011382
11383fi
11384done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011385
Thomas Wouters3a584202000-08-05 23:28:51 +000011386for ac_func in gettimeofday
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011387do :
11388 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011389if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011390 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011391#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011392_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011393 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011394/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011395#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011396int
11397main ()
11398{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011399gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011400 ;
11401 return 0;
11402}
11403_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011404if ac_fn_c_try_compile "$LINENO"; then :
11405
Guido van Rossum627b2d71993-12-24 10:39:16 +000011406else
Skip Montanaro6dead952003-09-25 14:50:04 +000011407
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011408$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011409
Martin v. Löwis11437992002-04-12 09:54:03 +000011410
Guido van Rossum627b2d71993-12-24 10:39:16 +000011411fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011412rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011413
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011414fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011415done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011416
Michael W. Hudson54241132001-12-07 15:38:26 +000011417
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
11419$as_echo_n "checking for major... " >&6; }
11420cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011421/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011422
Neal Norwitz6eb37f02003-02-23 23:28:15 +000011423#if defined(MAJOR_IN_MKDEV)
11424#include <sys/mkdev.h>
11425#elif defined(MAJOR_IN_SYSMACROS)
11426#include <sys/sysmacros.h>
11427#else
11428#include <sys/types.h>
11429#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011430
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011431int
11432main ()
11433{
11434
11435 makedev(major(0),minor(0));
11436
11437 ;
11438 return 0;
11439}
11440_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011441if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011442
11443
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011444$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011445
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11447$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011448
11449else
Skip Montanaro6dead952003-09-25 14:50:04 +000011450
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011451 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11452$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011453
11454fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011455rm -f core conftest.err conftest.$ac_objext \
11456 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011457
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011458# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000011459# for [no]getaddrinfo in netdb.h.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011460{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
11461$as_echo_n "checking for getaddrinfo... " >&6; }
11462cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011463/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011464
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011465#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011466#include <sys/socket.h>
11467#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011468#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011469
Martin v. Löwis11437992002-04-12 09:54:03 +000011470int
11471main ()
11472{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011473getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000011474 ;
11475 return 0;
11476}
11477_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011478if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011479 have_getaddrinfo=yes
11480else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011481 have_getaddrinfo=no
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011482fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011483rm -f core conftest.err conftest.$ac_objext \
11484 conftest$ac_exeext conftest.$ac_ext
11485{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
11486$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011487if test $have_getaddrinfo = yes
11488then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011489 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
11490$as_echo_n "checking getaddrinfo bug... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011491 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011492 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011493else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011494 if test "$cross_compiling" = yes; then :
doko@python.orgd65e2ba2013-01-31 23:52:03 +010011495
11496if test "${enable_ipv6+set}" = set; then
11497 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
11498else
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011499 ac_cv_buggy_getaddrinfo=yes
doko@python.orgd65e2ba2013-01-31 23:52:03 +010011500fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011501else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011502 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011503/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011504
Stefan Krah0afe4e42012-11-22 23:56:51 +010011505#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011506#include <sys/types.h>
11507#include <netdb.h>
11508#include <string.h>
11509#include <sys/socket.h>
11510#include <netinet/in.h>
11511
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011512int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011513{
11514 int passive, gaierr, inet4 = 0, inet6 = 0;
11515 struct addrinfo hints, *ai, *aitop;
11516 char straddr[INET6_ADDRSTRLEN], strport[16];
11517
11518 for (passive = 0; passive <= 1; passive++) {
11519 memset(&hints, 0, sizeof(hints));
11520 hints.ai_family = AF_UNSPEC;
11521 hints.ai_flags = passive ? AI_PASSIVE : 0;
11522 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000011523 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011524 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
11525 (void)gai_strerror(gaierr);
11526 goto bad;
11527 }
11528 for (ai = aitop; ai; ai = ai->ai_next) {
11529 if (ai->ai_addr == NULL ||
11530 ai->ai_addrlen == 0 ||
11531 getnameinfo(ai->ai_addr, ai->ai_addrlen,
11532 straddr, sizeof(straddr), strport, sizeof(strport),
11533 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
11534 goto bad;
11535 }
11536 switch (ai->ai_family) {
11537 case AF_INET:
11538 if (strcmp(strport, "54321") != 0) {
11539 goto bad;
11540 }
11541 if (passive) {
11542 if (strcmp(straddr, "0.0.0.0") != 0) {
11543 goto bad;
11544 }
11545 } else {
11546 if (strcmp(straddr, "127.0.0.1") != 0) {
11547 goto bad;
11548 }
11549 }
11550 inet4++;
11551 break;
11552 case AF_INET6:
11553 if (strcmp(strport, "54321") != 0) {
11554 goto bad;
11555 }
11556 if (passive) {
11557 if (strcmp(straddr, "::") != 0) {
11558 goto bad;
11559 }
11560 } else {
11561 if (strcmp(straddr, "::1") != 0) {
11562 goto bad;
11563 }
11564 }
11565 inet6++;
11566 break;
11567 case AF_UNSPEC:
11568 goto bad;
11569 break;
11570 default:
11571 /* another family support? */
11572 break;
11573 }
11574 }
11575 }
11576
11577 if (!(inet4 == 0 || inet4 == 2))
11578 goto bad;
11579 if (!(inet6 == 0 || inet6 == 2))
11580 goto bad;
11581
11582 if (aitop)
11583 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011584 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011585
11586 bad:
11587 if (aitop)
11588 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011589 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011590}
11591
Martin v. Löwis11437992002-04-12 09:54:03 +000011592_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011593if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011594 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011595else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011596 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011597fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011598rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11599 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011600fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011601
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011602fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011603
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011604fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011605
Benjamin Peterson75fed812010-11-01 01:47:19 +000011606{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
11607$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
11608
Mark Dickinson0ef0b912009-12-31 21:11:48 +000011609if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011610then
11611 if test $ipv6 = yes
11612 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011613 echo 'Fatal: You must get working getaddrinfo() function.'
11614 echo ' or you can specify "--disable-ipv6"'.
11615 exit 1
11616 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011617else
Martin v. Löwis11437992002-04-12 09:54:03 +000011618
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011619$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011620
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011621fi
Benjamin Peterson75fed812010-11-01 01:47:19 +000011622
Jack Jansen9a66b6d2001-08-08 13:56:14 +000011623for ac_func in getnameinfo
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011624do :
11625 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011626if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011627 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011628#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011629_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011630
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011631fi
11632done
11633
Michael W. Hudson54241132001-12-07 15:38:26 +000011634
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011635# checks for structures
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
11637$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011638if ${ac_cv_header_time+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011639 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011640else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011641 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011642/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011643#include <sys/types.h>
11644#include <sys/time.h>
11645#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011646
Martin v. Löwis11437992002-04-12 09:54:03 +000011647int
11648main ()
11649{
11650if ((struct tm *) 0)
11651return 0;
11652 ;
11653 return 0;
11654}
11655_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011656if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011657 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011658else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011659 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011660fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011661rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011662fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011663{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
11664$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011665if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011666
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011667$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011668
11669fi
11670
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
11672$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011673if ${ac_cv_struct_tm+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011674 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011675else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011676 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011677/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011678#include <sys/types.h>
11679#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011680
Martin v. Löwis11437992002-04-12 09:54:03 +000011681int
11682main ()
11683{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011684struct tm tm;
11685 int *p = &tm.tm_sec;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011686 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000011687 ;
11688 return 0;
11689}
11690_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011691if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011692 ac_cv_struct_tm=time.h
11693else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011694 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011695fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011696rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011697fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011698{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
11699$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011700if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011701
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011702$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011703
11704fi
11705
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011706ac_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 +000011707#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000011708
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011709"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011710if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011711
11712cat >>confdefs.h <<_ACEOF
11713#define HAVE_STRUCT_TM_TM_ZONE 1
11714_ACEOF
11715
11716
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011717fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011718
Martin v. Löwis11437992002-04-12 09:54:03 +000011719if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
11720
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011721$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011722
11723else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011724 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
11725"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011726if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011727 ac_have_decl=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000011728else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011729 ac_have_decl=0
Martin v. Löwiseba40652007-08-30 20:10:57 +000011730fi
11731
Martin v. Löwiseba40652007-08-30 20:10:57 +000011732cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011733#define HAVE_DECL_TZNAME $ac_have_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +000011734_ACEOF
11735
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011736 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
11737$as_echo_n "checking for tzname... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011738if ${ac_cv_var_tzname+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011739 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000011740else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011741 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011742/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011743#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000011744#if !HAVE_DECL_TZNAME
11745extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000011746#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011747
Martin v. Löwis11437992002-04-12 09:54:03 +000011748int
11749main ()
11750{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011751return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000011752 ;
11753 return 0;
11754}
11755_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011756if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011757 ac_cv_var_tzname=yes
11758else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011759 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011760fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011761rm -f core conftest.err conftest.$ac_objext \
11762 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000011763fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011764{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
11765$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011766 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011767
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011768$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011769
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011770 fi
11771fi
11772
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011773ac_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 +010011774if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011775
11776cat >>confdefs.h <<_ACEOF
11777#define HAVE_STRUCT_STAT_ST_RDEV 1
11778_ACEOF
11779
11780
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011781fi
11782
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011783ac_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 +010011784if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011785
Martin v. Löwis11437992002-04-12 09:54:03 +000011786cat >>confdefs.h <<_ACEOF
11787#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
11788_ACEOF
11789
11790
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011791fi
11792
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011793ac_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 +010011794if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000011795
11796cat >>confdefs.h <<_ACEOF
11797#define HAVE_STRUCT_STAT_ST_FLAGS 1
11798_ACEOF
11799
11800
11801fi
11802
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011803ac_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 +010011804if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011805
11806cat >>confdefs.h <<_ACEOF
11807#define HAVE_STRUCT_STAT_ST_GEN 1
11808_ACEOF
11809
11810
11811fi
11812
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011813ac_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 +010011814if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011815
11816cat >>confdefs.h <<_ACEOF
11817#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
11818_ACEOF
11819
11820
11821fi
11822
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011823ac_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 +010011824if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011825
Martin v. Löwis11437992002-04-12 09:54:03 +000011826cat >>confdefs.h <<_ACEOF
11827#define HAVE_STRUCT_STAT_ST_BLOCKS 1
11828_ACEOF
11829
11830
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011831$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011832
11833else
Martin v. Löwiseba40652007-08-30 20:10:57 +000011834 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000011835 *" fileblocks.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011836 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
11837 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011838esac
11839
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011840fi
11841
Michael W. Hudson54241132001-12-07 15:38:26 +000011842
Martin v. Löwis11437992002-04-12 09:54:03 +000011843
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
11845$as_echo_n "checking for time.h that defines altzone... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011846if ${ac_cv_header_time_altzone+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011847 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011848else
Matthias Klosec511b472010-05-08 11:01:39 +000011849
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011850 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011851/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011852#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011853int
11854main ()
11855{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011856return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000011857 ;
11858 return 0;
11859}
11860_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011861if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011862 ac_cv_header_time_altzone=yes
11863else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011864 ac_cv_header_time_altzone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011865fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011866rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosec511b472010-05-08 11:01:39 +000011867
Martin v. Löwiseba40652007-08-30 20:10:57 +000011868fi
11869
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011870{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
11871$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011872if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011873
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011874$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011875
11876fi
11877
Guido van Rossumda88dad1995-01-26 00:46:29 +000011878was_it_defined=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
11880$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
11881cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011882/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011883
11884#include <sys/types.h>
11885#include <sys/select.h>
11886#include <sys/time.h>
11887
Martin v. Löwis11437992002-04-12 09:54:03 +000011888int
11889main ()
11890{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011891;
Martin v. Löwis11437992002-04-12 09:54:03 +000011892 ;
11893 return 0;
11894}
11895_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011896if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011897
11898
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011899$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011900
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011901 was_it_defined=yes
11902
Martin v. Löwiseba40652007-08-30 20:10:57 +000011903fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011904rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011905{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
11906$as_echo "$was_it_defined" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011907
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
11909$as_echo_n "checking for addrinfo... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011910if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011911 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011912else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011913 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011914/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +000011915#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011916int
11917main ()
11918{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011919struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000011920 ;
11921 return 0;
11922}
11923_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011924if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011925 ac_cv_struct_addrinfo=yes
11926else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011927 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011928fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011929rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11930fi
11931
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011932{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
11933$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011934if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011935
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011936$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011937
11938fi
11939
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
11941$as_echo_n "checking for sockaddr_storage... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011942if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011943 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011944else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011945 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011946/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011947
11948# include <sys/types.h>
11949# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011950int
11951main ()
11952{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011953struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000011954 ;
11955 return 0;
11956}
11957_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011958if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011959 ac_cv_struct_sockaddr_storage=yes
11960else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011961 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011962fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011963rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11964fi
11965
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011966{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
11967$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011968if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011969
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011970$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011971
11972fi
11973
Guido van Rossum627b2d71993-12-24 10:39:16 +000011974# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000011975
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
11977$as_echo_n "checking whether char is unsigned... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011978if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011979 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000011980else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011981 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011982/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011983$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000011984int
11985main ()
11986{
11987static int test_array [1 - 2 * !(((char) -1) < 0)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +010011988test_array [0] = 0;
11989return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000011990
11991 ;
11992 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000011993}
Martin v. Löwis11437992002-04-12 09:54:03 +000011994_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011995if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000011996 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011997else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011998 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011999fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012000rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012001fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012002{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
12003$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012004if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012005 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012006
12007fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000012008
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12010$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012011if ${ac_cv_c_const+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012012 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012013else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012014 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012015/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012016
Martin v. Löwis11437992002-04-12 09:54:03 +000012017int
12018main ()
12019{
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012020
Martin v. Löwis11437992002-04-12 09:54:03 +000012021#ifndef __cplusplus
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012022 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012023 typedef int charset[2];
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012024 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000012025 /* SunOS 4.1.1 cc rejects this. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000012026 char const *const *pcpcc;
12027 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000012028 /* NEC SVR4.0.2 mips cc rejects this. */
12029 struct point {int x, y;};
12030 static struct point const zero = {0,0};
12031 /* AIX XL C 1.02.0.0 rejects this.
12032 It does not let you subtract one const X* pointer from another in
12033 an arm of an if-expression whose if-part is not a constant
12034 expression */
12035 const char *g = "string";
Martin v. Löwiseba40652007-08-30 20:10:57 +000012036 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012037 /* HPUX 7.0 cc rejects these. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000012038 ++pcpcc;
12039 ppc = (char**) pcpcc;
12040 pcpcc = (char const *const *) ppc;
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012041 { /* SCO 3.2v4 cc rejects this sort of thing. */
12042 char tx;
12043 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000012044 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012045
Martin v. Löwis11437992002-04-12 09:54:03 +000012046 *t++ = 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012047 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012048 }
12049 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12050 int x[] = {25, 17};
12051 const int *foo = &x[0];
12052 ++foo;
12053 }
12054 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12055 typedef const int *iptr;
12056 iptr p = 0;
12057 ++p;
12058 }
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012059 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000012060 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012061 struct s { int j; const int *ap[3]; } bx;
12062 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000012063 }
12064 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12065 const int foo = 10;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012066 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012067 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012068 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000012069#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000012070
Martin v. Löwis11437992002-04-12 09:54:03 +000012071 ;
12072 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012073}
Martin v. Löwis11437992002-04-12 09:54:03 +000012074_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012075if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012076 ac_cv_c_const=yes
12077else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012078 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012079fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012080rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012081fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012082{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12083$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012084if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012085
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012086$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012087
12088fi
12089
Michael W. Hudson54241132001-12-07 15:38:26 +000012090
Guido van Rossumda88dad1995-01-26 00:46:29 +000012091works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
12093$as_echo_n "checking for working volatile... " >&6; }
12094cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012095/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012096
Martin v. Löwis11437992002-04-12 09:54:03 +000012097int
12098main ()
12099{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012100volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012101 ;
12102 return 0;
12103}
12104_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012105if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012106 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012107else
Skip Montanaro6dead952003-09-25 14:50:04 +000012108
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012109$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012110
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012111
Guido van Rossum627b2d71993-12-24 10:39:16 +000012112fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012113rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012114{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12115$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012116
Guido van Rossumda88dad1995-01-26 00:46:29 +000012117works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
12119$as_echo_n "checking for working signed char... " >&6; }
12120cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012121/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012122
Martin v. Löwis11437992002-04-12 09:54:03 +000012123int
12124main ()
12125{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012126signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000012127 ;
12128 return 0;
12129}
12130_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012131if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012132 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012133else
Skip Montanaro6dead952003-09-25 14:50:04 +000012134
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012135$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000012136
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012137
Guido van Rossum7f43da71994-08-01 12:15:30 +000012138fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012139rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012140{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12141$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012142
Guido van Rossumda88dad1995-01-26 00:46:29 +000012143have_prototypes=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
12145$as_echo_n "checking for prototypes... " >&6; }
12146cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012147/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012148int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012149int
12150main ()
12151{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012152return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000012153 ;
12154 return 0;
12155}
12156_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012157if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012158
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012159$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012160
Matthias Klosec511b472010-05-08 11:01:39 +000012161 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012162fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012163rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012164{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
12165$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012166
Guido van Rossumda88dad1995-01-26 00:46:29 +000012167works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
12169$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
12170cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012171/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012172
12173#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000012174int foo(int x, ...) {
12175 va_list va;
12176 va_start(va, x);
12177 va_arg(va, int);
12178 va_arg(va, char *);
12179 va_arg(va, double);
12180 return 0;
12181}
Guido van Rossum7f43da71994-08-01 12:15:30 +000012182
Martin v. Löwis11437992002-04-12 09:54:03 +000012183int
12184main ()
12185{
Guido van Rossum90eea071996-08-30 20:58:57 +000012186return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000012187 ;
12188 return 0;
12189}
12190_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012191if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012192
12193
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012194$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012195
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012196 works=yes
12197
Guido van Rossum627b2d71993-12-24 10:39:16 +000012198fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012199rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012200{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12201$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012202
Martin v. Löwisd6320502004-08-12 13:45:08 +000012203# check for socketpair
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
12205$as_echo_n "checking for socketpair... " >&6; }
12206cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012207/* end confdefs.h. */
12208
12209#include <sys/types.h>
12210#include <sys/socket.h>
12211
12212int
12213main ()
12214{
12215void *x=socketpair
12216 ;
12217 return 0;
12218}
12219_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012220if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000012221
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012222$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000012223
Matthias Klosec511b472010-05-08 11:01:39 +000012224 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012225$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012226else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12228$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012229
12230fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012231rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012232
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012233# check if sockaddr has sa_len member
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012234{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
12235$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
12236cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012237/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012238#include <sys/types.h>
12239#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012240int
12241main ()
12242{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012243struct sockaddr x;
12244x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012245 ;
12246 return 0;
12247}
12248_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012249if ac_fn_c_try_compile "$LINENO"; then :
12250 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12251$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012252
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012253$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012254
12255else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012256 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12257$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000012258
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012259fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012260rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012261
Guido van Rossumda88dad1995-01-26 00:46:29 +000012262va_list_is_array=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012263{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
12264$as_echo_n "checking whether va_list is an array... " >&6; }
12265cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012266/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012267
12268#ifdef HAVE_STDARG_PROTOTYPES
12269#include <stdarg.h>
12270#else
12271#include <varargs.h>
12272#endif
12273
Martin v. Löwis11437992002-04-12 09:54:03 +000012274int
12275main ()
12276{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012277va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000012278 ;
12279 return 0;
12280}
12281_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012282if ac_fn_c_try_compile "$LINENO"; then :
12283
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012284else
Skip Montanaro6dead952003-09-25 14:50:04 +000012285
Martin v. Löwis11437992002-04-12 09:54:03 +000012286
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012287$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012288
Guido van Rossumda88dad1995-01-26 00:46:29 +000012289 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012290
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012291fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012292rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012293{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
12294$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012295
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012296# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000012297
12298
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012299ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012300if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012301
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012302 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000012303
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012304 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
12305$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012306 OLD_CFLAGS=$CFLAGS
12307 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012308 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012309/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012310
12311# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012312
Martin v. Löwis11437992002-04-12 09:54:03 +000012313int
12314main ()
12315{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012316
12317 char *name;
12318 struct hostent *he, *res;
12319 char buffer[2048];
12320 int buflen = 2048;
12321 int h_errnop;
12322
12323 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012324
12325 ;
12326 return 0;
12327}
12328_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012329if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012330
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012331 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012332
Martin v. Löwis11437992002-04-12 09:54:03 +000012333
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012334$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012335
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12337$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012338
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012339else
Skip Montanaro6dead952003-09-25 14:50:04 +000012340
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12342$as_echo "no" >&6; }
12343 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
12344$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
12345 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012346/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012347
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012348# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012349
Martin v. Löwis11437992002-04-12 09:54:03 +000012350int
12351main ()
12352{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012353
12354 char *name;
12355 struct hostent *he;
Matthias Klosec511b472010-05-08 11:01:39 +000012356 char buffer[2048];
12357 int buflen = 2048;
12358 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012359
Matthias Klosec511b472010-05-08 11:01:39 +000012360 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012361
12362 ;
12363 return 0;
12364}
12365_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012366if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012367
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012368 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012369
Martin v. Löwis11437992002-04-12 09:54:03 +000012370
Matthias Klosec511b472010-05-08 11:01:39 +000012371$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012372
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12374$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012375
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012376else
Skip Montanaro6dead952003-09-25 14:50:04 +000012377
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12379$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000012380 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
12381$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
12382 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12383/* end confdefs.h. */
12384
12385# include <netdb.h>
12386
12387int
12388main ()
12389{
12390
12391 char *name;
12392 struct hostent *he;
12393 struct hostent_data data;
12394
12395 (void) gethostbyname_r(name, he, &data);
12396
12397 ;
12398 return 0;
12399}
12400_ACEOF
12401if ac_fn_c_try_compile "$LINENO"; then :
12402
12403 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
12404
12405
12406$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
12407
12408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12409$as_echo "yes" >&6; }
12410
12411else
12412
12413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12414$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012415
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012416fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012417rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012418
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012419fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012420rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012421
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012422fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012423rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012424 CFLAGS=$OLD_CFLAGS
12425
12426else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012427
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012428 for ac_func in gethostbyname
12429do :
12430 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012431if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012432 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012433#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012434_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012435
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012436fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012437done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012438
Michael W. Hudson54241132001-12-07 15:38:26 +000012439
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012440fi
12441
Michael W. Hudson54241132001-12-07 15:38:26 +000012442
12443
12444
12445
12446
12447
Guido van Rossum627b2d71993-12-24 10:39:16 +000012448# checks for system services
12449# (none yet)
12450
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012451# Linux requires this for correct f.p. operations
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012452ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012453if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012454
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012455else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012456 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
12457$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012458if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012459 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012460else
Martin v. Löwis11437992002-04-12 09:54:03 +000012461 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012462LIBS="-lieee $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012463cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012464/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012465
Martin v. Löwiseba40652007-08-30 20:10:57 +000012466/* Override any GCC internal prototype to avoid an error.
12467 Use char because int might match the return type of a GCC
12468 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012469#ifdef __cplusplus
12470extern "C"
12471#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012472char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012473int
12474main ()
12475{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012476return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012477 ;
12478 return 0;
12479}
12480_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012481if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012482 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012483else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012484 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012485fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012486rm -f core conftest.err conftest.$ac_objext \
12487 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012488LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012489fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012490{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
12491$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012492if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012493 cat >>confdefs.h <<_ACEOF
12494#define HAVE_LIBIEEE 1
12495_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012496
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012497 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012498
Guido van Rossum627b2d71993-12-24 10:39:16 +000012499fi
12500
Michael W. Hudson54241132001-12-07 15:38:26 +000012501
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012502fi
12503
Michael W. Hudson54241132001-12-07 15:38:26 +000012504
Guido van Rossum7f253911997-05-09 02:42:48 +000012505# Check for --with-fpectl
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
12507$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012508
Martin v. Löwiseba40652007-08-30 20:10:57 +000012509# Check whether --with-fpectl was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012510if test "${with_fpectl+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000012511 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000012512if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000012513then
12514
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012515$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012516
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12518$as_echo "yes" >&6; }
12519else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12520$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012521fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000012522else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12524$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012525fi
12526
Guido van Rossum7f253911997-05-09 02:42:48 +000012527
Guido van Rossum7f43da71994-08-01 12:15:30 +000012528# check for --with-libm=...
12529
Guido van Rossum563e7081996-09-10 18:20:48 +000012530case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000012531Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012532BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000012533*) LIBM=-lm
12534esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
12536$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012537
Martin v. Löwiseba40652007-08-30 20:10:57 +000012538# Check whether --with-libm was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012539if test "${with_libm+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000012540 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000012541if test "$withval" = no
12542then LIBM=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012543 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
12544$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012545elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012546then LIBM=$withval
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
12548$as_echo "set LIBM=\"$withval\"" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012549else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012550fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012551else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
12553$as_echo "default LIBM=\"$LIBM\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012554fi
12555
Guido van Rossum7f43da71994-08-01 12:15:30 +000012556
12557# check for --with-libc=...
12558
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
12560$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012561
Martin v. Löwiseba40652007-08-30 20:10:57 +000012562# Check whether --with-libc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012563if test "${with_libc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000012564 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000012565if test "$withval" = no
12566then LIBC=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
12568$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012569elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012570then LIBC=$withval
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
12572$as_echo "set LIBC=\"$withval\"" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012573else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012574fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012575else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
12577$as_echo "default LIBC=\"$LIBC\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012578fi
12579
Guido van Rossum7f43da71994-08-01 12:15:30 +000012580
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012581# **************************************************
12582# * Check for various properties of floating point *
12583# **************************************************
Mark Dickinson265d7382008-04-21 22:32:24 +000012584
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
12586$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012587if ${ac_cv_little_endian_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012588 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012589else
12590
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012591if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012592 ac_cv_little_endian_double=no
12593else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012594 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012595/* end confdefs.h. */
12596
12597#include <string.h>
12598int main() {
12599 double x = 9006104071832581.0;
12600 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
12601 return 0;
12602 else
12603 return 1;
12604}
12605
12606_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012607if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012608 ac_cv_little_endian_double=yes
12609else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012610 ac_cv_little_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012611fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012612rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12613 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012614fi
12615
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012616fi
12617
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012618{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
12619$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012620if test "$ac_cv_little_endian_double" = yes
12621then
12622
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012623$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012624
12625fi
12626
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
12628$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012629if ${ac_cv_big_endian_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012630 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012631else
12632
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012633if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012634 ac_cv_big_endian_double=no
12635else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012636 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012637/* end confdefs.h. */
12638
12639#include <string.h>
12640int main() {
12641 double x = 9006104071832581.0;
12642 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
12643 return 0;
12644 else
12645 return 1;
12646}
12647
12648_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012649if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012650 ac_cv_big_endian_double=yes
12651else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012652 ac_cv_big_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012653fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012654rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12655 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012656fi
12657
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012658fi
12659
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012660{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
12661$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012662if test "$ac_cv_big_endian_double" = yes
12663then
12664
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012665$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012666
12667fi
12668
12669# Some ARM platforms use a mixed-endian representation for doubles.
12670# While Python doesn't currently have full support for these platforms
12671# (see e.g., issue 1762561), we can at least make sure that float <-> string
12672# conversions work.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
12674$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012675if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012676 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012677else
12678
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012679if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012680 ac_cv_mixed_endian_double=no
12681else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012682 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012683/* end confdefs.h. */
12684
12685#include <string.h>
12686int main() {
12687 double x = 9006104071832581.0;
12688 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
12689 return 0;
12690 else
12691 return 1;
12692}
12693
12694_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012695if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012696 ac_cv_mixed_endian_double=yes
12697else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012698 ac_cv_mixed_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012699fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012700rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12701 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012702fi
12703
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012704fi
12705
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012706{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
12707$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012708if test "$ac_cv_mixed_endian_double" = yes
12709then
12710
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012711$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012712
12713fi
12714
12715# The short float repr introduced in Python 3.1 requires the
12716# correctly-rounded string <-> double conversion functions from
12717# Python/dtoa.c, which in turn require that the FPU uses 53-bit
12718# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsona548dee2009-11-15 13:12:43 +000012719# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012720# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsona548dee2009-11-15 13:12:43 +000012721
12722# This inline assembler syntax may also work for suncc and icc,
12723# so we try it on all platforms.
12724
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
12726$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
12727cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012728/* end confdefs.h. */
12729
12730int
12731main ()
12732{
12733
Mark Dickinsona548dee2009-11-15 13:12:43 +000012734 unsigned short cw;
12735 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
12736 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012737
12738 ;
12739 return 0;
12740}
12741_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012742if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012743 have_gcc_asm_for_x87=yes
12744else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012745 have_gcc_asm_for_x87=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012746fi
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012747rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012748{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
12749$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsona548dee2009-11-15 13:12:43 +000012750if test "$have_gcc_asm_for_x87" = yes
12751then
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012752
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012753$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012754
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012755fi
Mark Dickinson7a3d8642008-04-22 00:54:27 +000012756
Mark Dickinson04b27232009-01-04 12:29:36 +000012757# Detect whether system arithmetic is subject to x87-style double
12758# rounding issues. The result of this test has little meaning on non
12759# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
12760# mode is round-to-nearest and double rounding issues are present, and
12761# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
12763$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinson99abd142009-10-24 13:44:16 +000012764# $BASECFLAGS may affect the result
12765ac_save_cc="$CC"
12766CC="$CC $BASECFLAGS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012767if test "$cross_compiling" = yes; then :
Mark Dickinson04b27232009-01-04 12:29:36 +000012768 ac_cv_x87_double_rounding=no
12769else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012770 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson04b27232009-01-04 12:29:36 +000012771/* end confdefs.h. */
12772
12773#include <stdlib.h>
12774#include <math.h>
12775int main() {
12776 volatile double x, y, z;
12777 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
12778 x = 0.99999999999999989; /* 1-2**-53 */
12779 y = 1./x;
12780 if (y != 1.)
12781 exit(0);
12782 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
12783 x = 1e16;
12784 y = 2.99999;
12785 z = x + y;
12786 if (z != 1e16+4.)
12787 exit(0);
12788 /* both tests show evidence of double rounding */
12789 exit(1);
12790}
12791
12792_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012793if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson04b27232009-01-04 12:29:36 +000012794 ac_cv_x87_double_rounding=no
12795else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012796 ac_cv_x87_double_rounding=yes
Mark Dickinson04b27232009-01-04 12:29:36 +000012797fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012798rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12799 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson04b27232009-01-04 12:29:36 +000012800fi
12801
Mark Dickinson99abd142009-10-24 13:44:16 +000012802CC="$ac_save_cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012803{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
12804$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson04b27232009-01-04 12:29:36 +000012805if test "$ac_cv_x87_double_rounding" = yes
12806then
12807
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012808$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson04b27232009-01-04 12:29:36 +000012809
12810fi
12811
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012812# ************************************
12813# * Check for mathematical functions *
12814# ************************************
12815
12816LIBS_SAVE=$LIBS
12817LIBS="$LIBS $LIBM"
12818
Mark Dickinson265d7382008-04-21 22:32:24 +000012819# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
12820# -0. on some architectures.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
12822$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012823if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012824 $as_echo_n "(cached) " >&6
Mark Dickinson265d7382008-04-21 22:32:24 +000012825else
12826
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012827if test "$cross_compiling" = yes; then :
Mark Dickinson265d7382008-04-21 22:32:24 +000012828 ac_cv_tanh_preserves_zero_sign=no
12829else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012830 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson265d7382008-04-21 22:32:24 +000012831/* end confdefs.h. */
12832
12833#include <math.h>
Mark Dickinson7a3d8642008-04-22 00:54:27 +000012834#include <stdlib.h>
Mark Dickinson265d7382008-04-21 22:32:24 +000012835int main() {
12836 /* return 0 if either negative zeros don't exist
12837 on this platform or if negative zeros exist
12838 and tanh(-0.) == -0. */
12839 if (atan2(0., -1.) == atan2(-0., -1.) ||
12840 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
12841 else exit(1);
12842}
12843
12844_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012845if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson265d7382008-04-21 22:32:24 +000012846 ac_cv_tanh_preserves_zero_sign=yes
12847else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012848 ac_cv_tanh_preserves_zero_sign=no
Mark Dickinson265d7382008-04-21 22:32:24 +000012849fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012850rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12851 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson265d7382008-04-21 22:32:24 +000012852fi
12853
Mark Dickinson265d7382008-04-21 22:32:24 +000012854fi
12855
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012856{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
12857$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Mark Dickinson265d7382008-04-21 22:32:24 +000012858if test "$ac_cv_tanh_preserves_zero_sign" = yes
12859then
12860
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012861$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Mark Dickinson265d7382008-04-21 22:32:24 +000012862
12863fi
12864
Mark Dickinson65898e02009-09-05 10:27:00 +000012865for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012866do :
12867 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12868ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012869if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinson65898e02009-09-05 10:27:00 +000012870 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012871#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Mark Dickinson65898e02009-09-05 10:27:00 +000012872_ACEOF
12873
12874fi
12875done
12876
Mark Dickinson65898e02009-09-05 10:27:00 +000012877for ac_func in hypot lgamma log1p round tgamma
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012878do :
12879 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12880ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012881if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Christian Heimes0a8143f2007-12-18 23:22:54 +000012882 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012883#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes0a8143f2007-12-18 23:22:54 +000012884_ACEOF
12885
12886fi
12887done
12888
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012889ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
12890"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012891if test "x$ac_cv_have_decl_isinf" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012892 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012893else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012894 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012895fi
12896
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012897cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012898#define HAVE_DECL_ISINF $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012899_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012900ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
12901"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012902if test "x$ac_cv_have_decl_isnan" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012903 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012904else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012905 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012906fi
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012907
12908cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012909#define HAVE_DECL_ISNAN $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012910_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012911ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
12912"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012913if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012914 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012915else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012916 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012917fi
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012918
12919cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012920#define HAVE_DECL_ISFINITE $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012921_ACEOF
12922
12923
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000012924LIBS=$LIBS_SAVE
12925
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012926# For multiprocessing module, check that sem_open
12927# actually works. For FreeBSD versions <= 7.2,
12928# the kernel module that provides POSIX semaphores
12929# isn't loaded by default, so an attempt to call
12930# sem_open results in a 'Signal 12' error.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
12932$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012933if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012934 $as_echo_n "(cached) " >&6
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012935else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012936 if test "$cross_compiling" = yes; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012937 ac_cv_posix_semaphores_enabled=yes
12938else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012939 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012940/* end confdefs.h. */
12941
12942#include <unistd.h>
12943#include <fcntl.h>
12944#include <stdio.h>
12945#include <semaphore.h>
12946#include <sys/stat.h>
12947
12948int main(void) {
12949 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
12950 if (a == SEM_FAILED) {
12951 perror("sem_open");
12952 return 1;
12953 }
12954 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000012955 sem_unlink("/autoconf");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012956 return 0;
12957}
12958
12959_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012960if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012961 ac_cv_posix_semaphores_enabled=yes
12962else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012963 ac_cv_posix_semaphores_enabled=no
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012964fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012965rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12966 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012967fi
12968
12969
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012970fi
12971
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012972{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
12973$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012974if test $ac_cv_posix_semaphores_enabled = no
12975then
12976
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012977$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012978
12979fi
12980
12981# Multiprocessing check for broken sem_getvalue
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
12983$as_echo_n "checking for broken sem_getvalue... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012984if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012985 $as_echo_n "(cached) " >&6
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012986else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012987 if test "$cross_compiling" = yes; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012988 ac_cv_broken_sem_getvalue=yes
12989else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012990 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012991/* end confdefs.h. */
12992
12993#include <unistd.h>
12994#include <fcntl.h>
12995#include <stdio.h>
12996#include <semaphore.h>
12997#include <sys/stat.h>
12998
12999int main(void){
Mark Dickinson59dc89e2009-12-13 21:06:06 +000013000 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013001 int count;
13002 int res;
13003 if(a==SEM_FAILED){
13004 perror("sem_open");
13005 return 1;
13006
13007 }
13008 res = sem_getvalue(a, &count);
13009 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000013010 sem_unlink("/autocftw");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013011 return res==-1 ? 1 : 0;
13012}
13013
13014_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013015if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013016 ac_cv_broken_sem_getvalue=no
13017else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013018 ac_cv_broken_sem_getvalue=yes
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013019fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013020rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13021 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013022fi
13023
13024
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013025fi
13026
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013027{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
13028$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013029if test $ac_cv_broken_sem_getvalue = yes
13030then
13031
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013032$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013033
13034fi
13035
Mark Dickinsonefc82f72009-03-20 15:51:55 +000013036# determine what size digit to use for Python's longs
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
13038$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000013039# Check whether --enable-big-digits was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013040if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonefc82f72009-03-20 15:51:55 +000013041 enableval=$enable_big_digits; case $enable_big_digits in
13042yes)
13043 enable_big_digits=30 ;;
13044no)
13045 enable_big_digits=15 ;;
1304615|30)
13047 ;;
13048*)
Matthias Klose3cef2a92012-03-14 23:39:33 +010013049 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 +000013050esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013051{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
13052$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000013053
13054cat >>confdefs.h <<_ACEOF
13055#define PYLONG_BITS_IN_DIGIT $enable_big_digits
13056_ACEOF
13057
13058
13059else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13061$as_echo "no value specified" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000013062fi
13063
13064
Guido van Rossumef2255b2000-03-10 22:30:29 +000013065# check for wchar.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013066ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +010013067if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013068
13069
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013070$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013071
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013072 wchar_h="yes"
13073
Guido van Rossumef2255b2000-03-10 22:30:29 +000013074else
Martin v. Löwis11437992002-04-12 09:54:03 +000013075 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000013076
13077fi
13078
Michael W. Hudson54241132001-12-07 15:38:26 +000013079
Martin v. Löwis11437992002-04-12 09:54:03 +000013080
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013081# determine wchar_t size
13082if test "$wchar_h" = yes
13083then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013084 # The cast to long int works around a bug in the HP C Compiler
Martin v. Löwiseba40652007-08-30 20:10:57 +000013085# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13086# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13087# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
13089$as_echo_n "checking size of wchar_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013090if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013091 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013092else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013093 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
13094"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013095
Martin v. Löwis11437992002-04-12 09:54:03 +000013096else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013097 if test "$ac_cv_type_wchar_t" = yes; then
13098 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13099$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013100as_fn_error 77 "cannot compute sizeof (wchar_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +010013101See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013102 else
13103 ac_cv_sizeof_wchar_t=0
13104 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013105fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013106
Martin v. Löwis11437992002-04-12 09:54:03 +000013107fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013108{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
13109$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013110
13111
13112
Martin v. Löwis11437992002-04-12 09:54:03 +000013113cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013114#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013115_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013116
Michael W. Hudson54241132001-12-07 15:38:26 +000013117
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013118fi
13119
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
13121$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013122have_ucs4_tcl=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013123cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013124/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013125
13126#include <tcl.h>
13127#if TCL_UTF_MAX != 6
13128# error "NOT UCS4_TCL"
13129#endif
13130int
13131main ()
13132{
13133
13134 ;
13135 return 0;
13136}
13137_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013138if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013139
13140
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013141$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013142
13143 have_ucs4_tcl=yes
13144
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013145fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013146rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013147{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
13148$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013149
Skip Montanaro6dead952003-09-25 14:50:04 +000013150# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013151if test "$wchar_h" = yes
13152then
13153 # check whether wchar_t is signed or not
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013154 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
13155$as_echo_n "checking whether wchar_t is signed... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013156 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013157 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013158else
13159
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013160 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013161 ac_cv_wchar_t_signed=yes
13162else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013163 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013164/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013165
13166 #include <wchar.h>
13167 int main()
13168 {
Martin v. Löwis44fe0e42006-04-11 07:15:30 +000013169 /* Success: exit code 0 */
13170 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013171 }
13172
13173_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013174if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013175 ac_cv_wchar_t_signed=yes
13176else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013177 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013178fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013179rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13180 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013181fi
13182
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013183fi
13184
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013185 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
13186$as_echo "$ac_cv_wchar_t_signed" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013187fi
13188
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what type to use for unicode" >&5
13190$as_echo_n "checking what type to use for unicode... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013191# Check whether --enable-unicode was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013192if test "${enable_unicode+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000013193 enableval=$enable_unicode;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013194else
13195 enable_unicode=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +000013196fi
13197
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013198
13199if test $enable_unicode = yes
13200then
Martin v. Löwisfd917792001-06-27 20:22:04 +000013201 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013202 case "$have_ucs4_tcl" in
13203 yes) enable_unicode="ucs4"
13204 ;;
13205 *) enable_unicode="ucs2"
13206 ;;
13207 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013208fi
13209
Martin v. Löwis0036cba2002-04-12 09:58:45 +000013210
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013211case "$enable_unicode" in
13212ucs2) unicode_size="2"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013213 $as_echo "#define Py_UNICODE_SIZE 2" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013214
13215 ;;
13216ucs4) unicode_size="4"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013217 $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013218
13219 ;;
Martin v. Löwised11a5d2012-05-20 10:42:17 +020013220no) ;; # To allow --disable-unicode
Matthias Klose3cef2a92012-03-14 23:39:33 +010013221*) 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 +000013222esac
13223
Michael W. Hudson54241132001-12-07 15:38:26 +000013224
Martin v. Löwis11437992002-04-12 09:54:03 +000013225
13226
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013227if test "$enable_unicode" = "no"
13228then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000013229 UNICODE_OBJS=""
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not used" >&5
13231$as_echo "not used" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013232else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000013233 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000013234
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013235$as_echo "#define Py_USING_UNICODE 1" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013236
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013237
13238 # wchar_t is only usable if it maps to an unsigned type
13239 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000013240 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013241 then
13242 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013243
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013244$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013245
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013246 $as_echo "#define PY_UNICODE_TYPE wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013247
13248 elif test "$ac_cv_sizeof_short" = "$unicode_size"
13249 then
13250 PY_UNICODE_TYPE="unsigned short"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013251 $as_echo "#define PY_UNICODE_TYPE unsigned short" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013252
13253 elif test "$ac_cv_sizeof_long" = "$unicode_size"
13254 then
13255 PY_UNICODE_TYPE="unsigned long"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013256 $as_echo "#define PY_UNICODE_TYPE unsigned long" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013257
13258 else
13259 PY_UNICODE_TYPE="no type found"
13260 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013261 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PY_UNICODE_TYPE" >&5
13262$as_echo "$PY_UNICODE_TYPE" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013263fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000013264
13265# check for endianness
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013266 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13267$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013268if ${ac_cv_c_bigendian+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013269 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000013270else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013271 ac_cv_c_bigendian=unknown
13272 # See if we're dealing with a universal compiler.
13273 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13274/* end confdefs.h. */
13275#ifndef __APPLE_CC__
13276 not a universal capable compiler
13277 #endif
13278 typedef int dummy;
13279
Skip Montanaro6dead952003-09-25 14:50:04 +000013280_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013281if ac_fn_c_try_compile "$LINENO"; then :
13282
13283 # Check for potential -arch flags. It is not universal unless
13284 # there are at least two -arch flags with different values.
13285 ac_arch=
13286 ac_prev=
13287 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13288 if test -n "$ac_prev"; then
13289 case $ac_word in
13290 i?86 | x86_64 | ppc | ppc64)
13291 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13292 ac_arch=$ac_word
13293 else
13294 ac_cv_c_bigendian=universal
13295 break
13296 fi
13297 ;;
13298 esac
13299 ac_prev=
13300 elif test "x$ac_word" = "x-arch"; then
13301 ac_prev=arch
13302 fi
13303 done
13304fi
13305rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13306 if test $ac_cv_c_bigendian = unknown; then
13307 # See if sys/param.h defines the BYTE_ORDER macro.
13308 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013309/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013310#include <sys/types.h>
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013311 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013312
Martin v. Löwis11437992002-04-12 09:54:03 +000013313int
13314main ()
13315{
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013316#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13317 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13318 && LITTLE_ENDIAN)
13319 bogus endian macros
13320 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013321
13322 ;
13323 return 0;
13324}
13325_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013326if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013327 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013328 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013329/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013330#include <sys/types.h>
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013331 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013332
Martin v. Löwis11437992002-04-12 09:54:03 +000013333int
13334main ()
13335{
Guido van Rossumef2255b2000-03-10 22:30:29 +000013336#if BYTE_ORDER != BIG_ENDIAN
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013337 not big endian
13338 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013339
13340 ;
13341 return 0;
13342}
13343_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013344if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013345 ac_cv_c_bigendian=yes
13346else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013347 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000013348fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013349rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013350fi
13351rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13352 fi
13353 if test $ac_cv_c_bigendian = unknown; then
13354 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13355 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013356/* end confdefs.h. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013357#include <limits.h>
13358
Martin v. Löwis11437992002-04-12 09:54:03 +000013359int
13360main ()
13361{
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013362#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13363 bogus endian macros
13364 #endif
13365
Martin v. Löwis11437992002-04-12 09:54:03 +000013366 ;
13367 return 0;
13368}
13369_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013370if ac_fn_c_try_compile "$LINENO"; then :
13371 # It does; now see whether it defined to _BIG_ENDIAN or not.
13372 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13373/* end confdefs.h. */
13374#include <limits.h>
13375
13376int
13377main ()
13378{
13379#ifndef _BIG_ENDIAN
13380 not big endian
13381 #endif
13382
13383 ;
13384 return 0;
13385}
13386_ACEOF
13387if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013388 ac_cv_c_bigendian=yes
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000013389else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013390 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013391fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013392rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13393fi
13394rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13395 fi
13396 if test $ac_cv_c_bigendian = unknown; then
13397 # Compile a test program.
13398 if test "$cross_compiling" = yes; then :
13399 # Try to guess by grepping values from an object file.
13400 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13401/* end confdefs.h. */
13402short int ascii_mm[] =
13403 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13404 short int ascii_ii[] =
13405 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13406 int use_ascii (int i) {
13407 return ascii_mm[i] + ascii_ii[i];
13408 }
13409 short int ebcdic_ii[] =
13410 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13411 short int ebcdic_mm[] =
13412 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13413 int use_ebcdic (int i) {
13414 return ebcdic_mm[i] + ebcdic_ii[i];
13415 }
13416 extern int foo;
Martin v. Löwiseba40652007-08-30 20:10:57 +000013417
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013418int
13419main ()
13420{
13421return use_ascii (foo) == use_ebcdic (foo);
13422 ;
13423 return 0;
13424}
13425_ACEOF
13426if ac_fn_c_try_compile "$LINENO"; then :
13427 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
13428 ac_cv_c_bigendian=yes
13429 fi
13430 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
13431 if test "$ac_cv_c_bigendian" = unknown; then
13432 ac_cv_c_bigendian=no
13433 else
13434 # finding both strings is unlikely to happen, but who knows?
13435 ac_cv_c_bigendian=unknown
13436 fi
13437 fi
13438fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013439rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013440else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013441 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013442/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000013443$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013444int
13445main ()
13446{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013447
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013448 /* Are we little or big endian? From Harbison&Steele. */
13449 union
13450 {
13451 long int l;
13452 char c[sizeof (long int)];
13453 } u;
13454 u.l = 1;
13455 return u.c[sizeof (long int) - 1] == 1;
Martin v. Löwiseba40652007-08-30 20:10:57 +000013456
13457 ;
13458 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000013459}
Martin v. Löwis11437992002-04-12 09:54:03 +000013460_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013461if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013462 ac_cv_c_bigendian=no
13463else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013464 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000013465fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013466rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13467 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000013468fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013469
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013470 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013471fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013472{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
13473$as_echo "$ac_cv_c_bigendian" >&6; }
13474 case $ac_cv_c_bigendian in #(
13475 yes)
13476 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
13477;; #(
13478 no)
13479 ;; #(
13480 universal)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013481
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013482$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000013483
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013484 ;; #(
13485 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013486 as_fn_error $? "unknown endianness
Matthias Klose3cef2a92012-03-14 23:39:33 +010013487 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013488 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000013489
Michael W. Hudson54241132001-12-07 15:38:26 +000013490
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013491# Check whether right shifting a negative integer extends the sign bit
13492# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
13494$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013495if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013496 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000013497else
Martin v. Löwis11437992002-04-12 09:54:03 +000013498
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013499if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013500 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013501else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013502 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013503/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013504
13505int main()
13506{
Vladimir Marangozova6180282000-07-12 05:05:06 +000013507 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013508}
13509
Martin v. Löwis11437992002-04-12 09:54:03 +000013510_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013511if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000013512 ac_cv_rshift_extends_sign=yes
13513else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013514 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000013515fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013516rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13517 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000013518fi
13519
Martin v. Löwiseba40652007-08-30 20:10:57 +000013520fi
13521
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013522{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
13523$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000013524if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013525then
Martin v. Löwis11437992002-04-12 09:54:03 +000013526
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013527$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013528
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013529fi
13530
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013531# check for getc_unlocked and related locking functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
13533$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013534if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013535 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013536else
Martin v. Löwis11437992002-04-12 09:54:03 +000013537
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013538cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013539/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013540#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013541int
13542main ()
13543{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013544
13545 FILE *f = fopen("/dev/null", "r");
13546 flockfile(f);
13547 getc_unlocked(f);
13548 funlockfile(f);
13549
Martin v. Löwis11437992002-04-12 09:54:03 +000013550 ;
13551 return 0;
13552}
13553_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013554if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013555 ac_cv_have_getc_unlocked=yes
13556else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013557 ac_cv_have_getc_unlocked=no
13558fi
13559rm -f core conftest.err conftest.$ac_objext \
13560 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013561fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013562
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013563{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
13564$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013565if test "$ac_cv_have_getc_unlocked" = yes
13566then
Martin v. Löwis11437992002-04-12 09:54:03 +000013567
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013568$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013569
13570fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013571
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013572# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000013573# save the value of LIBS so we don't actually link Python with readline
13574LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013575
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013576# On some systems we need to link readline to a termcap compatible
13577# library. NOTE: Keep the precedence of listed libraries synchronised
13578# with setup.py.
13579py_cv_lib_readline=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
13581$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013582for py_libtermcap in "" ncursesw ncurses curses termcap; do
13583 if test -z "$py_libtermcap"; then
13584 READLINE_LIBS="-lreadline"
13585 else
13586 READLINE_LIBS="-lreadline -l$py_libtermcap"
13587 fi
13588 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013589 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013590/* end confdefs.h. */
13591
Martin v. Löwiseba40652007-08-30 20:10:57 +000013592/* Override any GCC internal prototype to avoid an error.
13593 Use char because int might match the return type of a GCC
13594 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013595#ifdef __cplusplus
13596extern "C"
13597#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013598char readline ();
13599int
13600main ()
13601{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013602return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013603 ;
13604 return 0;
13605}
13606_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013607if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013608 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013609fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013610rm -f core conftest.err conftest.$ac_objext \
13611 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013612 if test $py_cv_lib_readline = yes; then
13613 break
13614 fi
13615done
13616# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
13617#AC_SUBST([READLINE_LIBS])
Gregory P. Smithe080cdf2008-09-07 19:19:04 +000013618if test $py_cv_lib_readline = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
13620$as_echo "none" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013621else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013622 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
13623$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013624
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013625$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013626
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013627fi
13628
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013629# check for readline 2.1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
13631$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013632if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013633 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013634else
13635 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013636LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013637cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013638/* end confdefs.h. */
13639
Martin v. Löwiseba40652007-08-30 20:10:57 +000013640/* Override any GCC internal prototype to avoid an error.
13641 Use char because int might match the return type of a GCC
13642 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013643#ifdef __cplusplus
13644extern "C"
13645#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013646char rl_callback_handler_install ();
13647int
13648main ()
13649{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013650return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013651 ;
13652 return 0;
13653}
13654_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013655if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013656 ac_cv_lib_readline_rl_callback_handler_install=yes
13657else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013658 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013659fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013660rm -f core conftest.err conftest.$ac_objext \
13661 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013662LIBS=$ac_check_lib_save_LIBS
13663fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013664{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
13665$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013666if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013667
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013668$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013669
13670fi
13671
13672
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013673# check for readline 2.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013674cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013675/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013676#include <readline/readline.h>
13677_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013678if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013679 have_readline=yes
13680else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013681 have_readline=no
Matthias Klosec511b472010-05-08 11:01:39 +000013682
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013683fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013684rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013685if test $have_readline = yes
13686then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013687 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013688/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013689#include <readline/readline.h>
13690
13691_ACEOF
13692if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013693 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013694
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013695$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013696
13697fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000013698rm -f conftest*
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000013699
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013700 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000013701/* end confdefs.h. */
13702#include <readline/readline.h>
13703
13704_ACEOF
13705if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013706 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000013707
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013708$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000013709
13710fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000013711rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013712
13713fi
13714
Martin v. Löwis0daad592001-09-30 21:09:59 +000013715# check for readline 4.0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
13717$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013718if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013719 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000013720else
Martin v. Löwis11437992002-04-12 09:54:03 +000013721 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013722LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013723cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013724/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013725
Martin v. Löwiseba40652007-08-30 20:10:57 +000013726/* Override any GCC internal prototype to avoid an error.
13727 Use char because int might match the return type of a GCC
13728 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013729#ifdef __cplusplus
13730extern "C"
13731#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013732char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013733int
13734main ()
13735{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013736return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013737 ;
13738 return 0;
13739}
13740_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013741if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013742 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000013743else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013744 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000013745fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013746rm -f core conftest.err conftest.$ac_objext \
13747 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013748LIBS=$ac_check_lib_save_LIBS
13749fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013750{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
13751$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013752if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013753
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013754$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000013755
Martin v. Löwis0daad592001-09-30 21:09:59 +000013756fi
13757
Michael W. Hudson54241132001-12-07 15:38:26 +000013758
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013759# also in 4.0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
13761$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013762if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013763 $as_echo_n "(cached) " >&6
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013764else
13765 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013766LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013767cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013768/* end confdefs.h. */
13769
13770/* Override any GCC internal prototype to avoid an error.
13771 Use char because int might match the return type of a GCC
13772 builtin and then its argument prototype would still apply. */
13773#ifdef __cplusplus
13774extern "C"
13775#endif
13776char rl_completion_display_matches_hook ();
13777int
13778main ()
13779{
13780return rl_completion_display_matches_hook ();
13781 ;
13782 return 0;
13783}
13784_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013785if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013786 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
13787else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013788 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013789fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013790rm -f core conftest.err conftest.$ac_objext \
13791 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013792LIBS=$ac_check_lib_save_LIBS
13793fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013794{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
13795$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013796if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013797
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013798$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013799
13800fi
13801
13802
Martin v. Löwis0daad592001-09-30 21:09:59 +000013803# check for readline 4.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
13805$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013806if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013807 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000013808else
Martin v. Löwis11437992002-04-12 09:54:03 +000013809 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013810LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013811cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013812/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013813
Martin v. Löwiseba40652007-08-30 20:10:57 +000013814/* Override any GCC internal prototype to avoid an error.
13815 Use char because int might match the return type of a GCC
13816 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013817#ifdef __cplusplus
13818extern "C"
13819#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013820char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013821int
13822main ()
13823{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013824return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013825 ;
13826 return 0;
13827}
13828_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013829if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013830 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000013831else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013832 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000013833fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013834rm -f core conftest.err conftest.$ac_objext \
13835 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013836LIBS=$ac_check_lib_save_LIBS
13837fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013838{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
13839$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013840if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013841
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013842$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000013843
Guido van Rossum353ae582001-07-10 16:45:32 +000013844fi
13845
Jack Jansendd19cf82001-12-06 22:36:17 +000013846
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013847# also in readline 4.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013848cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013849/* end confdefs.h. */
13850#include <readline/readline.h>
13851_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013852if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013853 have_readline=yes
13854else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013855 have_readline=no
Matthias Klosec511b472010-05-08 11:01:39 +000013856
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013857fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013858rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013859if test $have_readline = yes
13860then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013861 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013862/* end confdefs.h. */
13863#include <readline/readline.h>
13864
13865_ACEOF
13866if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013867 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013868
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013869$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013870
13871fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000013872rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013873
13874fi
13875
Martin v. Löwis82bca632006-02-10 20:49:30 +000013876# End of readline checks: restore LIBS
13877LIBS=$LIBS_no_readline
13878
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
13880$as_echo_n "checking for broken nice()... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013881if ${ac_cv_broken_nice+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013882 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013883else
Martin v. Löwis11437992002-04-12 09:54:03 +000013884
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013885if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013886 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013887else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013888 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013889/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013890
13891int main()
13892{
13893 int val1 = nice(1);
13894 if (val1 != -1 && val1 == nice(2))
13895 exit(0);
13896 exit(1);
13897}
13898
Martin v. Löwis11437992002-04-12 09:54:03 +000013899_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013900if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013901 ac_cv_broken_nice=yes
13902else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013903 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013904fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013905rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13906 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013907fi
13908
Martin v. Löwiseba40652007-08-30 20:10:57 +000013909fi
13910
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013911{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
13912$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013913if test "$ac_cv_broken_nice" = yes
13914then
Martin v. Löwis11437992002-04-12 09:54:03 +000013915
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013916$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013917
13918fi
13919
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
13921$as_echo_n "checking for broken poll()... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013922if ${ac_cv_broken_poll+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013923 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013924else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013925 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013926 ac_cv_broken_poll=no
13927else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013928 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013929/* end confdefs.h. */
13930
13931#include <poll.h>
13932
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013933int main()
13934{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013935 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013936 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013937
13938 close (42);
13939
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013940 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013941 if (poll_test < 0)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013942 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013943 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013944 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013945 else
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013946 return 1;
13947}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013948
13949_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013950if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013951 ac_cv_broken_poll=yes
13952else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013953 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013954fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013955rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13956 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013957fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013958
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013959fi
13960
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013961{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
13962$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013963if test "$ac_cv_broken_poll" = yes
13964then
13965
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013966$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013967
13968fi
13969
Brett Cannon43802422005-02-10 20:48:03 +000013970# 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 +000013971# (which is not required by ISO C or UNIX spec) and/or if we support
13972# tzname[]
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013973ac_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 +000013974#include <$ac_cv_struct_tm>
13975
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013976"
Matthias Klose3cef2a92012-03-14 23:39:33 +010013977if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000013978
13979cat >>confdefs.h <<_ACEOF
13980#define HAVE_STRUCT_TM_TM_ZONE 1
13981_ACEOF
13982
13983
13984fi
13985
13986if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13987
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013988$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013989
13990else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013991 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13992"
Matthias Klose3cef2a92012-03-14 23:39:33 +010013993if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013994 ac_have_decl=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000013995else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013996 ac_have_decl=0
Martin v. Löwiseba40652007-08-30 20:10:57 +000013997fi
13998
Martin v. Löwiseba40652007-08-30 20:10:57 +000013999cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014000#define HAVE_DECL_TZNAME $ac_have_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +000014001_ACEOF
14002
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014003 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
14004$as_echo_n "checking for tzname... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014005if ${ac_cv_var_tzname+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014006 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000014007else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014008 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014009/* end confdefs.h. */
14010#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000014011#if !HAVE_DECL_TZNAME
14012extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000014013#endif
14014
14015int
14016main ()
14017{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014018return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000014019 ;
14020 return 0;
14021}
14022_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014023if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000014024 ac_cv_var_tzname=yes
14025else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014026 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000014027fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014028rm -f core conftest.err conftest.$ac_objext \
14029 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014030fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014031{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
14032$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000014033 if test $ac_cv_var_tzname = yes; then
14034
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014035$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014036
14037 fi
14038fi
14039
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014040
Martin v. Löwis1d459062005-03-14 21:23:33 +000014041# check tzset(3) exists and works like we expect it to
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
14043$as_echo_n "checking for working tzset()... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014044if ${ac_cv_working_tzset+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014045 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014046else
14047
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014048if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014049 ac_cv_working_tzset=no
14050else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014051 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014052/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014053
14054#include <stdlib.h>
14055#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000014056#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000014057
14058#if HAVE_TZNAME
14059extern char *tzname[];
14060#endif
14061
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014062int main()
14063{
Brett Cannon18367812003-09-19 00:59:16 +000014064 /* Note that we need to ensure that not only does tzset(3)
14065 do 'something' with localtime, but it works as documented
14066 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000014067 This includes making sure that tzname is set properly if
14068 tm->tm_zone does not exist since it is the alternative way
14069 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000014070
14071 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000014072 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000014073 */
14074
Martin v. Löwis1d459062005-03-14 21:23:33 +000014075 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000014076 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
14077
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014078 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014079 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014080 if (localtime(&groundhogday)->tm_hour != 0)
14081 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014082#if HAVE_TZNAME
14083 /* For UTC, tzname[1] is sometimes "", sometimes " " */
14084 if (strcmp(tzname[0], "UTC") ||
14085 (tzname[1][0] != 0 && tzname[1][0] != ' '))
14086 exit(1);
14087#endif
Brett Cannon18367812003-09-19 00:59:16 +000014088
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014089 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014090 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014091 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014092 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014093#if HAVE_TZNAME
14094 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
14095 exit(1);
14096#endif
Brett Cannon18367812003-09-19 00:59:16 +000014097
14098 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
14099 tzset();
14100 if (localtime(&groundhogday)->tm_hour != 11)
14101 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014102#if HAVE_TZNAME
14103 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
14104 exit(1);
14105#endif
14106
14107#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000014108 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
14109 exit(1);
14110 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
14111 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014112#endif
Brett Cannon18367812003-09-19 00:59:16 +000014113
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014114 exit(0);
14115}
14116
14117_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014118if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014119 ac_cv_working_tzset=yes
14120else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014121 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014122fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014123rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14124 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014125fi
14126
Martin v. Löwiseba40652007-08-30 20:10:57 +000014127fi
14128
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014129{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
14130$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014131if test "$ac_cv_working_tzset" = yes
14132then
14133
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014134$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014135
14136fi
14137
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014138# Look for subsecond timestamps in struct stat
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
14140$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014141if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014142 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014143else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014144 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014145/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014146#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014147int
14148main ()
14149{
14150
14151struct stat st;
14152st.st_mtim.tv_nsec = 1;
14153
14154 ;
14155 return 0;
14156}
14157_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014158if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000014159 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014160else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014161 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014162fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014163rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14164fi
14165
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014166{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
14167$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014168if test "$ac_cv_stat_tv_nsec" = yes
14169then
14170
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014171$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014172
14173fi
14174
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014175# Look for BSD style subsecond timestamps in struct stat
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
14177$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014178if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014179 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014180else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014181 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014182/* end confdefs.h. */
14183#include <sys/stat.h>
14184int
14185main ()
14186{
14187
14188struct stat st;
14189st.st_mtimespec.tv_nsec = 1;
14190
14191 ;
14192 return 0;
14193}
14194_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014195if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014196 ac_cv_stat_tv_nsec2=yes
14197else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014198 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014199fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014200rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14201fi
14202
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014203{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
14204$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014205if test "$ac_cv_stat_tv_nsec2" = yes
14206then
14207
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014208$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014209
14210fi
14211
doko@ubuntu.comf27ec3e2014-04-17 20:11:19 +020014212# first curses configure check
14213ac_save_cppflags="$CPPFLAGS"
14214CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
14215
14216for ac_header in curses.h ncurses.h
14217do :
14218 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14219ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
14220if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
14221 cat >>confdefs.h <<_ACEOF
14222#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14223_ACEOF
14224
14225fi
14226
14227done
14228
14229
14230# On Solaris, term.h requires curses.h
14231for ac_header in term.h
14232do :
14233 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
14234#ifdef HAVE_CURSES_H
14235#include <curses.h>
14236#endif
14237
14238"
14239if test "x$ac_cv_header_term_h" = xyes; then :
14240 cat >>confdefs.h <<_ACEOF
14241#define HAVE_TERM_H 1
14242_ACEOF
14243
14244fi
14245
14246done
14247
14248
Jack Jansen666b1e72001-10-31 12:11:48 +000014249# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
14251$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014252if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014253 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014254else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014255 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014256/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014257#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014258int
14259main ()
14260{
Jack Jansen666b1e72001-10-31 12:11:48 +000014261
14262 int rtn;
14263 rtn = mvwdelch(0,0,0);
14264
Martin v. Löwis11437992002-04-12 09:54:03 +000014265 ;
14266 return 0;
14267}
14268_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014269if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014270 ac_cv_mvwdelch_is_expression=yes
14271else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014272 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014273fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014274rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14275fi
14276
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014277{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
14278$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000014279
14280if test "$ac_cv_mvwdelch_is_expression" = yes
14281then
Martin v. Löwis11437992002-04-12 09:54:03 +000014282
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014283$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014284
14285fi
14286
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014287{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
14288$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014289if ${ac_cv_window_has_flags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014290 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014291else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014292 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014293/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014294#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014295int
14296main ()
14297{
Jack Jansen666b1e72001-10-31 12:11:48 +000014298
14299 WINDOW *w;
14300 w->_flags = 0;
14301
Martin v. Löwis11437992002-04-12 09:54:03 +000014302 ;
14303 return 0;
14304}
14305_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014306if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014307 ac_cv_window_has_flags=yes
14308else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014309 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014310fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014311rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14312fi
14313
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014314{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
14315$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000014316
Jack Jansen666b1e72001-10-31 12:11:48 +000014317
14318if test "$ac_cv_window_has_flags" = yes
14319then
Martin v. Löwis11437992002-04-12 09:54:03 +000014320
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014321$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014322
14323fi
14324
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
14326$as_echo_n "checking for is_term_resized... " >&6; }
14327cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000014328/* end confdefs.h. */
14329#include <curses.h>
14330int
14331main ()
14332{
14333void *x=is_term_resized
14334 ;
14335 return 0;
14336}
14337_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014338if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000014339
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014340$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000014341
Matthias Klosec511b472010-05-08 11:01:39 +000014342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014343$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014344else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14346$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014347
14348fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014349rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14350
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
14352$as_echo_n "checking for resize_term... " >&6; }
14353cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000014354/* end confdefs.h. */
14355#include <curses.h>
14356int
14357main ()
14358{
14359void *x=resize_term
14360 ;
14361 return 0;
14362}
14363_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014364if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000014365
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014366$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000014367
Matthias Klosec511b472010-05-08 11:01:39 +000014368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014369$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014370else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014371 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14372$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014373
14374fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014375rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14376
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
14378$as_echo_n "checking for resizeterm... " >&6; }
14379cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000014380/* end confdefs.h. */
14381#include <curses.h>
14382int
14383main ()
14384{
14385void *x=resizeterm
14386 ;
14387 return 0;
14388}
14389_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014390if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000014391
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014392$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000014393
Matthias Klosec511b472010-05-08 11:01:39 +000014394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014395$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014396else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14398$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014399
14400fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014401rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.comf27ec3e2014-04-17 20:11:19 +020014402# last curses configure check
14403CPPFLAGS=$ac_save_cppflags
Martin v. Löwiseba40652007-08-30 20:10:57 +000014404
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
14406$as_echo "$as_me: checking for device files" >&6;}
14407
14408if test "x$cross_compiling" = xyes; then
14409 if test "${ac_cv_file__dev_ptmx+set}" != set; then
14410 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14411$as_echo_n "checking for /dev/ptmx... " >&6; }
14412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14413$as_echo "not set" >&6; }
14414 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14415 fi
14416 if test "${ac_cv_file__dev_ptc+set}" != set; then
14417 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14418$as_echo_n "checking for /dev/ptc... " >&6; }
14419 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14420$as_echo "not set" >&6; }
14421 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14422 fi
14423fi
14424
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14426$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014427if ${ac_cv_file__dev_ptmx+:} false; then :
14428 $as_echo_n "(cached) " >&6
14429else
14430 test "$cross_compiling" = yes &&
14431 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14432if test -r "/dev/ptmx"; then
14433 ac_cv_file__dev_ptmx=yes
14434else
14435 ac_cv_file__dev_ptmx=no
14436fi
14437fi
14438{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
14439$as_echo "$ac_cv_file__dev_ptmx" >&6; }
14440if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Martin v. Löwisfefbc202006-10-17 18:59:23 +000014441
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014442fi
14443
14444if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014445
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014446$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014447
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014448fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14450$as_echo_n "checking for /dev/ptc... " >&6; }
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014451if ${ac_cv_file__dev_ptc+:} false; then :
14452 $as_echo_n "(cached) " >&6
14453else
14454 test "$cross_compiling" = yes &&
14455 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14456if test -r "/dev/ptc"; then
14457 ac_cv_file__dev_ptc=yes
14458else
14459 ac_cv_file__dev_ptc=no
14460fi
14461fi
14462{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
14463$as_echo "$ac_cv_file__dev_ptc" >&6; }
14464if test "x$ac_cv_file__dev_ptc" = xyes; then :
Martin v. Löwisfefbc202006-10-17 18:59:23 +000014465
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014466fi
14467
14468if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000014469
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014470$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000014471
Neal Norwitz865400f2003-03-21 01:42:58 +000014472fi
14473
Mark Dickinson82864d12009-11-15 16:18:58 +000014474if test "$have_long_long" = yes
14475then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014476 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
14477$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014478 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014479 $as_echo_n "(cached) " >&6
Mark Dickinson82864d12009-11-15 16:18:58 +000014480else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014481 if test "$cross_compiling" = yes; then :
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014482 ac_cv_have_long_long_format="cross -- assuming no"
14483 if test x$GCC = xyes; then
14484 save_CFLAGS=$CFLAGS
14485 CFLAGS="$CFLAGS -Werror -Wformat"
14486 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14487/* end confdefs.h. */
14488
14489 #include <stdio.h>
14490 #include <stddef.h>
14491
14492int
14493main ()
14494{
14495
14496 char *buffer;
14497 sprintf(buffer, "%lld", (long long)123);
14498 sprintf(buffer, "%lld", (long long)-123);
14499 sprintf(buffer, "%llu", (unsigned long long)123);
14500
14501 ;
14502 return 0;
14503}
14504_ACEOF
14505if ac_fn_c_try_compile "$LINENO"; then :
14506 ac_cv_have_long_long_format=yes
14507
14508fi
14509rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14510 CFLAGS=$save_CFLAGS
14511 fi
Mark Dickinson82864d12009-11-15 16:18:58 +000014512else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014513 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson82864d12009-11-15 16:18:58 +000014514/* end confdefs.h. */
14515
14516 #include <stdio.h>
14517 #include <stddef.h>
14518 #include <string.h>
14519
14520 #ifdef HAVE_SYS_TYPES_H
14521 #include <sys/types.h>
14522 #endif
14523
14524 int main()
14525 {
14526 char buffer[256];
14527
14528 if (sprintf(buffer, "%lld", (long long)123) < 0)
14529 return 1;
14530 if (strcmp(buffer, "123"))
14531 return 1;
14532
14533 if (sprintf(buffer, "%lld", (long long)-123) < 0)
14534 return 1;
14535 if (strcmp(buffer, "-123"))
14536 return 1;
14537
14538 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
14539 return 1;
14540 if (strcmp(buffer, "123"))
14541 return 1;
14542
14543 return 0;
14544 }
14545
14546_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014547if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson82864d12009-11-15 16:18:58 +000014548 ac_cv_have_long_long_format=yes
14549else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014550 ac_cv_have_long_long_format=no
Mark Dickinson82864d12009-11-15 16:18:58 +000014551fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014552rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14553 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson82864d12009-11-15 16:18:58 +000014554fi
14555
14556
Mark Dickinson82864d12009-11-15 16:18:58 +000014557fi
14558
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
14560$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson82864d12009-11-15 16:18:58 +000014561fi
14562
Mark Dickinson5ce84742009-12-31 20:48:04 +000014563if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson82864d12009-11-15 16:18:58 +000014564then
14565
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014566$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson82864d12009-11-15 16:18:58 +000014567
14568fi
14569
Ronald Oussoren315cd0c2009-11-19 16:25:21 +000014570if test $ac_sys_system = Darwin
14571then
14572 LIBS="$LIBS -framework CoreFoundation"
14573fi
14574
Mark Dickinson82864d12009-11-15 16:18:58 +000014575
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
14577$as_echo_n "checking for %zd printf() format support... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014578if ${ac_cv_have_size_t_format+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014579 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014580else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014581 if test "$cross_compiling" = yes; then :
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000014582 ac_cv_have_size_t_format="cross -- assuming yes"
14583
Brett Cannon09d12362006-05-11 05:11:33 +000014584else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014585 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon09d12362006-05-11 05:11:33 +000014586/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014587
Brett Cannon09d12362006-05-11 05:11:33 +000014588#include <stdio.h>
14589#include <stddef.h>
14590#include <string.h>
14591
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000014592#ifdef HAVE_SYS_TYPES_H
14593#include <sys/types.h>
14594#endif
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000014595
14596#ifdef HAVE_SSIZE_T
14597typedef ssize_t Py_ssize_t;
14598#elif SIZEOF_VOID_P == SIZEOF_LONG
14599typedef long Py_ssize_t;
14600#else
14601typedef int Py_ssize_t;
14602#endif
Brett Cannon09d12362006-05-11 05:11:33 +000014603
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000014604int main()
14605{
14606 char buffer[256];
14607
Brett Cannon09d12362006-05-11 05:11:33 +000014608 if(sprintf(buffer, "%zd", (size_t)123) < 0)
14609 return 1;
14610
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000014611 if (strcmp(buffer, "123"))
14612 return 1;
14613
14614 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
14615 return 1;
14616
14617 if (strcmp(buffer, "-123"))
Brett Cannon09d12362006-05-11 05:11:33 +000014618 return 1;
14619
14620 return 0;
14621}
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014622
Brett Cannon09d12362006-05-11 05:11:33 +000014623_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014624if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014625 ac_cv_have_size_t_format=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014626else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014627 ac_cv_have_size_t_format=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014628fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014629rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14630 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000014631fi
14632
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014633fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014634{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
14635$as_echo "$ac_cv_have_size_t_format" >&6; }
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000014636if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014637
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014638$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014639
14640fi
14641
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014642ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000014643#ifdef HAVE_SYS_TYPES_H
14644#include <sys/types.h>
14645#endif
14646#ifdef HAVE_SYS_SOCKET_H
14647#include <sys/socket.h>
14648#endif
14649
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014650"
Matthias Klose3cef2a92012-03-14 23:39:33 +010014651if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000014652
Martin v. Löwis11437992002-04-12 09:54:03 +000014653else
Guido van Rossum95713eb2000-05-18 20:53:31 +000014654
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014655$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000014656
14657fi
14658
Michael W. Hudson54241132001-12-07 15:38:26 +000014659
Benjamin Peterson7497e912010-10-16 00:53:39 +000014660case $ac_sys_system in
14661AIX*)
14662
14663$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
14664 ;;
14665esac
14666
14667
Michael W. Hudson54241132001-12-07 15:38:26 +000014668
14669
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000014670for h in `(cd $srcdir;echo Python/thread_*.h)`
14671do
14672 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
14673done
14674
Michael W. Hudson54241132001-12-07 15:38:26 +000014675
Neal Norwitzd24499d2005-12-18 21:36:39 +000014676SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
14678$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014679for dir in $SRCDIRS; do
14680 if test ! -d $dir; then
14681 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000014682 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014683done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014684{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
14685$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000014686
Ned Deily3f1d0b32014-11-20 02:11:03 -080014687# ensurepip option
14688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
14689$as_echo_n "checking for ensurepip... " >&6; }
14690
14691# Check whether --with-ensurepip was given.
14692if test "${with_ensurepip+set}" = set; then :
14693 withval=$with_ensurepip;
14694else
14695 with_ensurepip=no
14696fi
14697
14698case $with_ensurepip in #(
14699 yes|upgrade) :
14700 ENSUREPIP=upgrade ;; #(
14701 install) :
14702 ENSUREPIP=install ;; #(
14703 no) :
14704 ENSUREPIP=no ;; #(
14705 *) :
14706 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
14707esac
14708{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
14709$as_echo "$ENSUREPIP" >&6; }
14710
14711
Guido van Rossum627b2d71993-12-24 10:39:16 +000014712# generate output files
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000014713ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000014714
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000014715ac_config_files="$ac_config_files Modules/ld_so_aix"
14716
Martin v. Löwis11437992002-04-12 09:54:03 +000014717cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014718# This file is a shell script that caches the results of configure
14719# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000014720# scripts and configure runs, see configure's option --config-cache.
14721# It is not useful on other systems. If it contains results you don't
14722# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014723#
Martin v. Löwis11437992002-04-12 09:54:03 +000014724# config.status only pays attention to the cache file if you give it
14725# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014726#
Skip Montanaro6dead952003-09-25 14:50:04 +000014727# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000014728# loading this file, other *unset* `ac_cv_foo' will be assigned the
14729# following values.
14730
14731_ACEOF
14732
Guido van Rossumf78abae1997-01-21 22:02:36 +000014733# The following way of writing the cache mishandles newlines in values,
14734# but we know of no workaround that is simple, portable, and efficient.
Martin v. Löwiseba40652007-08-30 20:10:57 +000014735# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014736# Ultrix sh set writes to stderr and can't be redirected directly,
14737# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwiseba40652007-08-30 20:10:57 +000014738(
14739 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
14740 eval ac_val=\$$ac_var
14741 case $ac_val in #(
14742 *${as_nl}*)
14743 case $ac_var in #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014744 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
14745$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014746 esac
14747 case $ac_var in #(
14748 _ | IFS | as_nl) ;; #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014749 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
14750 *) { eval $ac_var=; unset $ac_var;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014751 esac ;;
14752 esac
14753 done
14754
Martin v. Löwis11437992002-04-12 09:54:03 +000014755 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +000014756 case $as_nl`(ac_space=' '; set) 2>&1` in #(
14757 *${as_nl}ac_space=\ *)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014758 # `set' does not quote correctly, so add quotes: double-quote
14759 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000014760 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014761 "s/'/'\\\\''/g;
14762 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Martin v. Löwiseba40652007-08-30 20:10:57 +000014763 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000014764 *)
14765 # `set' quotes correctly as required by POSIX, so do not add quotes.
Martin v. Löwiseba40652007-08-30 20:10:57 +000014766 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000014767 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014768 esac |
14769 sort
14770) |
Martin v. Löwis11437992002-04-12 09:54:03 +000014771 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000014772 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000014773 t clear
Martin v. Löwiseba40652007-08-30 20:10:57 +000014774 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000014775 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
14776 t end
Martin v. Löwiseba40652007-08-30 20:10:57 +000014777 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
14778 :end' >>confcache
14779if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
14780 if test -w "$cache_file"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +010014781 if test "x$cache_file" != "x/dev/null"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014782 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
14783$as_echo "$as_me: updating cache $cache_file" >&6;}
Matthias Klose3cef2a92012-03-14 23:39:33 +010014784 if test ! -f "$cache_file" || test -h "$cache_file"; then
14785 cat confcache >"$cache_file"
14786 else
14787 case $cache_file in #(
14788 */* | ?:*)
14789 mv -f confcache "$cache_file"$$ &&
14790 mv -f "$cache_file"$$ "$cache_file" ;; #(
14791 *)
14792 mv -f confcache "$cache_file" ;;
14793 esac
14794 fi
14795 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014796 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014797 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
14798$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014799 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014800fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014801rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000014802
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014803test "x$prefix" = xNONE && prefix=$ac_default_prefix
14804# Let make expand exec_prefix.
14805test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000014806
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014807DEFS=-DHAVE_CONFIG_H
14808
Skip Montanaro6dead952003-09-25 14:50:04 +000014809ac_libobjs=
14810ac_ltlibobjs=
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014811U=
Skip Montanaro6dead952003-09-25 14:50:04 +000014812for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
14813 # 1. Remove the extension, and $U if already installed.
Martin v. Löwiseba40652007-08-30 20:10:57 +000014814 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014815 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Martin v. Löwiseba40652007-08-30 20:10:57 +000014816 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
14817 # will be set to the directory where LIBOBJS objects are built.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014818 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
14819 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000014820done
14821LIBOBJS=$ac_libobjs
14822
14823LTLIBOBJS=$ac_ltlibobjs
14824
14825
Martin v. Löwis11437992002-04-12 09:54:03 +000014826
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014827
Matthias Klose3cef2a92012-03-14 23:39:33 +010014828: "${CONFIG_STATUS=./config.status}"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014829ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000014830ac_clean_files_save=$ac_clean_files
14831ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014832{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
14833$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
14834as_write_fail=0
14835cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014836#! $SHELL
14837# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000014838# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014839# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000014840# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000014841
Martin v. Löwis11437992002-04-12 09:54:03 +000014842debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000014843ac_cs_recheck=false
14844ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000014845
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014846SHELL=\${CONFIG_SHELL-$SHELL}
14847export SHELL
14848_ASEOF
14849cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
14850## -------------------- ##
14851## M4sh Initialization. ##
14852## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000014853
Martin v. Löwiseba40652007-08-30 20:10:57 +000014854# Be more Bourne compatible
14855DUALCASE=1; export DUALCASE # for MKS sh
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014856if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014857 emulate sh
14858 NULLCMD=:
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014859 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000014860 # is contrary to our usage. Disable this feature.
14861 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000014862 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000014863else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014864 case `(set -o) 2>/dev/null` in #(
14865 *posix*) :
14866 set -o posix ;; #(
14867 *) :
14868 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014869esac
Martin v. Löwis11437992002-04-12 09:54:03 +000014870fi
Michael W. Hudson54241132001-12-07 15:38:26 +000014871
Skip Montanaro6dead952003-09-25 14:50:04 +000014872
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014873as_nl='
14874'
14875export as_nl
14876# Printing a long string crashes Solaris 7 /usr/bin/printf.
14877as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
14878as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
14879as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
14880# Prefer a ksh shell builtin over an external printf program on Solaris,
14881# but without wasting forks for bash or zsh.
14882if test -z "$BASH_VERSION$ZSH_VERSION" \
14883 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
14884 as_echo='print -r --'
14885 as_echo_n='print -rn --'
14886elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
14887 as_echo='printf %s\n'
14888 as_echo_n='printf %s'
14889else
14890 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
14891 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
14892 as_echo_n='/usr/ucb/echo -n'
14893 else
14894 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
14895 as_echo_n_body='eval
14896 arg=$1;
14897 case $arg in #(
14898 *"$as_nl"*)
14899 expr "X$arg" : "X\\(.*\\)$as_nl";
14900 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
14901 esac;
14902 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
14903 '
14904 export as_echo_n_body
14905 as_echo_n='sh -c $as_echo_n_body as_echo'
14906 fi
14907 export as_echo_body
14908 as_echo='sh -c $as_echo_body as_echo'
14909fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014910
14911# The user is always right.
14912if test "${PATH_SEPARATOR+set}" != set; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014913 PATH_SEPARATOR=:
14914 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
14915 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
14916 PATH_SEPARATOR=';'
14917 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000014918fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014919
Martin v. Löwiseba40652007-08-30 20:10:57 +000014920
14921# IFS
14922# We need space, tab and new line, in precisely that order. Quoting is
14923# there to prevent editors from complaining about space-tab.
14924# (If _AS_PATH_WALK were called with IFS unset, it would disable word
14925# splitting by setting IFS to empty value.)
Martin v. Löwiseba40652007-08-30 20:10:57 +000014926IFS=" "" $as_nl"
14927
14928# Find who we are. Look in the path if we contain no directory separator.
Matthias Klose3cef2a92012-03-14 23:39:33 +010014929as_myself=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014930case $0 in #((
Martin v. Löwiseba40652007-08-30 20:10:57 +000014931 *[\\/]* ) as_myself=$0 ;;
14932 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000014933for as_dir in $PATH
14934do
14935 IFS=$as_save_IFS
14936 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014937 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
14938 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000014939IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000014940
Martin v. Löwiseba40652007-08-30 20:10:57 +000014941 ;;
14942esac
14943# We did not find ourselves, most probably we were run as `sh COMMAND'
14944# in which case we are not to be found in the path.
14945if test "x$as_myself" = x; then
14946 as_myself=$0
14947fi
14948if test ! -f "$as_myself"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014949 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
14950 exit 1
Martin v. Löwiseba40652007-08-30 20:10:57 +000014951fi
14952
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014953# Unset variables that we do not need and which cause bugs (e.g. in
14954# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
14955# suppresses any "Segmentation fault" message there. '((' could
14956# trigger a bug in pdksh 5.2.14.
14957for as_var in BASH_ENV ENV MAIL MAILPATH
14958do eval test x\${$as_var+set} = xset \
14959 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Martin v. Löwiseba40652007-08-30 20:10:57 +000014960done
14961PS1='$ '
14962PS2='> '
14963PS4='+ '
14964
14965# NLS nuisances.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014966LC_ALL=C
14967export LC_ALL
14968LANGUAGE=C
14969export LANGUAGE
Martin v. Löwiseba40652007-08-30 20:10:57 +000014970
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014971# CDPATH.
14972(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
14973
14974
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014975# as_fn_error STATUS ERROR [LINENO LOG_FD]
14976# ----------------------------------------
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014977# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
14978# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014979# script with STATUS, using 1 if that was 0.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014980as_fn_error ()
14981{
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014982 as_status=$1; test $as_status -eq 0 && as_status=1
14983 if test "$4"; then
14984 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
14985 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014986 fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014987 $as_echo "$as_me: error: $2" >&2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014988 as_fn_exit $as_status
14989} # as_fn_error
14990
14991
14992# as_fn_set_status STATUS
14993# -----------------------
14994# Set $? to STATUS, without forking.
14995as_fn_set_status ()
14996{
14997 return $1
14998} # as_fn_set_status
14999
15000# as_fn_exit STATUS
15001# -----------------
15002# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
15003as_fn_exit ()
15004{
15005 set +e
15006 as_fn_set_status $1
15007 exit $1
15008} # as_fn_exit
15009
15010# as_fn_unset VAR
15011# ---------------
15012# Portably unset VAR.
15013as_fn_unset ()
15014{
15015 { eval $1=; unset $1;}
15016}
15017as_unset=as_fn_unset
15018# as_fn_append VAR VALUE
15019# ----------------------
15020# Append the text in VALUE to the end of the definition contained in VAR. Take
15021# advantage of any shell optimizations that allow amortized linear growth over
15022# repeated appends, instead of the typical quadratic growth present in naive
15023# implementations.
15024if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
15025 eval 'as_fn_append ()
15026 {
15027 eval $1+=\$2
15028 }'
15029else
15030 as_fn_append ()
15031 {
15032 eval $1=\$$1\$2
15033 }
15034fi # as_fn_append
15035
15036# as_fn_arith ARG...
15037# ------------------
15038# Perform arithmetic evaluation on the ARGs, and store the result in the
15039# global $as_val. Take advantage of shells that can avoid forks. The arguments
15040# must be portable across $(()) and expr.
15041if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
15042 eval 'as_fn_arith ()
15043 {
15044 as_val=$(( $* ))
15045 }'
15046else
15047 as_fn_arith ()
15048 {
15049 as_val=`expr "$@" || test $? -eq 1`
15050 }
15051fi # as_fn_arith
15052
15053
Martin v. Löwiseba40652007-08-30 20:10:57 +000015054if expr a : '\(a\)' >/dev/null 2>&1 &&
15055 test "X`expr 00001 : '.*\(...\)'`" = X001; then
15056 as_expr=expr
15057else
15058 as_expr=false
15059fi
15060
15061if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
15062 as_basename=basename
15063else
15064 as_basename=false
15065fi
15066
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015067if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
15068 as_dirname=dirname
15069else
15070 as_dirname=false
15071fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015072
Martin v. Löwiseba40652007-08-30 20:10:57 +000015073as_me=`$as_basename -- "$0" ||
15074$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15075 X"$0" : 'X\(//\)$' \| \
15076 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015077$as_echo X/"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000015078 sed '/^.*\/\([^/][^/]*\)\/*$/{
15079 s//\1/
15080 q
15081 }
15082 /^X\/\(\/\/\)$/{
15083 s//\1/
15084 q
15085 }
15086 /^X\/\(\/\).*/{
15087 s//\1/
15088 q
15089 }
15090 s/.*/./; q'`
15091
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015092# Avoid depending upon Character Ranges.
15093as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15094as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15095as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15096as_cr_digits='0123456789'
15097as_cr_alnum=$as_cr_Letters$as_cr_digits
Martin v. Löwiseba40652007-08-30 20:10:57 +000015098
15099ECHO_C= ECHO_N= ECHO_T=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015100case `echo -n x` in #(((((
Martin v. Löwiseba40652007-08-30 20:10:57 +000015101-n*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015102 case `echo 'xy\c'` in
Martin v. Löwiseba40652007-08-30 20:10:57 +000015103 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015104 xy) ECHO_C='\c';;
15105 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
15106 ECHO_T=' ';;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015107 esac;;
15108*)
15109 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000015110esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015111
Martin v. Löwis11437992002-04-12 09:54:03 +000015112rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +000015113if test -d conf$$.dir; then
15114 rm -f conf$$.dir/conf$$.file
15115else
15116 rm -f conf$$.dir
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015117 mkdir conf$$.dir 2>/dev/null
Martin v. Löwiseba40652007-08-30 20:10:57 +000015118fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015119if (echo >conf$$.file) 2>/dev/null; then
15120 if ln -s conf$$.file conf$$ 2>/dev/null; then
15121 as_ln_s='ln -s'
15122 # ... but there are two gotchas:
15123 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
15124 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015125 # In both cases, we have to default to `cp -pR'.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015126 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015127 as_ln_s='cp -pR'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015128 elif ln conf$$.file conf$$ 2>/dev/null; then
15129 as_ln_s=ln
15130 else
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015131 as_ln_s='cp -pR'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015132 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015133else
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015134 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000015135fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015136rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
15137rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000015138
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015139
15140# as_fn_mkdir_p
15141# -------------
15142# Create "$as_dir" as a directory, including parents if necessary.
15143as_fn_mkdir_p ()
15144{
15145
15146 case $as_dir in #(
15147 -*) as_dir=./$as_dir;;
15148 esac
15149 test -d "$as_dir" || eval $as_mkdir_p || {
15150 as_dirs=
15151 while :; do
15152 case $as_dir in #(
15153 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
15154 *) as_qdir=$as_dir;;
15155 esac
15156 as_dirs="'$as_qdir' $as_dirs"
15157 as_dir=`$as_dirname -- "$as_dir" ||
15158$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15159 X"$as_dir" : 'X\(//\)[^/]' \| \
15160 X"$as_dir" : 'X\(//\)$' \| \
15161 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
15162$as_echo X"$as_dir" |
15163 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15164 s//\1/
15165 q
15166 }
15167 /^X\(\/\/\)[^/].*/{
15168 s//\1/
15169 q
15170 }
15171 /^X\(\/\/\)$/{
15172 s//\1/
15173 q
15174 }
15175 /^X\(\/\).*/{
15176 s//\1/
15177 q
15178 }
15179 s/.*/./; q'`
15180 test -d "$as_dir" && break
15181 done
15182 test -z "$as_dirs" || eval "mkdir $as_dirs"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015183 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015184
15185
15186} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000015187if mkdir -p . 2>/dev/null; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015188 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000015189else
Skip Montanarof0d5f792004-08-15 14:08:23 +000015190 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000015191 as_mkdir_p=false
15192fi
15193
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015194
15195# as_fn_executable_p FILE
15196# -----------------------
15197# Test if FILE is an executable regular file.
15198as_fn_executable_p ()
15199{
15200 test -f "$1" && test -x "$1"
15201} # as_fn_executable_p
15202as_test_x='test -x'
15203as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000015204
15205# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015206as_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 +000015207
15208# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015209as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015210
15211
Martin v. Löwis11437992002-04-12 09:54:03 +000015212exec 6>&1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015213## ----------------------------------- ##
15214## Main body of $CONFIG_STATUS script. ##
15215## ----------------------------------- ##
15216_ASEOF
15217test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015218
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015219cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15220# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000015221# report actual input values of CONFIG_FILES etc. instead of their
Martin v. Löwiseba40652007-08-30 20:10:57 +000015222# values after options handling.
15223ac_log="
Martin v. Löwis174440b2008-10-03 08:59:41 +000015224This file was extended by python $as_me 2.7, which was
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015225generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000015226
15227 CONFIG_FILES = $CONFIG_FILES
15228 CONFIG_HEADERS = $CONFIG_HEADERS
15229 CONFIG_LINKS = $CONFIG_LINKS
15230 CONFIG_COMMANDS = $CONFIG_COMMANDS
15231 $ $0 $@
15232
Martin v. Löwiseba40652007-08-30 20:10:57 +000015233on `(hostname || uname -n) 2>/dev/null | sed 1q`
15234"
15235
Martin v. Löwis11437992002-04-12 09:54:03 +000015236_ACEOF
15237
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015238case $ac_config_files in *"
15239"*) set x $ac_config_files; shift; ac_config_files=$*;;
15240esac
15241
15242case $ac_config_headers in *"
15243"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
15244esac
15245
15246
15247cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015248# Files that config.status was made for.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015249config_files="$ac_config_files"
15250config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000015251
Martin v. Löwiseba40652007-08-30 20:10:57 +000015252_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015253
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015254cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015255ac_cs_usage="\
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015256\`$as_me' instantiates files and other configuration actions
15257from templates according to the current configuration. Unless the files
15258and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000015259
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015260Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000015261
15262 -h, --help print this help, then exit
Martin v. Löwiseba40652007-08-30 20:10:57 +000015263 -V, --version print version number and configuration settings, then exit
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015264 --config print configuration, then exit
15265 -q, --quiet, --silent
15266 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000015267 -d, --debug don't remove temporary files
15268 --recheck update $as_me by reconfiguring in the same conditions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015269 --file=FILE[:TEMPLATE]
15270 instantiate the configuration file FILE
15271 --header=FILE[:TEMPLATE]
15272 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000015273
15274Configuration files:
15275$config_files
15276
15277Configuration headers:
15278$config_headers
15279
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015280Report bugs to <http://bugs.python.org/>."
Skip Montanaro89e975f2007-08-22 19:05:21 +000015281
Martin v. Löwiseba40652007-08-30 20:10:57 +000015282_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015283cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15284ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000015285ac_cs_version="\\
Martin v. Löwis174440b2008-10-03 08:59:41 +000015286python config.status 2.7
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015287configured by $0, generated by GNU Autoconf 2.69,
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015288 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000015289
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015290Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000015291This config.status script is free software; the Free Software Foundation
15292gives unlimited permission to copy, distribute and modify it."
Martin v. Löwiseba40652007-08-30 20:10:57 +000015293
15294ac_pwd='$ac_pwd'
15295srcdir='$srcdir'
15296INSTALL='$INSTALL'
Trent Nelsonf6407a12012-08-30 14:56:13 +000015297MKDIR_P='$MKDIR_P'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015298test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000015299_ACEOF
15300
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015301cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15302# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000015303ac_need_defaults=:
15304while test $# != 0
15305do
15306 case $1 in
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015307 --*=?*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000015308 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15309 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000015310 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000015311 ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015312 --*=)
15313 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15314 ac_optarg=
15315 ac_shift=:
15316 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015317 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000015318 ac_option=$1
15319 ac_optarg=$2
15320 ac_shift=shift
15321 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015322 esac
15323
Skip Montanaro6dead952003-09-25 14:50:04 +000015324 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000015325 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000015326 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15327 ac_cs_recheck=: ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015328 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015329 $as_echo "$ac_cs_version"; exit ;;
15330 --config | --confi | --conf | --con | --co | --c )
15331 $as_echo "$ac_cs_config"; exit ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015332 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000015333 debug=: ;;
15334 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000015335 $ac_shift
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015336 case $ac_optarg in
15337 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015338 '') as_fn_error $? "missing file argument" ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015339 esac
15340 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015341 ac_need_defaults=false;;
15342 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000015343 $ac_shift
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015344 case $ac_optarg in
15345 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15346 esac
15347 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015348 ac_need_defaults=false;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015349 --he | --h)
15350 # Conflict between --help and --header
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015351 as_fn_error $? "ambiguous option: \`$1'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015352Try \`$0 --help' for more information.";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015353 --help | --hel | -h )
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015354 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000015355 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
15356 | -silent | --silent | --silen | --sile | --sil | --si | --s)
15357 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015358
15359 # This is an error.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015360 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015361Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015362
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015363 *) as_fn_append ac_config_targets " $1"
Martin v. Löwiseba40652007-08-30 20:10:57 +000015364 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015365
15366 esac
15367 shift
15368done
15369
Skip Montanaro6dead952003-09-25 14:50:04 +000015370ac_configure_extra_args=
15371
15372if $ac_cs_silent; then
15373 exec 6>/dev/null
15374 ac_configure_extra_args="$ac_configure_extra_args --silent"
15375fi
15376
15377_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015378cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000015379if \$ac_cs_recheck; then
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015380 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015381 shift
15382 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
15383 CONFIG_SHELL='$SHELL'
Martin v. Löwiseba40652007-08-30 20:10:57 +000015384 export CONFIG_SHELL
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015385 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000015386fi
15387
Martin v. Löwis11437992002-04-12 09:54:03 +000015388_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015389cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015390exec 5>>config.log
15391{
15392 echo
15393 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
15394## Running $as_me. ##
15395_ASBOX
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015396 $as_echo "$ac_log"
Martin v. Löwiseba40652007-08-30 20:10:57 +000015397} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015398
Martin v. Löwiseba40652007-08-30 20:10:57 +000015399_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015400cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015401_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015402
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015403cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015404
15405# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000015406for ac_config_target in $ac_config_targets
15407do
Martin v. Löwiseba40652007-08-30 20:10:57 +000015408 case $ac_config_target in
15409 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
15410 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
15411 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
15412 "Mac/IDLE/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/IDLE/Makefile" ;;
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000015413 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
15414 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015415 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
15416 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000015417 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000015418 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015419
Matthias Klose3cef2a92012-03-14 23:39:33 +010015420 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015421 esac
15422done
15423
Martin v. Löwiseba40652007-08-30 20:10:57 +000015424
Martin v. Löwis11437992002-04-12 09:54:03 +000015425# If the user did not use the arguments to specify the items to instantiate,
15426# then the envvar interface is used. Set only those that are not.
15427# We use the long form for the default assignment because of an extremely
15428# bizarre bug on SunOS 4.1.3.
15429if $ac_need_defaults; then
15430 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15431 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
15432fi
15433
Skip Montanaro6dead952003-09-25 14:50:04 +000015434# Have a temporary directory for convenience. Make it in the build tree
Martin v. Löwiseba40652007-08-30 20:10:57 +000015435# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000015436# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015437# Hook for its removal unless debugging.
15438# Note that there is a small window in which the directory will not be cleaned:
15439# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000015440$debug ||
15441{
Matthias Klose3cef2a92012-03-14 23:39:33 +010015442 tmp= ac_tmp=
Martin v. Löwiseba40652007-08-30 20:10:57 +000015443 trap 'exit_status=$?
Matthias Klose3cef2a92012-03-14 23:39:33 +010015444 : "${ac_tmp:=$tmp}"
15445 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +000015446' 0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015447 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000015448}
Martin v. Löwis11437992002-04-12 09:54:03 +000015449# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000015450
Martin v. Löwis11437992002-04-12 09:54:03 +000015451{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015452 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Matthias Klose3cef2a92012-03-14 23:39:33 +010015453 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000015454} ||
15455{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015456 tmp=./conf$$-$RANDOM
15457 (umask 077 && mkdir "$tmp")
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015458} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Matthias Klose3cef2a92012-03-14 23:39:33 +010015459ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000015460
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015461# Set up the scripts for CONFIG_FILES section.
15462# No need to generate them if there are no CONFIG_FILES.
15463# This happens for instance with `./config.status config.h'.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015464if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015465
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015466
15467ac_cr=`echo X | tr X '\015'`
15468# On cygwin, bash can eat \r inside `` if the user requested igncr.
15469# But we know of no other shell where ac_cr would be empty at this
15470# point, so we can use a bashism as a fallback.
15471if test "x$ac_cr" = x; then
15472 eval ac_cr=\$\'\\r\'
15473fi
15474ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
15475if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015476 ac_cs_awk_cr='\\r'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015477else
15478 ac_cs_awk_cr=$ac_cr
15479fi
15480
Matthias Klose3cef2a92012-03-14 23:39:33 +010015481echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000015482_ACEOF
15483
Martin v. Löwiseba40652007-08-30 20:10:57 +000015484
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015485{
15486 echo "cat >conf$$subs.awk <<_ACEOF" &&
15487 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
15488 echo "_ACEOF"
15489} >conf$$subs.sh ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015490 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15491ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015492ac_delim='%!_!# '
15493for ac_last_try in false false false false false :; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015494 . ./conf$$subs.sh ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015495 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015496
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015497 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
15498 if test $ac_delim_n = $ac_delim_num; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015499 break
15500 elif $ac_last_try; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015501 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015502 else
15503 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000015504 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015505done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015506rm -f conf$$subs.sh
Martin v. Löwiseba40652007-08-30 20:10:57 +000015507
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015508cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Matthias Klose3cef2a92012-03-14 23:39:33 +010015509cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000015510_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015511sed -n '
15512h
15513s/^/S["/; s/!.*/"]=/
15514p
15515g
15516s/^[^!]*!//
15517:repl
15518t repl
15519s/'"$ac_delim"'$//
15520t delim
15521:nl
15522h
15523s/\(.\{148\}\)..*/\1/
15524t more1
15525s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
15526p
15527n
15528b repl
15529:more1
15530s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15531p
15532g
15533s/.\{148\}//
15534t nl
15535:delim
15536h
15537s/\(.\{148\}\)..*/\1/
15538t more2
15539s/["\\]/\\&/g; s/^/"/; s/$/"/
15540p
15541b
15542:more2
15543s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15544p
15545g
15546s/.\{148\}//
15547t delim
15548' <conf$$subs.awk | sed '
15549/^[^""]/{
15550 N
15551 s/\n//
15552}
15553' >>$CONFIG_STATUS || ac_write_fail=1
15554rm -f conf$$subs.awk
15555cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15556_ACAWK
Matthias Klose3cef2a92012-03-14 23:39:33 +010015557cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015558 for (key in S) S_is_set[key] = 1
15559 FS = ""
15560
15561}
15562{
15563 line = $ 0
15564 nfields = split(line, field, "@")
15565 substed = 0
15566 len = length(field[1])
15567 for (i = 2; i < nfields; i++) {
15568 key = field[i]
15569 keylen = length(key)
15570 if (S_is_set[key]) {
15571 value = S[key]
15572 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
15573 len += length(value) + length(field[++i])
15574 substed = 1
15575 } else
15576 len += 1 + keylen
15577 }
15578
15579 print line
15580}
15581
15582_ACAWK
Martin v. Löwiseba40652007-08-30 20:10:57 +000015583_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015584cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15585if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
15586 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
15587else
15588 cat
Matthias Klose3cef2a92012-03-14 23:39:33 +010015589fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015590 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015591_ACEOF
15592
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015593# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
15594# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Martin v. Löwiseba40652007-08-30 20:10:57 +000015595# trailing colons and then remove the whole line if VPATH becomes empty
15596# (actually we leave an empty line to preserve line numbers).
15597if test "x$srcdir" = x.; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015598 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
15599h
15600s///
15601s/^/:/
15602s/[ ]*$/:/
15603s/:\$(srcdir):/:/g
15604s/:\${srcdir}:/:/g
15605s/:@srcdir@:/:/g
15606s/^:*//
Martin v. Löwiseba40652007-08-30 20:10:57 +000015607s/:*$//
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015608x
15609s/\(=[ ]*\).*/\1/
15610G
15611s/\n//
Martin v. Löwiseba40652007-08-30 20:10:57 +000015612s/^[^=]*=[ ]*$//
15613}'
15614fi
15615
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015616cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015617fi # test -n "$CONFIG_FILES"
15618
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015619# Set up the scripts for CONFIG_HEADERS section.
15620# No need to generate them if there are no CONFIG_HEADERS.
15621# This happens for instance with `./config.status Makefile'.
15622if test -n "$CONFIG_HEADERS"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +010015623cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015624BEGIN {
15625_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000015626
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015627# Transform confdefs.h into an awk script `defines.awk', embedded as
15628# here-document in config.status, that substitutes the proper values into
15629# config.h.in to produce config.h.
15630
15631# Create a delimiter string that does not exist in confdefs.h, to ease
15632# handling of long lines.
15633ac_delim='%!_!# '
15634for ac_last_try in false false :; do
Matthias Klose3cef2a92012-03-14 23:39:33 +010015635 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
15636 if test -z "$ac_tt"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015637 break
15638 elif $ac_last_try; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015639 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015640 else
15641 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
15642 fi
15643done
15644
15645# For the awk script, D is an array of macro values keyed by name,
15646# likewise P contains macro parameters if any. Preserve backslash
15647# newline sequences.
15648
15649ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
15650sed -n '
15651s/.\{148\}/&'"$ac_delim"'/g
15652t rset
15653:rset
15654s/^[ ]*#[ ]*define[ ][ ]*/ /
15655t def
15656d
15657:def
15658s/\\$//
15659t bsnl
15660s/["\\]/\\&/g
15661s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
15662D["\1"]=" \3"/p
15663s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
15664d
15665:bsnl
15666s/["\\]/\\&/g
15667s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
15668D["\1"]=" \3\\\\\\n"\\/p
15669t cont
15670s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
15671t cont
15672d
15673:cont
15674n
15675s/.\{148\}/&'"$ac_delim"'/g
15676t clear
15677:clear
15678s/\\$//
15679t bsnlc
15680s/["\\]/\\&/g; s/^/"/; s/$/"/p
15681d
15682:bsnlc
15683s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
15684b cont
15685' <confdefs.h | sed '
15686s/'"$ac_delim"'/"\\\
15687"/g' >>$CONFIG_STATUS || ac_write_fail=1
15688
15689cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15690 for (key in D) D_is_set[key] = 1
15691 FS = ""
15692}
15693/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
15694 line = \$ 0
15695 split(line, arg, " ")
15696 if (arg[1] == "#") {
15697 defundef = arg[2]
15698 mac1 = arg[3]
15699 } else {
15700 defundef = substr(arg[1], 2)
15701 mac1 = arg[2]
15702 }
15703 split(mac1, mac2, "(") #)
15704 macro = mac2[1]
15705 prefix = substr(line, 1, index(line, defundef) - 1)
15706 if (D_is_set[macro]) {
15707 # Preserve the white space surrounding the "#".
15708 print prefix "define", macro P[macro] D[macro]
15709 next
15710 } else {
15711 # Replace #undef with comments. This is necessary, for example,
15712 # in the case of _POSIX_SOURCE, which is predefined and required
15713 # on some systems where configure will not decide to define it.
15714 if (defundef == "undef") {
15715 print "/*", prefix defundef, macro, "*/"
15716 next
15717 }
15718 }
15719}
15720{ print }
15721_ACAWK
15722_ACEOF
15723cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015724 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015725fi # test -n "$CONFIG_HEADERS"
15726
15727
15728eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
15729shift
15730for ac_tag
Martin v. Löwiseba40652007-08-30 20:10:57 +000015731do
15732 case $ac_tag in
15733 :[FHLC]) ac_mode=$ac_tag; continue;;
15734 esac
15735 case $ac_mode$ac_tag in
15736 :[FHL]*:*);;
Matthias Klose3cef2a92012-03-14 23:39:33 +010015737 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015738 :[FH]-) ac_tag=-:-;;
15739 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
15740 esac
15741 ac_save_IFS=$IFS
15742 IFS=:
15743 set x $ac_tag
15744 IFS=$ac_save_IFS
15745 shift
15746 ac_file=$1
15747 shift
15748
15749 case $ac_mode in
15750 :L) ac_source=$1;;
15751 :[FH])
15752 ac_file_inputs=
15753 for ac_f
15754 do
15755 case $ac_f in
Matthias Klose3cef2a92012-03-14 23:39:33 +010015756 -) ac_f="$ac_tmp/stdin";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015757 *) # Look for the file first in the build tree, then in the source tree
15758 # (if the path is not absolute). The absolute path cannot be DOS-style,
15759 # because $ac_f cannot contain `:'.
15760 test -f "$ac_f" ||
15761 case $ac_f in
15762 [\\/$]*) false;;
15763 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
15764 esac ||
Matthias Klose3cef2a92012-03-14 23:39:33 +010015765 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015766 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015767 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
15768 as_fn_append ac_file_inputs " '$ac_f'"
Martin v. Löwiseba40652007-08-30 20:10:57 +000015769 done
15770
15771 # Let's still pretend it is `configure' which instantiates (i.e., don't
15772 # use $as_me), people would be surprised to read:
15773 # /* config.h. Generated by config.status. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015774 configure_input='Generated from '`
15775 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
15776 `' by configure.'
Martin v. Löwiseba40652007-08-30 20:10:57 +000015777 if test x"$ac_file" != x-; then
15778 configure_input="$ac_file. $configure_input"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015779 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
15780$as_echo "$as_me: creating $ac_file" >&6;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000015781 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015782 # Neutralize special characters interpreted by sed in replacement strings.
15783 case $configure_input in #(
15784 *\&* | *\|* | *\\* )
15785 ac_sed_conf_input=`$as_echo "$configure_input" |
15786 sed 's/[\\\\&|]/\\\\&/g'`;; #(
15787 *) ac_sed_conf_input=$configure_input;;
15788 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000015789
15790 case $ac_tag in
Matthias Klose3cef2a92012-03-14 23:39:33 +010015791 *:-:* | *:-) cat >"$ac_tmp/stdin" \
15792 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015793 esac
15794 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015795 esac
15796
Martin v. Löwiseba40652007-08-30 20:10:57 +000015797 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000015798$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015799 X"$ac_file" : 'X\(//\)[^/]' \| \
15800 X"$ac_file" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000015801 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015802$as_echo X"$ac_file" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000015803 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15804 s//\1/
15805 q
15806 }
15807 /^X\(\/\/\)[^/].*/{
15808 s//\1/
15809 q
15810 }
15811 /^X\(\/\/\)$/{
15812 s//\1/
15813 q
15814 }
15815 /^X\(\/\).*/{
15816 s//\1/
15817 q
15818 }
15819 s/.*/./; q'`
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015820 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000015821 ac_builddir=.
15822
Martin v. Löwiseba40652007-08-30 20:10:57 +000015823case "$ac_dir" in
15824.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
15825*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015826 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015827 # A ".." for each directory in $ac_dir_suffix.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015828 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015829 case $ac_top_builddir_sub in
15830 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
15831 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
15832 esac ;;
15833esac
15834ac_abs_top_builddir=$ac_pwd
15835ac_abs_builddir=$ac_pwd$ac_dir_suffix
15836# for backward compatibility:
15837ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000015838
15839case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +000015840 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000015841 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015842 ac_top_srcdir=$ac_top_builddir_sub
15843 ac_abs_top_srcdir=$ac_pwd ;;
15844 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000015845 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015846 ac_top_srcdir=$srcdir
15847 ac_abs_top_srcdir=$srcdir ;;
15848 *) # Relative name.
15849 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
15850 ac_top_srcdir=$ac_top_build_prefix$srcdir
15851 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015852esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000015853ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000015854
Martin v. Löwis11437992002-04-12 09:54:03 +000015855
Martin v. Löwiseba40652007-08-30 20:10:57 +000015856 case $ac_mode in
15857 :F)
15858 #
15859 # CONFIG_FILE
15860 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015861
15862 case $INSTALL in
15863 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015864 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015865 esac
Trent Nelsonf6407a12012-08-30 14:56:13 +000015866 ac_MKDIR_P=$MKDIR_P
15867 case $MKDIR_P in
15868 [\\/$]* | ?:[\\/]* ) ;;
15869 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
15870 esac
Brett Cannon19fab762007-06-02 03:02:29 +000015871_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000015872
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015873cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015874# If the template does not know about datarootdir, expand it.
15875# FIXME: This hack should be removed a few years after 2.60.
15876ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015877ac_sed_dataroot='
15878/datarootdir/ {
Martin v. Löwiseba40652007-08-30 20:10:57 +000015879 p
15880 q
15881}
15882/@datadir@/p
15883/@docdir@/p
15884/@infodir@/p
15885/@localedir@/p
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015886/@mandir@/p'
15887case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Martin v. Löwiseba40652007-08-30 20:10:57 +000015888*datarootdir*) ac_datarootdir_seen=yes;;
15889*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015890 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
15891$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000015892_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015893cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015894 ac_datarootdir_hack='
15895 s&@datadir@&$datadir&g
15896 s&@docdir@&$docdir&g
15897 s&@infodir@&$infodir&g
15898 s&@localedir@&$localedir&g
15899 s&@mandir@&$mandir&g
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015900 s&\\\${datarootdir}&$datarootdir&g' ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015901esac
15902_ACEOF
15903
15904# Neutralize VPATH when `$srcdir' = `.'.
15905# Shell code in configure.ac might set extrasub.
15906# FIXME: do we really want to maintain this feature?
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015907cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15908ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000015909$extrasub
15910_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015911cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015912:t
15913/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015914s|@configure_input@|$ac_sed_conf_input|;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000015915s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015916s&@top_build_prefix@&$ac_top_build_prefix&;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000015917s&@srcdir@&$ac_srcdir&;t t
15918s&@abs_srcdir@&$ac_abs_srcdir&;t t
15919s&@top_srcdir@&$ac_top_srcdir&;t t
15920s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
15921s&@builddir@&$ac_builddir&;t t
15922s&@abs_builddir@&$ac_abs_builddir&;t t
15923s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
15924s&@INSTALL@&$ac_INSTALL&;t t
Trent Nelsonf6407a12012-08-30 14:56:13 +000015925s&@MKDIR_P@&$ac_MKDIR_P&;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000015926$ac_datarootdir_hack
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015927"
Matthias Klose3cef2a92012-03-14 23:39:33 +010015928eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
15929 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015930
Martin v. Löwiseba40652007-08-30 20:10:57 +000015931test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Matthias Klose3cef2a92012-03-14 23:39:33 +010015932 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
15933 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
15934 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015935 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015936which seems to be undefined. Please make sure it is defined" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015937$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015938which seems to be undefined. Please make sure it is defined" >&2;}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015939
Matthias Klose3cef2a92012-03-14 23:39:33 +010015940 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000015941 case $ac_file in
Matthias Klose3cef2a92012-03-14 23:39:33 +010015942 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
15943 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015944 esac \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015945 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015946 ;;
15947 :H)
15948 #
15949 # CONFIG_HEADER
15950 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015951 if test x"$ac_file" != x-; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015952 {
15953 $as_echo "/* $configure_input */" \
Matthias Klose3cef2a92012-03-14 23:39:33 +010015954 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
15955 } >"$ac_tmp/config.h" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015956 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Matthias Klose3cef2a92012-03-14 23:39:33 +010015957 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015958 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
15959$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015960 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015961 rm -f "$ac_file"
Matthias Klose3cef2a92012-03-14 23:39:33 +010015962 mv "$ac_tmp/config.h" "$ac_file" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015963 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015964 fi
15965 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015966 $as_echo "/* $configure_input */" \
Matthias Klose3cef2a92012-03-14 23:39:33 +010015967 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015968 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015969 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015970 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015971
Martin v. Löwiseba40652007-08-30 20:10:57 +000015972
15973 esac
15974
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000015975
15976 case $ac_file$ac_mode in
15977 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
15978
15979 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000015980done # for ac_tag
15981
Guido van Rossum627b2d71993-12-24 10:39:16 +000015982
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015983as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000015984_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015985ac_clean_files=$ac_clean_files_save
15986
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015987test $ac_write_fail = 0 ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015988 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015989
Martin v. Löwis11437992002-04-12 09:54:03 +000015990
15991# configure is writing to config.log, and then calls config.status.
15992# config.status does its own redirection, appending to config.log.
15993# Unfortunately, on DOS this fails, as config.log is still kept open
15994# by configure, so config.status won't be able to write to it; its
15995# output is simply discarded. So we exec the FD to /dev/null,
15996# effectively closing config.log, so it can be properly (re)opened and
15997# appended to by config.status. When coming back to configure, we
15998# need to make the FD available again.
15999if test "$no_create" != yes; then
16000 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000016001 ac_config_status_args=
16002 test "$silent" = yes &&
16003 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000016004 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000016005 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000016006 exec 5>>config.log
16007 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16008 # would make configure fail if this is the last instruction.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016009 $ac_cs_success || as_fn_exit 1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016010fi
16011if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
16012 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
16013$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016014fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000016015
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016016
Martin v. Löwisf7afe952006-04-14 15:16:15 +000016017echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016018if test ! -f Modules/Setup
16019then
16020 cp $srcdir/Modules/Setup.dist Modules/Setup
16021fi
16022
Martin v. Löwisf7afe952006-04-14 15:16:15 +000016023echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016024if test ! -f Modules/Setup.local
16025then
16026 echo "# Edit this file for local setup changes" >Modules/Setup.local
16027fi
16028
16029echo "creating Makefile"
16030$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
16031 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000016032 Modules/Setup.local Modules/Setup
Skip Montanaro89e975f2007-08-22 19:05:21 +000016033
16034case $ac_sys_system in
16035BeOS)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016036 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000016037
16038 Support for BeOS is deprecated as of Python 2.6.
16039 See PEP 11 for the gory details.
16040 " >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016041$as_echo "$as_me: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000016042
16043 Support for BeOS is deprecated as of Python 2.6.
16044 See PEP 11 for the gory details.
16045 " >&2;}
16046 ;;
16047*) ;;
16048esac
16049
Neil Schemenauerc761fc82001-02-19 04:50:49 +000016050mv config.c Modules