blob: 2c1c82d815d02138d50cf25960dc4ae5739c7cdc [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
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000627SRCDIRS
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000628THREADHEADERS
629UNICODE_OBJS
630LIBC
631LIBM
632HAVE_GETHOSTBYNAME
633HAVE_GETHOSTBYNAME_R
634HAVE_GETHOSTBYNAME_R_3_ARG
635HAVE_GETHOSTBYNAME_R_5_ARG
636HAVE_GETHOSTBYNAME_R_6_ARG
637LIBOBJS
638TRUE
639MACHDEP_OBJS
640DYNLOADFILE
641DLINCLDIR
642THREADOBJ
643LDLAST
644USE_THREAD_MODULE
645SIGNAL_OBJS
646USE_SIGNAL_MODULE
Ned Deilya2a9f572013-10-25 00:30:10 -0700647TCLTK_LIBS
648TCLTK_INCLUDES
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000649LIBFFI_INCLUDEDIR
650PKG_CONFIG
651SHLIBS
652CFLAGSFORSHARED
653LINKFORSHARED
654CCSHARED
655BLDSHARED
656LDCXXSHARED
657LDSHARED
658SO
659LIBTOOL_CRUFT
660OTHER_LIBTOOL_OPT
661UNIVERSAL_ARCH_FLAGS
662BASECFLAGS
663OPT
664LN
Trent Nelsonf6407a12012-08-30 14:56:13 +0000665MKDIR_P
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000666INSTALL_DATA
667INSTALL_SCRIPT
668INSTALL_PROGRAM
Georg Brandl3a5508e2011-03-06 10:42:21 +0100669HAS_HG
670HGBRANCH
671HGTAG
672HGVERSION
Trent Nelsond86ceec2012-10-16 09:42:45 -0400673BASECPPFLAGS
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000674SVNVERSION
675ARFLAGS
doko@python.orgd65e2ba2013-01-31 23:52:03 +0100676ac_ct_AR
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000677AR
678RANLIB
679GNULD
680LINKCC
681RUNSHARED
682INSTSONAME
683LDLIBRARYDIR
684BLDLIBRARY
685DLLLIBRARY
686LDLIBRARY
687LIBRARY
688BUILDEXEEXT
689EGREP
690GREP
691CPP
doko@python.org4e63fbe2013-01-25 13:08:27 +0100692MULTIARCH
doko@python.orgd65e2ba2013-01-31 23:52:03 +0100693ac_ct_CXX
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000694MAINCC
695CXX
696OBJEXT
697EXEEXT
698ac_ct_CC
699CPPFLAGS
700LDFLAGS
701CFLAGS
702CC
703EXPORT_MACOSX_DEPLOYMENT_TARGET
704CONFIGURE_MACOSX_DEPLOYMENT_TARGET
705EXTRAMACHDEPPATH
706EXTRAPLATDIR
707SGI_ABI
doko@python.orgd65e2ba2013-01-31 23:52:03 +0100708_PYTHON_HOST_PLATFORM
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000709MACHDEP
710FRAMEWORKINSTALLAPPSPREFIX
711FRAMEWORKUNIXTOOLSPREFIX
712FRAMEWORKALTINSTALLLAST
713FRAMEWORKALTINSTALLFIRST
714FRAMEWORKINSTALLLAST
715FRAMEWORKINSTALLFIRST
716PYTHONFRAMEWORKINSTALLDIR
717PYTHONFRAMEWORKPREFIX
718PYTHONFRAMEWORKDIR
719PYTHONFRAMEWORKIDENTIFIER
720PYTHONFRAMEWORK
721LIPO_32BIT_FLAGS
722ARCH_RUN_32BIT
723UNIVERSALSDK
724CONFIG_ARGS
725SOVERSION
726VERSION
doko@python.orgd65e2ba2013-01-31 23:52:03 +0100727PYTHON_FOR_BUILD
728host_os
729host_vendor
730host_cpu
731host
732build_os
733build_vendor
734build_cpu
735build
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000736target_alias
737host_alias
738build_alias
739LIBS
740ECHO_T
741ECHO_N
742ECHO_C
743DEFS
744mandir
745localedir
746libdir
747psdir
748pdfdir
749dvidir
750htmldir
751infodir
752docdir
753oldincludedir
754includedir
755localstatedir
756sharedstatedir
757sysconfdir
758datadir
759datarootdir
760libexecdir
761sbindir
762bindir
763program_transform_name
764prefix
765exec_prefix
766PACKAGE_URL
767PACKAGE_BUGREPORT
768PACKAGE_STRING
769PACKAGE_VERSION
770PACKAGE_TARNAME
771PACKAGE_NAME
772PATH_SEPARATOR
773SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000774ac_subst_files=''
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000775ac_user_opts='
776enable_option_checking
777enable_universalsdk
778with_universal_archs
779with_framework_name
780enable_framework
781with_gcc
782with_cxx_main
783with_suffix
784enable_shared
785enable_profiling
786with_pydebug
787enable_toolbox_glue
788with_libs
789with_system_expat
790with_system_ffi
Ned Deilya2a9f572013-10-25 00:30:10 -0700791with_tcltk_includes
792with_tcltk_libs
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000793with_dbmliborder
794with_signal_module
795with_dec_threads
796with_threads
797with_thread
798with_pth
799enable_ipv6
800with_doc_strings
801with_tsc
802with_pymalloc
803with_valgrind
804with_wctype_functions
805with_fpectl
806with_libm
807with_libc
808enable_big_digits
809enable_unicode
810'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000811 ac_precious_vars='build_alias
812host_alias
813target_alias
814CC
815CFLAGS
816LDFLAGS
817LIBS
818CPPFLAGS
819CPP'
820
Guido van Rossum627b2d71993-12-24 10:39:16 +0000821
Guido van Rossum7f43da71994-08-01 12:15:30 +0000822# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000823ac_init_help=
824ac_init_version=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000825ac_unrecognized_opts=
826ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000827# The variables have the same names as the options, with
828# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000829cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000830exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000831no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000832no_recursion=
833prefix=NONE
834program_prefix=NONE
835program_suffix=NONE
836program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000837silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000838site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000839srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000840verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000841x_includes=NONE
842x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000843
844# Installation directory options.
845# These are left unexpanded so users can "make install exec_prefix=/foo"
846# and all the variables that are supposed to be based on exec_prefix
847# by default will actually change.
848# Use braces instead of parens because sh, perl, etc. also accept them.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000849# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000850bindir='${exec_prefix}/bin'
851sbindir='${exec_prefix}/sbin'
852libexecdir='${exec_prefix}/libexec'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000853datarootdir='${prefix}/share'
854datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000855sysconfdir='${prefix}/etc'
856sharedstatedir='${prefix}/com'
857localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000858includedir='${prefix}/include'
859oldincludedir='/usr/include'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000860docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
861infodir='${datarootdir}/info'
862htmldir='${docdir}'
863dvidir='${docdir}'
864pdfdir='${docdir}'
865psdir='${docdir}'
866libdir='${exec_prefix}/lib'
867localedir='${datarootdir}/locale'
868mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000869
Guido van Rossum7f43da71994-08-01 12:15:30 +0000870ac_prev=
Martin v. Löwiseba40652007-08-30 20:10:57 +0000871ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000872for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000873do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000874 # If the previous option needs an argument, assign it.
875 if test -n "$ac_prev"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +0000876 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000877 ac_prev=
878 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000879 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000880
Martin v. Löwiseba40652007-08-30 20:10:57 +0000881 case $ac_option in
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000882 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
883 *=) ac_optarg= ;;
884 *) ac_optarg=yes ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000885 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000886
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000887 # Accept the important Cygnus configure options, so we can diagnose typos.
888
Martin v. Löwiseba40652007-08-30 20:10:57 +0000889 case $ac_dashdash$ac_option in
890 --)
891 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000892
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000893 -bindir | --bindir | --bindi | --bind | --bin | --bi)
894 ac_prev=bindir ;;
895 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000896 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000897
898 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000899 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000900 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000901 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000902
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000903 -cache-file | --cache-file | --cache-fil | --cache-fi \
904 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
905 ac_prev=cache_file ;;
906 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
907 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000908 cache_file=$ac_optarg ;;
909
910 --config-cache | -C)
911 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000912
Martin v. Löwiseba40652007-08-30 20:10:57 +0000913 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000914 ac_prev=datadir ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000915 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000916 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000917
Martin v. Löwiseba40652007-08-30 20:10:57 +0000918 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
919 | --dataroo | --dataro | --datar)
920 ac_prev=datarootdir ;;
921 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
922 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
923 datarootdir=$ac_optarg ;;
924
Guido van Rossum7f43da71994-08-01 12:15:30 +0000925 -disable-* | --disable-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000926 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000927 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000928 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000929 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000930 ac_useropt_orig=$ac_useropt
931 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
932 case $ac_user_opts in
933 *"
934"enable_$ac_useropt"
935"*) ;;
936 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
937 ac_unrecognized_sep=', ';;
938 esac
939 eval enable_$ac_useropt=no ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000940
941 -docdir | --docdir | --docdi | --doc | --do)
942 ac_prev=docdir ;;
943 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
944 docdir=$ac_optarg ;;
945
946 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
947 ac_prev=dvidir ;;
948 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
949 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000950
951 -enable-* | --enable-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000952 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000953 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000954 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000955 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000956 ac_useropt_orig=$ac_useropt
957 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
958 case $ac_user_opts in
959 *"
960"enable_$ac_useropt"
961"*) ;;
962 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
963 ac_unrecognized_sep=', ';;
964 esac
965 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000966
Guido van Rossum7f43da71994-08-01 12:15:30 +0000967 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
968 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
969 | --exec | --exe | --ex)
970 ac_prev=exec_prefix ;;
971 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
972 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
973 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000974 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000975
976 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000977 # Obsolete; use --with-gas.
978 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000979
Martin v. Löwis11437992002-04-12 09:54:03 +0000980 -help | --help | --hel | --he | -h)
981 ac_init_help=long ;;
982 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
983 ac_init_help=recursive ;;
984 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
985 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000986
987 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000988 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000989 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000990 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000991
Martin v. Löwiseba40652007-08-30 20:10:57 +0000992 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
993 ac_prev=htmldir ;;
994 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
995 | --ht=*)
996 htmldir=$ac_optarg ;;
997
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000998 -includedir | --includedir | --includedi | --included | --include \
999 | --includ | --inclu | --incl | --inc)
1000 ac_prev=includedir ;;
1001 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1002 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001003 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001004
1005 -infodir | --infodir | --infodi | --infod | --info | --inf)
1006 ac_prev=infodir ;;
1007 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001008 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001009
1010 -libdir | --libdir | --libdi | --libd)
1011 ac_prev=libdir ;;
1012 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001013 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001014
1015 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1016 | --libexe | --libex | --libe)
1017 ac_prev=libexecdir ;;
1018 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1019 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001020 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001021
Martin v. Löwiseba40652007-08-30 20:10:57 +00001022 -localedir | --localedir | --localedi | --localed | --locale)
1023 ac_prev=localedir ;;
1024 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1025 localedir=$ac_optarg ;;
1026
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001027 -localstatedir | --localstatedir | --localstatedi | --localstated \
Martin v. Löwiseba40652007-08-30 20:10:57 +00001028 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001029 ac_prev=localstatedir ;;
1030 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Martin v. Löwiseba40652007-08-30 20:10:57 +00001031 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001032 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001033
1034 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1035 ac_prev=mandir ;;
1036 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001037 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001038
Guido van Rossum7f43da71994-08-01 12:15:30 +00001039 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001040 # Obsolete; use --without-fp.
1041 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001042
1043 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001044 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001045 no_create=yes ;;
1046
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001047 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1048 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1049 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001050
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001051 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1052 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1053 | --oldin | --oldi | --old | --ol | --o)
1054 ac_prev=oldincludedir ;;
1055 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1056 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1057 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001058 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001059
Guido van Rossum7f43da71994-08-01 12:15:30 +00001060 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1061 ac_prev=prefix ;;
1062 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001063 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001064
1065 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1066 | --program-pre | --program-pr | --program-p)
1067 ac_prev=program_prefix ;;
1068 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1069 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001070 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001071
1072 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1073 | --program-suf | --program-su | --program-s)
1074 ac_prev=program_suffix ;;
1075 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1076 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001077 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001078
1079 -program-transform-name | --program-transform-name \
1080 | --program-transform-nam | --program-transform-na \
1081 | --program-transform-n | --program-transform- \
1082 | --program-transform | --program-transfor \
1083 | --program-transfo | --program-transf \
1084 | --program-trans | --program-tran \
1085 | --progr-tra | --program-tr | --program-t)
1086 ac_prev=program_transform_name ;;
1087 -program-transform-name=* | --program-transform-name=* \
1088 | --program-transform-nam=* | --program-transform-na=* \
1089 | --program-transform-n=* | --program-transform-=* \
1090 | --program-transform=* | --program-transfor=* \
1091 | --program-transfo=* | --program-transf=* \
1092 | --program-trans=* | --program-tran=* \
1093 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001094 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001095
Martin v. Löwiseba40652007-08-30 20:10:57 +00001096 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1097 ac_prev=pdfdir ;;
1098 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1099 pdfdir=$ac_optarg ;;
1100
1101 -psdir | --psdir | --psdi | --psd | --ps)
1102 ac_prev=psdir ;;
1103 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1104 psdir=$ac_optarg ;;
1105
Guido van Rossum7f43da71994-08-01 12:15:30 +00001106 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1107 | -silent | --silent | --silen | --sile | --sil)
1108 silent=yes ;;
1109
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001110 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1111 ac_prev=sbindir ;;
1112 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1113 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001114 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001115
1116 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1117 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1118 | --sharedst | --shareds | --shared | --share | --shar \
1119 | --sha | --sh)
1120 ac_prev=sharedstatedir ;;
1121 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1122 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1123 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1124 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001125 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001126
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001127 -site | --site | --sit)
1128 ac_prev=site ;;
1129 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001130 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001131
Guido van Rossum7f43da71994-08-01 12:15:30 +00001132 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1133 ac_prev=srcdir ;;
1134 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001135 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001136
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001137 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1138 | --syscon | --sysco | --sysc | --sys | --sy)
1139 ac_prev=sysconfdir ;;
1140 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1141 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001142 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001143
Guido van Rossum7f43da71994-08-01 12:15:30 +00001144 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001145 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001146 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001147 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001148
1149 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1150 verbose=yes ;;
1151
Martin v. Löwis11437992002-04-12 09:54:03 +00001152 -version | --version | --versio | --versi | --vers | -V)
1153 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001154
1155 -with-* | --with-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001156 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001157 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001158 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001159 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001160 ac_useropt_orig=$ac_useropt
1161 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1162 case $ac_user_opts in
1163 *"
1164"with_$ac_useropt"
1165"*) ;;
1166 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1167 ac_unrecognized_sep=', ';;
1168 esac
1169 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001170
1171 -without-* | --without-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001172 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001173 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001174 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001175 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001176 ac_useropt_orig=$ac_useropt
1177 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1178 case $ac_user_opts in
1179 *"
1180"with_$ac_useropt"
1181"*) ;;
1182 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1183 ac_unrecognized_sep=', ';;
1184 esac
1185 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001186
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001187 --x)
1188 # Obsolete; use --with-x.
1189 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001190
1191 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1192 | --x-incl | --x-inc | --x-in | --x-i)
1193 ac_prev=x_includes ;;
1194 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1195 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001196 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001197
1198 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1199 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1200 ac_prev=x_libraries ;;
1201 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1202 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001203 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001204
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001205 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1206Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001207 ;;
1208
Martin v. Löwis11437992002-04-12 09:54:03 +00001209 *=*)
1210 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1211 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001212 case $ac_envvar in #(
1213 '' | [0-9]* | *[!_$as_cr_alnum]* )
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001214 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001215 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001216 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001217 export $ac_envvar ;;
1218
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001219 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001220 # FIXME: should be removed in autoconf 3.0.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001221 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001222 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001223 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Matthias Klose3cef2a92012-03-14 23:39:33 +01001224 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001225 ;;
1226
1227 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001228done
1229
Guido van Rossum7f43da71994-08-01 12:15:30 +00001230if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001231 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001232 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001233fi
1234
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001235if test -n "$ac_unrecognized_opts"; then
1236 case $enable_option_checking in
1237 no) ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001238 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001239 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1240 esac
1241fi
1242
1243# Check all directory arguments for consistency.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001244for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1245 datadir sysconfdir sharedstatedir localstatedir includedir \
1246 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1247 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001248do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001249 eval ac_val=\$$ac_var
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001250 # Remove trailing slashes.
1251 case $ac_val in
1252 */ )
1253 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1254 eval $ac_var=\$ac_val;;
1255 esac
1256 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001257 case $ac_val in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001258 [\\/$]* | ?:[\\/]* ) continue;;
1259 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001260 esac
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001261 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001262done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001263
Martin v. Löwis11437992002-04-12 09:54:03 +00001264# There might be people who depend on the old broken behavior: `$host'
1265# used to hold the argument of --host etc.
1266# FIXME: To remove some day.
1267build=$build_alias
1268host=$host_alias
1269target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001270
Martin v. Löwis11437992002-04-12 09:54:03 +00001271# FIXME: To remove some day.
1272if test "x$host_alias" != x; then
1273 if test "x$build_alias" = x; then
1274 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001275 elif test "x$build_alias" != "x$host_alias"; then
1276 cross_compiling=yes
1277 fi
1278fi
1279
1280ac_tool_prefix=
1281test -n "$host_alias" && ac_tool_prefix=$host_alias-
1282
1283test "$silent" = yes && exec 6>/dev/null
1284
Guido van Rossum627b2d71993-12-24 10:39:16 +00001285
Martin v. Löwiseba40652007-08-30 20:10:57 +00001286ac_pwd=`pwd` && test -n "$ac_pwd" &&
1287ac_ls_di=`ls -di .` &&
1288ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001289 as_fn_error $? "working directory cannot be determined"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001290test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001291 as_fn_error $? "pwd does not report name of working directory"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001292
1293
Guido van Rossum627b2d71993-12-24 10:39:16 +00001294# Find the source files, if location was not specified.
1295if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001296 ac_srcdir_defaulted=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +00001297 # Try the directory containing this script, then the parent directory.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001298 ac_confdir=`$as_dirname -- "$as_myself" ||
1299$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1300 X"$as_myself" : 'X\(//\)[^/]' \| \
1301 X"$as_myself" : 'X\(//\)$' \| \
1302 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1303$as_echo X"$as_myself" |
Martin v. Löwiseba40652007-08-30 20:10:57 +00001304 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1305 s//\1/
1306 q
1307 }
1308 /^X\(\/\/\)[^/].*/{
1309 s//\1/
1310 q
1311 }
1312 /^X\(\/\/\)$/{
1313 s//\1/
1314 q
1315 }
1316 /^X\(\/\).*/{
1317 s//\1/
1318 q
1319 }
1320 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001321 srcdir=$ac_confdir
Martin v. Löwiseba40652007-08-30 20:10:57 +00001322 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001323 srcdir=..
1324 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001325else
1326 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001327fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001328if test ! -r "$srcdir/$ac_unique_file"; then
1329 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001330 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Brett Cannon19fab762007-06-02 03:02:29 +00001331fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001332ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1333ac_abs_confdir=`(
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001334 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001335 pwd)`
1336# When building in place, set srcdir=.
1337if test "$ac_abs_confdir" = "$ac_pwd"; then
1338 srcdir=.
1339fi
1340# Remove unnecessary trailing slashes from srcdir.
1341# Double slashes in file names in object file debugging info
1342# mess up M-x gdb in Emacs.
1343case $srcdir in
1344*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1345esac
1346for ac_var in $ac_precious_vars; do
1347 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1348 eval ac_env_${ac_var}_value=\$${ac_var}
1349 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1350 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1351done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001352
Martin v. Löwis11437992002-04-12 09:54:03 +00001353#
1354# Report the --help message.
1355#
1356if test "$ac_init_help" = "long"; then
1357 # Omit some internal or obsolete options to make the list less imposing.
1358 # This message is too long to be a string in the A/UX 3.1 sh.
1359 cat <<_ACEOF
Martin v. Löwis174440b2008-10-03 08:59:41 +00001360\`configure' configures python 2.7 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001361
1362Usage: $0 [OPTION]... [VAR=VALUE]...
1363
1364To assign environment variables (e.g., CC, CFLAGS...), specify them as
1365VAR=VALUE. See below for descriptions of some of the useful variables.
1366
1367Defaults for the options are specified in brackets.
1368
1369Configuration:
1370 -h, --help display this help and exit
1371 --help=short display options specific to this package
1372 --help=recursive display the short help of all the included packages
1373 -V, --version display version information and exit
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001374 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001375 --cache-file=FILE cache test results in FILE [disabled]
1376 -C, --config-cache alias for \`--cache-file=config.cache'
1377 -n, --no-create do not create output files
1378 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1379
Martin v. Löwis11437992002-04-12 09:54:03 +00001380Installation directories:
1381 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001382 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001383 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001384 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001385
1386By default, \`make install' will install all the files in
1387\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1388an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1389for instance \`--prefix=\$HOME'.
1390
1391For better control, use the options below.
1392
1393Fine tuning of the installation directories:
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001394 --bindir=DIR user executables [EPREFIX/bin]
1395 --sbindir=DIR system admin executables [EPREFIX/sbin]
1396 --libexecdir=DIR program executables [EPREFIX/libexec]
1397 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1398 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1399 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1400 --libdir=DIR object code libraries [EPREFIX/lib]
1401 --includedir=DIR C header files [PREFIX/include]
1402 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1403 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1404 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1405 --infodir=DIR info documentation [DATAROOTDIR/info]
1406 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1407 --mandir=DIR man documentation [DATAROOTDIR/man]
1408 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1409 --htmldir=DIR html documentation [DOCDIR]
1410 --dvidir=DIR dvi documentation [DOCDIR]
1411 --pdfdir=DIR pdf documentation [DOCDIR]
1412 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001413_ACEOF
1414
1415 cat <<\_ACEOF
doko@python.orgd65e2ba2013-01-31 23:52:03 +01001416
1417System types:
1418 --build=BUILD configure for building on BUILD [guessed]
1419 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001420_ACEOF
1421fi
1422
1423if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001424 case $ac_init_help in
Martin v. Löwis174440b2008-10-03 08:59:41 +00001425 short | recursive ) echo "Configuration of python 2.7:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001426 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001427 cat <<\_ACEOF
1428
1429Optional Features:
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001430 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001431 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1432 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Brett Cannon91a1dec2008-02-13 19:15:44 +00001433 --enable-universalsdk[=SDKDIR]
Brett Cannon9a8bb0e2008-02-03 02:07:55 +00001434 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001435 --enable-framework[=INSTALLDIR]
1436 Build (MacOSX|Darwin) framework
1437 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001438 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001439 --enable-toolbox-glue disable/enable MacOSX glue code for extensions
1440 --enable-ipv6 Enable ipv6 (with ipv4) support
1441 --disable-ipv6 Disable ipv6 support
Mark Dickinsonefc82f72009-03-20 15:51:55 +00001442 --enable-big-digits[=BITS]
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001443 use big digits for Python longs [[BITS=30]]
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001444 --enable-unicode[=ucs[24]]
Benjamin Peterson66556b02010-05-25 02:23:32 +00001445 Enable Unicode strings (default is ucs2)
Martin v. Löwis11437992002-04-12 09:54:03 +00001446
1447Optional Packages:
1448 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1449 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001450 --with-universal-archs=ARCH
1451 select architectures for universal build ("32-bit",
Ronald Oussoren23d92532009-09-07 06:12:00 +00001452 "64-bit", "3-way", "intel" or "all")
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001453 --with-framework-name=FRAMEWORK
1454 specify an alternate name of the framework built
1455 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001456 --without-gcc never use gcc
Martin v. Löwis0f48d982006-04-14 14:34:26 +00001457 --with-cxx-main=<compiler>
1458 compile main() and link python executable with C++
1459 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001460 --with-suffix=.exe set executable suffix
1461 --with-pydebug build with Py_DEBUG defined
1462 --with-libs='lib1 ...' link against additional libs
Benjamin Peterson2c196742009-12-31 03:17:18 +00001463 --with-system-expat build pyexpat module using an installed expat
1464 library
Martin v. Löwis9176fc12006-04-11 11:12:43 +00001465 --with-system-ffi build _ctypes module using an installed ffi library
Ned Deilya2a9f572013-10-25 00:30:10 -07001466 --with-tcltk-includes='-I...'
1467 override search for Tcl and Tk include files
1468 --with-tcltk-libs='-L...'
1469 override search for Tcl and Tk libs
Benjamin Peterson867475c2009-04-29 20:36:25 +00001470 --with-dbmliborder=db1:db2:...
1471 order to check db backends for dbm. Valid value is a
1472 colon separated string with the backend names
1473 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001474 --with-signal-module disable/enable signal module
1475 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1476 --with(out)-threads[=DIRECTORY]
1477 disable/enable thread support
1478 --with(out)-thread[=DIRECTORY]
1479 deprecated; use --with(out)-threads
1480 --with-pth use GNU pth threading libraries
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001481 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001482 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001483 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00001484 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001485 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001486 --with-fpectl enable SIGFPE catching
1487 --with-libm=STRING math library
1488 --with-libc=STRING C library
Martin v. Löwis11437992002-04-12 09:54:03 +00001489
1490Some influential environment variables:
1491 CC C compiler command
1492 CFLAGS C compiler flags
1493 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1494 nonstandard directory <lib dir>
Martin v. Löwiseba40652007-08-30 20:10:57 +00001495 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001496 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Martin v. Löwiseba40652007-08-30 20:10:57 +00001497 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001498 CPP C preprocessor
1499
1500Use these variables to override the choices made by `configure' or to help
1501it to find libraries and programs with nonstandard names/locations.
1502
Georg Brandl464432d2009-05-20 18:24:08 +00001503Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001504_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001505ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001506fi
1507
1508if test "$ac_init_help" = "recursive"; then
1509 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001510 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001511 test -d "$ac_dir" ||
1512 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1513 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001514 ac_builddir=.
1515
Martin v. Löwiseba40652007-08-30 20:10:57 +00001516case "$ac_dir" in
1517.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1518*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001519 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001520 # A ".." for each directory in $ac_dir_suffix.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001521 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001522 case $ac_top_builddir_sub in
1523 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1524 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1525 esac ;;
1526esac
1527ac_abs_top_builddir=$ac_pwd
1528ac_abs_builddir=$ac_pwd$ac_dir_suffix
1529# for backward compatibility:
1530ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001531
1532case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001533 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001534 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001535 ac_top_srcdir=$ac_top_builddir_sub
1536 ac_abs_top_srcdir=$ac_pwd ;;
1537 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001538 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001539 ac_top_srcdir=$srcdir
1540 ac_abs_top_srcdir=$srcdir ;;
1541 *) # Relative name.
1542 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1543 ac_top_srcdir=$ac_top_build_prefix$srcdir
1544 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001545esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001546ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001547
Martin v. Löwiseba40652007-08-30 20:10:57 +00001548 cd "$ac_dir" || { ac_status=$?; continue; }
1549 # Check for guested configure.
1550 if test -f "$ac_srcdir/configure.gnu"; then
1551 echo &&
1552 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1553 elif test -f "$ac_srcdir/configure"; then
1554 echo &&
1555 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001556 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001557 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001558 fi || ac_status=$?
1559 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001560 done
1561fi
1562
Martin v. Löwiseba40652007-08-30 20:10:57 +00001563test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001564if $ac_init_version; then
1565 cat <<\_ACEOF
Martin v. Löwis174440b2008-10-03 08:59:41 +00001566python configure 2.7
Charles-François Natalibe2b9072013-01-08 19:47:00 +01001567generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001568
Charles-François Natalibe2b9072013-01-08 19:47:00 +01001569Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001570This configure script is free software; the Free Software Foundation
1571gives unlimited permission to copy, distribute and modify it.
1572_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001573 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001574fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001575
1576## ------------------------ ##
1577## Autoconf initialization. ##
1578## ------------------------ ##
1579
1580# ac_fn_c_try_compile LINENO
1581# --------------------------
1582# Try to compile conftest.$ac_ext, and return whether this succeeded.
1583ac_fn_c_try_compile ()
1584{
1585 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1586 rm -f conftest.$ac_objext
1587 if { { ac_try="$ac_compile"
1588case "(($ac_try" in
1589 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1590 *) ac_try_echo=$ac_try;;
1591esac
1592eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1593$as_echo "$ac_try_echo"; } >&5
1594 (eval "$ac_compile") 2>conftest.err
1595 ac_status=$?
1596 if test -s conftest.err; then
1597 grep -v '^ *+' conftest.err >conftest.er1
1598 cat conftest.er1 >&5
1599 mv -f conftest.er1 conftest.err
1600 fi
1601 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1602 test $ac_status = 0; } && {
1603 test -z "$ac_c_werror_flag" ||
1604 test ! -s conftest.err
1605 } && test -s conftest.$ac_objext; then :
1606 ac_retval=0
1607else
1608 $as_echo "$as_me: failed program was:" >&5
1609sed 's/^/| /' conftest.$ac_ext >&5
1610
1611 ac_retval=1
1612fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01001613 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001614 as_fn_set_status $ac_retval
1615
1616} # ac_fn_c_try_compile
1617
1618# ac_fn_c_try_cpp LINENO
1619# ----------------------
1620# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1621ac_fn_c_try_cpp ()
1622{
1623 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1624 if { { ac_try="$ac_cpp conftest.$ac_ext"
1625case "(($ac_try" in
1626 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1627 *) ac_try_echo=$ac_try;;
1628esac
1629eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1630$as_echo "$ac_try_echo"; } >&5
1631 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1632 ac_status=$?
1633 if test -s conftest.err; then
1634 grep -v '^ *+' conftest.err >conftest.er1
1635 cat conftest.er1 >&5
1636 mv -f conftest.er1 conftest.err
1637 fi
1638 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001639 test $ac_status = 0; } > conftest.i && {
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001640 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1641 test ! -s conftest.err
1642 }; then :
1643 ac_retval=0
1644else
1645 $as_echo "$as_me: failed program was:" >&5
1646sed 's/^/| /' conftest.$ac_ext >&5
1647
1648 ac_retval=1
1649fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01001650 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001651 as_fn_set_status $ac_retval
1652
1653} # ac_fn_c_try_cpp
1654
1655# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1656# -------------------------------------------------------
1657# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1658# the include files in INCLUDES and setting the cache variable VAR
1659# accordingly.
1660ac_fn_c_check_header_mongrel ()
1661{
1662 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Matthias Klose3cef2a92012-03-14 23:39:33 +01001663 if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001664 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1665$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001666if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001667 $as_echo_n "(cached) " >&6
1668fi
1669eval ac_res=\$$3
1670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1671$as_echo "$ac_res" >&6; }
1672else
1673 # Is the header compilable?
1674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1675$as_echo_n "checking $2 usability... " >&6; }
1676cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1677/* end confdefs.h. */
1678$4
1679#include <$2>
1680_ACEOF
1681if ac_fn_c_try_compile "$LINENO"; then :
1682 ac_header_compiler=yes
1683else
1684 ac_header_compiler=no
1685fi
1686rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1687{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1688$as_echo "$ac_header_compiler" >&6; }
1689
1690# Is the header present?
1691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1692$as_echo_n "checking $2 presence... " >&6; }
1693cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1694/* end confdefs.h. */
1695#include <$2>
1696_ACEOF
1697if ac_fn_c_try_cpp "$LINENO"; then :
1698 ac_header_preproc=yes
1699else
1700 ac_header_preproc=no
1701fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001702rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001703{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1704$as_echo "$ac_header_preproc" >&6; }
1705
1706# So? What about this header?
1707case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1708 yes:no: )
1709 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1710$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1711 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1712$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1713 ;;
1714 no:yes:* )
1715 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1716$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1717 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1718$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1719 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1720$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1721 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1722$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1723 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1724$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001725( $as_echo "## -------------------------------------- ##
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001726## Report this to http://bugs.python.org/ ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001727## -------------------------------------- ##"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001728 ) | sed "s/^/$as_me: WARNING: /" >&2
1729 ;;
1730esac
1731 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1732$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001733if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001734 $as_echo_n "(cached) " >&6
1735else
1736 eval "$3=\$ac_header_compiler"
1737fi
1738eval ac_res=\$$3
1739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1740$as_echo "$ac_res" >&6; }
1741fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01001742 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001743
1744} # ac_fn_c_check_header_mongrel
1745
1746# ac_fn_c_try_run LINENO
1747# ----------------------
1748# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1749# that executables *can* be run.
1750ac_fn_c_try_run ()
1751{
1752 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1753 if { { ac_try="$ac_link"
1754case "(($ac_try" in
1755 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1756 *) ac_try_echo=$ac_try;;
1757esac
1758eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1759$as_echo "$ac_try_echo"; } >&5
1760 (eval "$ac_link") 2>&5
1761 ac_status=$?
1762 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1763 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1764 { { case "(($ac_try" in
1765 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1766 *) ac_try_echo=$ac_try;;
1767esac
1768eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1769$as_echo "$ac_try_echo"; } >&5
1770 (eval "$ac_try") 2>&5
1771 ac_status=$?
1772 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1773 test $ac_status = 0; }; }; then :
1774 ac_retval=0
1775else
1776 $as_echo "$as_me: program exited with status $ac_status" >&5
1777 $as_echo "$as_me: failed program was:" >&5
1778sed 's/^/| /' conftest.$ac_ext >&5
1779
1780 ac_retval=$ac_status
1781fi
1782 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Matthias Klose3cef2a92012-03-14 23:39:33 +01001783 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001784 as_fn_set_status $ac_retval
1785
1786} # ac_fn_c_try_run
1787
1788# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1789# -------------------------------------------------------
1790# Tests whether HEADER exists and can be compiled using the include files in
1791# INCLUDES, setting the cache variable VAR accordingly.
1792ac_fn_c_check_header_compile ()
1793{
1794 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1795 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1796$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001797if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001798 $as_echo_n "(cached) " >&6
1799else
1800 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1801/* end confdefs.h. */
1802$4
1803#include <$2>
1804_ACEOF
1805if ac_fn_c_try_compile "$LINENO"; then :
1806 eval "$3=yes"
1807else
1808 eval "$3=no"
1809fi
1810rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1811fi
1812eval ac_res=\$$3
1813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1814$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001815 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001816
1817} # ac_fn_c_check_header_compile
1818
1819# ac_fn_c_try_link LINENO
1820# -----------------------
1821# Try to link conftest.$ac_ext, and return whether this succeeded.
1822ac_fn_c_try_link ()
1823{
1824 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1825 rm -f conftest.$ac_objext conftest$ac_exeext
1826 if { { ac_try="$ac_link"
1827case "(($ac_try" in
1828 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1829 *) ac_try_echo=$ac_try;;
1830esac
1831eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1832$as_echo "$ac_try_echo"; } >&5
1833 (eval "$ac_link") 2>conftest.err
1834 ac_status=$?
1835 if test -s conftest.err; then
1836 grep -v '^ *+' conftest.err >conftest.er1
1837 cat conftest.er1 >&5
1838 mv -f conftest.er1 conftest.err
1839 fi
1840 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1841 test $ac_status = 0; } && {
1842 test -z "$ac_c_werror_flag" ||
1843 test ! -s conftest.err
1844 } && test -s conftest$ac_exeext && {
1845 test "$cross_compiling" = yes ||
Charles-François Natalibe2b9072013-01-08 19:47:00 +01001846 test -x conftest$ac_exeext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001847 }; then :
1848 ac_retval=0
1849else
1850 $as_echo "$as_me: failed program was:" >&5
1851sed 's/^/| /' conftest.$ac_ext >&5
1852
1853 ac_retval=1
1854fi
1855 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1856 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1857 # interfere with the next link command; also delete a directory that is
1858 # left behind by Apple's compiler. We do this before executing the actions.
1859 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Matthias Klose3cef2a92012-03-14 23:39:33 +01001860 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001861 as_fn_set_status $ac_retval
1862
1863} # ac_fn_c_try_link
1864
1865# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1866# -------------------------------------------
1867# Tests whether TYPE exists after having included INCLUDES, setting cache
1868# variable VAR accordingly.
1869ac_fn_c_check_type ()
1870{
1871 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1872 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1873$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001874if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001875 $as_echo_n "(cached) " >&6
1876else
1877 eval "$3=no"
1878 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1879/* end confdefs.h. */
1880$4
1881int
1882main ()
1883{
1884if (sizeof ($2))
1885 return 0;
1886 ;
1887 return 0;
1888}
1889_ACEOF
1890if ac_fn_c_try_compile "$LINENO"; then :
1891 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1892/* end confdefs.h. */
1893$4
1894int
1895main ()
1896{
1897if (sizeof (($2)))
1898 return 0;
1899 ;
1900 return 0;
1901}
1902_ACEOF
1903if ac_fn_c_try_compile "$LINENO"; then :
1904
1905else
1906 eval "$3=yes"
1907fi
1908rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1909fi
1910rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1911fi
1912eval ac_res=\$$3
1913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1914$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001915 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001916
1917} # ac_fn_c_check_type
1918
1919# ac_fn_c_find_uintX_t LINENO BITS VAR
1920# ------------------------------------
1921# Finds an unsigned integer type with width BITS, setting cache variable VAR
1922# accordingly.
1923ac_fn_c_find_uintX_t ()
1924{
1925 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1926 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1927$as_echo_n "checking for uint$2_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001928if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001929 $as_echo_n "(cached) " >&6
1930else
1931 eval "$3=no"
1932 # Order is important - never check a type that is potentially smaller
1933 # than half of the expected target width.
1934 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1935 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1936 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1937/* end confdefs.h. */
1938$ac_includes_default
1939int
1940main ()
1941{
1942static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01001943test_array [0] = 0;
1944return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001945
1946 ;
1947 return 0;
1948}
1949_ACEOF
1950if ac_fn_c_try_compile "$LINENO"; then :
1951 case $ac_type in #(
1952 uint$2_t) :
1953 eval "$3=yes" ;; #(
1954 *) :
1955 eval "$3=\$ac_type" ;;
1956esac
1957fi
1958rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001959 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001960
1961else
1962 break
1963fi
1964 done
1965fi
1966eval ac_res=\$$3
1967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1968$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001969 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001970
1971} # ac_fn_c_find_uintX_t
1972
1973# ac_fn_c_find_intX_t LINENO BITS VAR
1974# -----------------------------------
1975# Finds a signed integer type with width BITS, setting cache variable VAR
1976# accordingly.
1977ac_fn_c_find_intX_t ()
1978{
1979 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1980 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
1981$as_echo_n "checking for int$2_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001982if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001983 $as_echo_n "(cached) " >&6
1984else
1985 eval "$3=no"
1986 # Order is important - never check a type that is potentially smaller
1987 # than half of the expected target width.
1988 for ac_type in int$2_t 'int' 'long int' \
1989 'long long int' 'short int' 'signed char'; do
1990 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1991/* end confdefs.h. */
1992$ac_includes_default
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001993 enum { N = $2 / 2 - 1 };
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001994int
1995main ()
1996{
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001997static 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 +01001998test_array [0] = 0;
1999return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002000
2001 ;
2002 return 0;
2003}
2004_ACEOF
2005if ac_fn_c_try_compile "$LINENO"; then :
2006 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2007/* end confdefs.h. */
2008$ac_includes_default
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002009 enum { N = $2 / 2 - 1 };
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002010int
2011main ()
2012{
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002013static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002014 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002015test_array [0] = 0;
2016return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002017
2018 ;
2019 return 0;
2020}
2021_ACEOF
2022if ac_fn_c_try_compile "$LINENO"; then :
2023
2024else
2025 case $ac_type in #(
2026 int$2_t) :
2027 eval "$3=yes" ;; #(
2028 *) :
2029 eval "$3=\$ac_type" ;;
2030esac
2031fi
2032rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2033fi
2034rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002035 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002036
2037else
2038 break
2039fi
2040 done
2041fi
2042eval ac_res=\$$3
2043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2044$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002045 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002046
2047} # ac_fn_c_find_intX_t
2048
2049# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2050# --------------------------------------------
2051# Tries to find the compile-time value of EXPR in a program that includes
2052# INCLUDES, setting VAR accordingly. Returns whether the value could be
2053# computed
2054ac_fn_c_compute_int ()
2055{
2056 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2057 if test "$cross_compiling" = yes; then
2058 # Depending upon the size, compute the lo and hi bounds.
2059cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2060/* end confdefs.h. */
2061$4
2062int
2063main ()
2064{
2065static int test_array [1 - 2 * !(($2) >= 0)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002066test_array [0] = 0;
2067return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002068
2069 ;
2070 return 0;
2071}
2072_ACEOF
2073if ac_fn_c_try_compile "$LINENO"; then :
2074 ac_lo=0 ac_mid=0
2075 while :; do
2076 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2077/* end confdefs.h. */
2078$4
2079int
2080main ()
2081{
2082static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002083test_array [0] = 0;
2084return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002085
2086 ;
2087 return 0;
2088}
2089_ACEOF
2090if ac_fn_c_try_compile "$LINENO"; then :
2091 ac_hi=$ac_mid; break
2092else
2093 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2094 if test $ac_lo -le $ac_mid; then
2095 ac_lo= ac_hi=
2096 break
2097 fi
2098 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2099fi
2100rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2101 done
2102else
2103 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2104/* end confdefs.h. */
2105$4
2106int
2107main ()
2108{
2109static int test_array [1 - 2 * !(($2) < 0)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002110test_array [0] = 0;
2111return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002112
2113 ;
2114 return 0;
2115}
2116_ACEOF
2117if ac_fn_c_try_compile "$LINENO"; then :
2118 ac_hi=-1 ac_mid=-1
2119 while :; do
2120 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2121/* end confdefs.h. */
2122$4
2123int
2124main ()
2125{
2126static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002127test_array [0] = 0;
2128return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002129
2130 ;
2131 return 0;
2132}
2133_ACEOF
2134if ac_fn_c_try_compile "$LINENO"; then :
2135 ac_lo=$ac_mid; break
2136else
2137 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2138 if test $ac_mid -le $ac_hi; then
2139 ac_lo= ac_hi=
2140 break
2141 fi
2142 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2143fi
2144rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2145 done
2146else
2147 ac_lo= ac_hi=
2148fi
2149rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2150fi
2151rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2152# Binary search between lo and hi bounds.
2153while test "x$ac_lo" != "x$ac_hi"; do
2154 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2155 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2156/* end confdefs.h. */
2157$4
2158int
2159main ()
2160{
2161static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002162test_array [0] = 0;
2163return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002164
2165 ;
2166 return 0;
2167}
2168_ACEOF
2169if ac_fn_c_try_compile "$LINENO"; then :
2170 ac_hi=$ac_mid
2171else
2172 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2173fi
2174rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2175done
2176case $ac_lo in #((
2177?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2178'') ac_retval=1 ;;
2179esac
2180 else
2181 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2182/* end confdefs.h. */
2183$4
2184static long int longval () { return $2; }
2185static unsigned long int ulongval () { return $2; }
2186#include <stdio.h>
2187#include <stdlib.h>
2188int
2189main ()
2190{
2191
2192 FILE *f = fopen ("conftest.val", "w");
2193 if (! f)
2194 return 1;
2195 if (($2) < 0)
2196 {
2197 long int i = longval ();
2198 if (i != ($2))
2199 return 1;
2200 fprintf (f, "%ld", i);
2201 }
2202 else
2203 {
2204 unsigned long int i = ulongval ();
2205 if (i != ($2))
2206 return 1;
2207 fprintf (f, "%lu", i);
2208 }
2209 /* Do not output a trailing newline, as this causes \r\n confusion
2210 on some platforms. */
2211 return ferror (f) || fclose (f) != 0;
2212
2213 ;
2214 return 0;
2215}
2216_ACEOF
2217if ac_fn_c_try_run "$LINENO"; then :
2218 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2219else
2220 ac_retval=1
2221fi
2222rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2223 conftest.$ac_objext conftest.beam conftest.$ac_ext
2224rm -f conftest.val
2225
2226 fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01002227 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002228 as_fn_set_status $ac_retval
2229
2230} # ac_fn_c_compute_int
2231
2232# ac_fn_c_check_func LINENO FUNC VAR
2233# ----------------------------------
2234# Tests whether FUNC exists, setting the cache variable VAR accordingly
2235ac_fn_c_check_func ()
2236{
2237 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2238 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2239$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002240if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002241 $as_echo_n "(cached) " >&6
2242else
2243 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2244/* end confdefs.h. */
2245/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2246 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2247#define $2 innocuous_$2
2248
2249/* System header to define __stub macros and hopefully few prototypes,
2250 which can conflict with char $2 (); below.
2251 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2252 <limits.h> exists even on freestanding compilers. */
2253
2254#ifdef __STDC__
2255# include <limits.h>
2256#else
2257# include <assert.h>
2258#endif
2259
2260#undef $2
2261
2262/* Override any GCC internal prototype to avoid an error.
2263 Use char because int might match the return type of a GCC
2264 builtin and then its argument prototype would still apply. */
2265#ifdef __cplusplus
2266extern "C"
2267#endif
2268char $2 ();
2269/* The GNU C library defines this for functions which it implements
2270 to always fail with ENOSYS. Some functions are actually named
2271 something starting with __ and the normal name is an alias. */
2272#if defined __stub_$2 || defined __stub___$2
2273choke me
2274#endif
2275
2276int
2277main ()
2278{
2279return $2 ();
2280 ;
2281 return 0;
2282}
2283_ACEOF
2284if ac_fn_c_try_link "$LINENO"; then :
2285 eval "$3=yes"
2286else
2287 eval "$3=no"
2288fi
2289rm -f core conftest.err conftest.$ac_objext \
2290 conftest$ac_exeext conftest.$ac_ext
2291fi
2292eval ac_res=\$$3
2293 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2294$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002295 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002296
2297} # ac_fn_c_check_func
2298
2299# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2300# ----------------------------------------------------
2301# Tries to find if the field MEMBER exists in type AGGR, after including
2302# INCLUDES, setting cache variable VAR accordingly.
2303ac_fn_c_check_member ()
2304{
2305 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2306 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2307$as_echo_n "checking for $2.$3... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002308if eval \${$4+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002309 $as_echo_n "(cached) " >&6
2310else
2311 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2312/* end confdefs.h. */
2313$5
2314int
2315main ()
2316{
2317static $2 ac_aggr;
2318if (ac_aggr.$3)
2319return 0;
2320 ;
2321 return 0;
2322}
2323_ACEOF
2324if ac_fn_c_try_compile "$LINENO"; then :
2325 eval "$4=yes"
2326else
2327 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2328/* end confdefs.h. */
2329$5
2330int
2331main ()
2332{
2333static $2 ac_aggr;
2334if (sizeof ac_aggr.$3)
2335return 0;
2336 ;
2337 return 0;
2338}
2339_ACEOF
2340if ac_fn_c_try_compile "$LINENO"; then :
2341 eval "$4=yes"
2342else
2343 eval "$4=no"
2344fi
2345rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2346fi
2347rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2348fi
2349eval ac_res=\$$4
2350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2351$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002352 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002353
2354} # ac_fn_c_check_member
2355
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002356# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2357# ---------------------------------------------
2358# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2359# accordingly.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002360ac_fn_c_check_decl ()
2361{
2362 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002363 as_decl_name=`echo $2|sed 's/ *(.*//'`
2364 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2365 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2366$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002367if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002368 $as_echo_n "(cached) " >&6
2369else
2370 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2371/* end confdefs.h. */
2372$4
2373int
2374main ()
2375{
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002376#ifndef $as_decl_name
2377#ifdef __cplusplus
2378 (void) $as_decl_use;
2379#else
2380 (void) $as_decl_name;
2381#endif
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002382#endif
2383
2384 ;
2385 return 0;
2386}
2387_ACEOF
2388if ac_fn_c_try_compile "$LINENO"; then :
2389 eval "$3=yes"
2390else
2391 eval "$3=no"
2392fi
2393rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2394fi
2395eval ac_res=\$$3
2396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2397$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002398 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002399
2400} # ac_fn_c_check_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +00002401cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002402This file contains any messages produced by compilers while
2403running configure, to aid debugging if configure makes a mistake.
2404
Martin v. Löwis174440b2008-10-03 08:59:41 +00002405It was created by python $as_me 2.7, which was
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002406generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002407
2408 $ $0 $@
2409
2410_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00002411exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002412{
2413cat <<_ASUNAME
2414## --------- ##
2415## Platform. ##
2416## --------- ##
2417
2418hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2419uname -m = `(uname -m) 2>/dev/null || echo unknown`
2420uname -r = `(uname -r) 2>/dev/null || echo unknown`
2421uname -s = `(uname -s) 2>/dev/null || echo unknown`
2422uname -v = `(uname -v) 2>/dev/null || echo unknown`
2423
2424/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2425/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2426
2427/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2428/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2429/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Martin v. Löwiseba40652007-08-30 20:10:57 +00002430/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002431/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2432/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2433/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2434
2435_ASUNAME
2436
2437as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2438for as_dir in $PATH
2439do
2440 IFS=$as_save_IFS
2441 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002442 $as_echo "PATH: $as_dir"
2443 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002444IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002445
2446} >&5
2447
2448cat >&5 <<_ACEOF
2449
2450
2451## ----------- ##
2452## Core tests. ##
2453## ----------- ##
2454
2455_ACEOF
2456
2457
2458# Keep a trace of the command line.
2459# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002460# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002461# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002462# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002463ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002464ac_configure_args0=
2465ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002466ac_must_keep_next=false
2467for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002468do
Skip Montanaro6dead952003-09-25 14:50:04 +00002469 for ac_arg
2470 do
2471 case $ac_arg in
2472 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2473 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2474 | -silent | --silent | --silen | --sile | --sil)
2475 continue ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002476 *\'*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002477 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002478 esac
2479 case $ac_pass in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002480 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002481 2)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002482 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002483 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002484 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002485 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002486 case $ac_arg in
2487 *=* | --config-cache | -C | -disable-* | --disable-* \
2488 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2489 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2490 | -with-* | --with-* | -without-* | --without-* | --x)
2491 case "$ac_configure_args0 " in
2492 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2493 esac
2494 ;;
2495 -* ) ac_must_keep_next=true ;;
2496 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002497 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002498 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002499 ;;
2500 esac
2501 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002502done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002503{ ac_configure_args0=; unset ac_configure_args0;}
2504{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002505
2506# When interrupted or exit'd, cleanup temporary files, and complete
2507# config.log. We remove comments because anyway the quotes in there
2508# would cause problems or look ugly.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002509# WARNING: Use '\'' to represent an apostrophe within the trap.
2510# 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 +00002511trap 'exit_status=$?
2512 # Save into config.log some information that might help in debugging.
2513 {
2514 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002515
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002516 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002517## Cache variables. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002518## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002519 echo
2520 # The following way of writing the cache mishandles newlines in values,
Martin v. Löwiseba40652007-08-30 20:10:57 +00002521(
2522 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2523 eval ac_val=\$$ac_var
2524 case $ac_val in #(
2525 *${as_nl}*)
2526 case $ac_var in #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002527 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2528$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002529 esac
2530 case $ac_var in #(
2531 _ | IFS | as_nl) ;; #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002532 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2533 *) { eval $ac_var=; unset $ac_var;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002534 esac ;;
2535 esac
2536 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002537 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +00002538 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2539 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002540 sed -n \
Martin v. Löwiseba40652007-08-30 20:10:57 +00002541 "s/'\''/'\''\\\\'\'''\''/g;
2542 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2543 ;; #(
Skip Montanaro89e975f2007-08-22 19:05:21 +00002544 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00002545 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaro89e975f2007-08-22 19:05:21 +00002546 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002547 esac |
2548 sort
2549)
Martin v. Löwis11437992002-04-12 09:54:03 +00002550 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002551
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002552 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002553## Output variables. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002554## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002555 echo
2556 for ac_var in $ac_subst_vars
2557 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002558 eval ac_val=\$$ac_var
2559 case $ac_val in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002560 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002561 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002562 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002563 done | sort
2564 echo
2565
2566 if test -n "$ac_subst_files"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002567 $as_echo "## ------------------- ##
Martin v. Löwiseba40652007-08-30 20:10:57 +00002568## File substitutions. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002569## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002570 echo
2571 for ac_var in $ac_subst_files
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 fi
2581
Martin v. Löwis11437992002-04-12 09:54:03 +00002582 if test -s confdefs.h; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002583 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002584## confdefs.h. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002585## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002586 echo
Martin v. Löwiseba40652007-08-30 20:10:57 +00002587 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002588 echo
2589 fi
2590 test "$ac_signal" != 0 &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002591 $as_echo "$as_me: caught signal $ac_signal"
2592 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002593 } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002594 rm -f core *.core core.conftest.* &&
2595 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002596 exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +00002597' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002598for ac_signal in 1 2 13 15; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002599 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002600done
2601ac_signal=0
2602
2603# confdefs.h avoids OS command line length limits that DEFS can exceed.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002604rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002605
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002606$as_echo "/* confdefs.h */" > confdefs.h
2607
Martin v. Löwis11437992002-04-12 09:54:03 +00002608# Predefined preprocessor variables.
2609
2610cat >>confdefs.h <<_ACEOF
2611#define PACKAGE_NAME "$PACKAGE_NAME"
2612_ACEOF
2613
Martin v. Löwis11437992002-04-12 09:54:03 +00002614cat >>confdefs.h <<_ACEOF
2615#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2616_ACEOF
2617
Martin v. Löwis11437992002-04-12 09:54:03 +00002618cat >>confdefs.h <<_ACEOF
2619#define PACKAGE_VERSION "$PACKAGE_VERSION"
2620_ACEOF
2621
Martin v. Löwis11437992002-04-12 09:54:03 +00002622cat >>confdefs.h <<_ACEOF
2623#define PACKAGE_STRING "$PACKAGE_STRING"
2624_ACEOF
2625
Martin v. Löwis11437992002-04-12 09:54:03 +00002626cat >>confdefs.h <<_ACEOF
2627#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2628_ACEOF
2629
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002630cat >>confdefs.h <<_ACEOF
2631#define PACKAGE_URL "$PACKAGE_URL"
2632_ACEOF
2633
Martin v. Löwis11437992002-04-12 09:54:03 +00002634
2635# Let the site file select an alternate cache file if it wants to.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002636# Prefer an explicitly selected file to automatically selected ones.
2637ac_site_file1=NONE
2638ac_site_file2=NONE
Martin v. Löwiseba40652007-08-30 20:10:57 +00002639if test -n "$CONFIG_SITE"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002640 # We do not want a PATH search for config.site.
2641 case $CONFIG_SITE in #((
2642 -*) ac_site_file1=./$CONFIG_SITE;;
2643 */*) ac_site_file1=$CONFIG_SITE;;
2644 *) ac_site_file1=./$CONFIG_SITE;;
2645 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00002646elif test "x$prefix" != xNONE; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002647 ac_site_file1=$prefix/share/config.site
2648 ac_site_file2=$prefix/etc/config.site
Martin v. Löwiseba40652007-08-30 20:10:57 +00002649else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002650 ac_site_file1=$ac_default_prefix/share/config.site
2651 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002652fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002653for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Martin v. Löwiseba40652007-08-30 20:10:57 +00002654do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002655 test "x$ac_site_file" = xNONE && continue
2656 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2657 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2658$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002659 sed 's/^/| /' "$ac_site_file" >&5
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002660 . "$ac_site_file" \
2661 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2662$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2663as_fn_error $? "failed to load site script $ac_site_file
Matthias Klose3cef2a92012-03-14 23:39:33 +01002664See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002665 fi
2666done
2667
2668if test -r "$cache_file"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002669 # Some versions of bash will fail to source /dev/null (special files
2670 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2671 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2672 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2673$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002674 case $cache_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00002675 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2676 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002677 esac
2678 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002679else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002680 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2681$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002682 >$cache_file
2683fi
2684
2685# Check that the precious variables saved in the cache have kept the same
2686# value.
2687ac_cache_corrupted=false
Martin v. Löwiseba40652007-08-30 20:10:57 +00002688for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002689 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2690 eval ac_new_set=\$ac_env_${ac_var}_set
Martin v. Löwiseba40652007-08-30 20:10:57 +00002691 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2692 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002693 case $ac_old_set,$ac_new_set in
2694 set,)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002695 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2696$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 +00002697 ac_cache_corrupted=: ;;
2698 ,set)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002699 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2700$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002701 ac_cache_corrupted=: ;;
2702 ,);;
2703 *)
2704 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002705 # differences in whitespace do not lead to failure.
2706 ac_old_val_w=`echo x $ac_old_val`
2707 ac_new_val_w=`echo x $ac_new_val`
2708 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2709 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2710$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2711 ac_cache_corrupted=:
2712 else
2713 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2714$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2715 eval $ac_var=\$ac_old_val
2716 fi
2717 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2718$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2719 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2720$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002721 fi;;
2722 esac
2723 # Pass precious variables to config.status.
2724 if test "$ac_new_set" = set; then
2725 case $ac_new_val in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002726 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002727 *) ac_arg=$ac_var=$ac_new_val ;;
2728 esac
2729 case " $ac_configure_args " in
2730 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002731 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002732 esac
2733 fi
2734done
2735if $ac_cache_corrupted; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002736 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2737$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2738 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2739$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002740 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002741fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002742## -------------------- ##
2743## Main body of script. ##
2744## -------------------- ##
Martin v. Löwiseba40652007-08-30 20:10:57 +00002745
Guido van Rossum7f43da71994-08-01 12:15:30 +00002746ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002747ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002748ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2749ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2750ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002751
Guido van Rossum627b2d71993-12-24 10:39:16 +00002752
Michael W. Hudson54241132001-12-07 15:38:26 +00002753
Martin v. Löwiseba40652007-08-30 20:10:57 +00002754ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002755
2756
doko@python.orgd65e2ba2013-01-31 23:52:03 +01002757ac_aux_dir=
2758for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2759 if test -f "$ac_dir/install-sh"; then
2760 ac_aux_dir=$ac_dir
2761 ac_install_sh="$ac_aux_dir/install-sh -c"
2762 break
2763 elif test -f "$ac_dir/install.sh"; then
2764 ac_aux_dir=$ac_dir
2765 ac_install_sh="$ac_aux_dir/install.sh -c"
2766 break
2767 elif test -f "$ac_dir/shtool"; then
2768 ac_aux_dir=$ac_dir
2769 ac_install_sh="$ac_aux_dir/shtool install -c"
2770 break
2771 fi
2772done
2773if test -z "$ac_aux_dir"; then
2774 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2775fi
2776
2777# These three variables are undocumented and unsupported,
2778# and are intended to be withdrawn in a future Autoconf release.
2779# They can cause serious problems if a builder's source tree is in a directory
2780# whose full name contains unusual characters.
2781ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2782ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2783ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2784
2785
2786# Make sure we can run config.sub.
2787$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2788 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2789
2790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2791$as_echo_n "checking build system type... " >&6; }
2792if ${ac_cv_build+:} false; then :
2793 $as_echo_n "(cached) " >&6
2794else
2795 ac_build_alias=$build_alias
2796test "x$ac_build_alias" = x &&
2797 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2798test "x$ac_build_alias" = x &&
2799 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2800ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2801 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2802
2803fi
2804{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2805$as_echo "$ac_cv_build" >&6; }
2806case $ac_cv_build in
2807*-*-*) ;;
2808*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2809esac
2810build=$ac_cv_build
2811ac_save_IFS=$IFS; IFS='-'
2812set x $ac_cv_build
2813shift
2814build_cpu=$1
2815build_vendor=$2
2816shift; shift
2817# Remember, the first character of IFS is used to create $*,
2818# except with old shells:
2819build_os=$*
2820IFS=$ac_save_IFS
2821case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2822
2823
2824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2825$as_echo_n "checking host system type... " >&6; }
2826if ${ac_cv_host+:} false; then :
2827 $as_echo_n "(cached) " >&6
2828else
2829 if test "x$host_alias" = x; then
2830 ac_cv_host=$ac_cv_build
2831else
2832 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2833 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2834fi
2835
2836fi
2837{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2838$as_echo "$ac_cv_host" >&6; }
2839case $ac_cv_host in
2840*-*-*) ;;
2841*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2842esac
2843host=$ac_cv_host
2844ac_save_IFS=$IFS; IFS='-'
2845set x $ac_cv_host
2846shift
2847host_cpu=$1
2848host_vendor=$2
2849shift; shift
2850# Remember, the first character of IFS is used to create $*,
2851# except with old shells:
2852host_os=$*
2853IFS=$ac_save_IFS
2854case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2855
2856
2857
2858
2859
2860if test "$cross_compiling" = yes; then
2861 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2862$as_echo_n "checking for python interpreter for cross build... " >&6; }
2863 if test -z "$PYTHON_FOR_BUILD"; then
2864 for interp in python$PACKAGE_VERSION python2 python; do
2865 which $interp >/dev/null 2>&1 || continue
2866 if $interp -c 'import sys;sys.exit(not (sys.version_info[:2] >= (2,7) and sys.version_info[0] < 3))'; then
2867 break
2868 fi
2869 interp=
2870 done
2871 if test x$interp = x; then
2872 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2873 fi
2874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2875$as_echo "$interp" >&6; }
2876 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
2877 fi
2878elif test "$cross_compiling" = maybe; then
2879 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
2880else
2881 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2882fi
2883
2884
Martin v. Löwis11437992002-04-12 09:54:03 +00002885
Georg Brandlbcd64a32009-03-31 21:45:18 +00002886if test "$prefix" != "/"; then
2887 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2888fi
2889
2890
Martin v. Löwis11437992002-04-12 09:54:03 +00002891
2892
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002893# We don't use PACKAGE_ variables, and they cause conflicts
2894# with other autoconf-based packages that include Python.h
2895grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2896rm confdefs.h
2897mv confdefs.h.new confdefs.h
2898
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002899
Martin v. Löwis174440b2008-10-03 08:59:41 +00002900VERSION=2.7
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002901
Martin v. Löwis1142de32002-03-29 16:28:31 +00002902
2903SOVERSION=1.0
2904
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002905# The later defininition of _XOPEN_SOURCE disables certain features
2906# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2907
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002908$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002909
2910
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002911# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2912# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2913# them.
2914
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002915$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002916
2917
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002918# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2919# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2920# them.
2921
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002922$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002923
2924
Martin v. Löwisd6320502004-08-12 13:45:08 +00002925# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2926# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2927
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002928$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002929
2930
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002931# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2932# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2933# them.
2934
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002935$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002936
2937
2938
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002939define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002940
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002941# Arguments passed to configure.
2942
2943CONFIG_ARGS="$ac_configure_args"
2944
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
2946$as_echo_n "checking for --enable-universalsdk... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002947# Check whether --enable-universalsdk was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002948if test "${enable_universalsdk+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00002949 enableval=$enable_universalsdk;
Ronald Oussoren988117f2006-04-29 11:31:35 +00002950 case $enableval in
2951 yes)
2952 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002953 if test ! -d "${enableval}"
2954 then
2955 enableval=/
2956 fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00002957 ;;
2958 esac
2959 case $enableval in
2960 no)
2961 UNIVERSALSDK=
2962 enable_universalsdk=
2963 ;;
2964 *)
2965 UNIVERSALSDK=$enableval
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002966 if test ! -d "${UNIVERSALSDK}"
2967 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002968 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002969 fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00002970 ;;
2971 esac
2972
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002973
Ronald Oussoren988117f2006-04-29 11:31:35 +00002974else
2975
2976 UNIVERSALSDK=
2977 enable_universalsdk=
2978
Martin v. Löwiseba40652007-08-30 20:10:57 +00002979fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00002980
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002981if test -n "${UNIVERSALSDK}"
2982then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
2984$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002985else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2987$as_echo "no" >&6; }
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002988fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00002989
Martin v. Löwiseba40652007-08-30 20:10:57 +00002990
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +00002991
Ned Deily8e60f6e2013-05-30 00:14:29 -07002992ARCH_RUN_32BIT=""
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +00002993
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002994UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren92919a62009-12-24 13:30:58 +00002995
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
2997$as_echo_n "checking for --with-universal-archs... " >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002998
2999# Check whether --with-universal-archs was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003000if test "${with_universal_archs+set}" = set; then :
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003001 withval=$with_universal_archs;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
3003$as_echo "$withval" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003004 UNIVERSAL_ARCHS="$withval"
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00003005 if test "${enable_universalsdk}" ; then
3006 :
3007 else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003008 as_fn_error $? "--with-universal-archs without --enable-universalsdk. See Mac/README" "$LINENO" 5
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00003009 fi
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003010
3011else
3012
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 32-bit" >&5
3014$as_echo "32-bit" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003015
3016fi
3017
3018
3019
3020
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003021
3022# Check whether --with-framework-name was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003023if test "${with_framework_name+set}" = set; then :
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003024 withval=$with_framework_name;
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00003025 if test "${enable_framework}"; then
3026 :
3027 else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003028 as_fn_error $? "--with-framework-name without --enable-framework. See Mac/README" "$LINENO" 5
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00003029 fi
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003030 PYTHONFRAMEWORK=${withval}
3031 PYTHONFRAMEWORKDIR=${withval}.framework
3032 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3033
3034else
3035
3036 PYTHONFRAMEWORK=Python
3037 PYTHONFRAMEWORKDIR=Python.framework
3038 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3039
3040fi
3041
Martin v. Löwiseba40652007-08-30 20:10:57 +00003042# Check whether --enable-framework was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003043if test "${enable_framework+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003044 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003045 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003046 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003047 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003048 esac
3049 case $enableval in
3050 no)
3051 PYTHONFRAMEWORK=
3052 PYTHONFRAMEWORKDIR=no-framework
3053 PYTHONFRAMEWORKPREFIX=
3054 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00003055 FRAMEWORKINSTALLFIRST=
3056 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00003057 FRAMEWORKALTINSTALLFIRST=
3058 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00003059 if test "x${prefix}" = "xNONE"; then
3060 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3061 else
3062 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3063 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003064 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003065 ;;
3066 *)
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003067 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003068 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00003069 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003070 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure bininstall maninstall"
Ronald Oussoren92919a62009-12-24 13:30:58 +00003071 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3072 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003073 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003074
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00003075 if test "x${prefix}" = "xNONE" ; then
3076 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003077
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00003078 else
3079 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3080 fi
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003081
3082 case "${enableval}" in
3083 /System*)
3084 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3085 if test "${prefix}" = "NONE" ; then
3086 # See below
3087 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3088 fi
3089 ;;
3090
3091 /Library*)
3092 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3093 ;;
3094
3095 */Library/Frameworks)
3096 MDIR="`dirname "${enableval}"`"
3097 MDIR="`dirname "${MDIR}"`"
3098 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3099
3100 if test "${prefix}" = "NONE"; then
3101 # User hasn't specified the
3102 # --prefix option, but wants to install
3103 # the framework in a non-default location,
3104 # ensure that the compatibility links get
3105 # installed relative to that prefix as well
3106 # instead of in /usr/local.
3107 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3108 fi
3109 ;;
3110
3111 *)
3112 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3113 ;;
3114 esac
3115
Jack Jansen127e56e2001-09-11 14:41:54 +00003116 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Ronald Oussoren836b0392006-05-14 19:56:34 +00003117
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003118 # Add files for Mac specific code to the list of output
Ronald Oussoren836b0392006-05-14 19:56:34 +00003119 # files:
Martin v. Löwiseba40652007-08-30 20:10:57 +00003120 ac_config_files="$ac_config_files Mac/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00003121
Martin v. Löwiseba40652007-08-30 20:10:57 +00003122 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00003123
Martin v. Löwiseba40652007-08-30 20:10:57 +00003124 ac_config_files="$ac_config_files Mac/IDLE/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00003125
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003126 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3127
3128 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3129
Jack Jansene578a632001-08-15 01:27:14 +00003130 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003131
Guido van Rossum563e7081996-09-10 18:20:48 +00003132else
Martin v. Löwis11437992002-04-12 09:54:03 +00003133
Jack Jansene578a632001-08-15 01:27:14 +00003134 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003135 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003136 PYTHONFRAMEWORKPREFIX=
3137 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00003138 FRAMEWORKINSTALLFIRST=
3139 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00003140 FRAMEWORKALTINSTALLFIRST=
3141 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00003142 if test "x${prefix}" = "xNONE" ; then
3143 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3144 else
3145 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3146 fi
Jack Jansene578a632001-08-15 01:27:14 +00003147 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003148
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003149
Martin v. Löwiseba40652007-08-30 20:10:57 +00003150fi
3151
Michael W. Hudson54241132001-12-07 15:38:26 +00003152
3153
3154
3155
Jack Jansene578a632001-08-15 01:27:14 +00003156
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00003157
3158
Ronald Oussoren5b787322006-06-06 19:50:24 +00003159
3160
3161
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003162
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003163
Jack Jansene578a632001-08-15 01:27:14 +00003164##AC_ARG_WITH(dyld,
Matthias Klose22520ea2010-05-08 10:14:46 +00003165## AS_HELP_STRING([--with-dyld],
3166## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003167##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003168# Set name for machine-dependent library files
3169
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3171$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003172if test -z "$MACHDEP"
3173then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003174 # avoid using uname for cross builds
3175 if test "$cross_compiling" = yes; then
3176 # ac_sys_system and ac_sys_release are only used for setting
3177 # `define_xopen_source' in the case statement below. For the
3178 # current supported cross builds, this macro is not adjusted.
3179 case "$host" in
3180 *-*-linux*)
3181 ac_sys_system=Linux
3182 ;;
3183 *-*-cygwin*)
3184 ac_sys_system=Cygwin
3185 ;;
3186 *)
3187 # for now, limit cross builds to known configurations
3188 MACHDEP="unknown"
3189 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3190 esac
3191 ac_sys_release=
3192 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003193 ac_sys_system=`uname -s`
Georg Brandlfe18a112009-09-04 07:55:14 +00003194 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003195 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003196 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003197 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003198 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003199 fi
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003200 fi
3201 ac_md_system=`echo $ac_sys_system |
3202 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3203 ac_md_release=`echo $ac_sys_release |
3204 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3205 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003206
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003207 case $MACHDEP in
Victor Stinneracacbaa2011-08-20 14:02:38 +02003208 linux*) MACHDEP="linux2";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003209 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003210 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003211 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00003212 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003213 '') MACHDEP="unknown";;
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003214 esac
3215fi
3216
3217
3218if test "$cross_compiling" = yes; then
3219 case "$host" in
3220 *-*-linux*)
3221 case "$host_cpu" in
3222 arm*)
3223 _host_cpu=arm
3224 ;;
3225 *)
3226 _host_cpu=$host_cpu
3227 esac
3228 ;;
3229 *-*-cygwin*)
3230 _host_cpu=
3231 ;;
3232 *)
3233 # for now, limit cross builds to known configurations
3234 MACHDEP="unknown"
3235 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003236 esac
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003237 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003238fi
Guido van Rossum91922671997-10-09 20:24:13 +00003239
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003240# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3241# disable features if it is defined, without any means to access these
3242# features as extensions. For these systems, we skip the definition of
3243# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3244# some feature, make sure there is no alternative way to access this
3245# feature. Also, when using wildcards, make sure you have verified the
3246# need for not defining _XOPEN_SOURCE on all systems matching the
3247# wildcard, and that the wildcard does not include future systems
3248# (which may remove their limitations).
3249case $ac_sys_system/$ac_sys_release in
3250 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3251 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003252 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis7875ef62010-02-15 21:41:12 +00003253 # In addition, Stefan Krah confirms that issue #1244610 exists through
3254 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali97781b02011-07-22 23:43:42 +02003255 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Martin v. Löwiscb78de62007-12-29 18:49:21 +00003256 define_xopen_source=no
3257 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3258 # also defined. This can be overridden by defining _BSD_SOURCE
3259 # As this has a different meaning on Linux, only define it on OpenBSD
3260
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003261$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwiscb78de62007-12-29 18:49:21 +00003262
3263 ;;
Charles-François Natali97781b02011-07-22 23:43:42 +02003264 OpenBSD/*)
Martin v. Löwis5e2dd862010-02-15 08:32:00 +00003265 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3266 # also defined. This can be overridden by defining _BSD_SOURCE
3267 # As this has a different meaning on Linux, only define it on OpenBSD
3268
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003269$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis5e2dd862010-02-15 08:32:00 +00003270
3271 ;;
Martin v. Löwis4d542ec2006-11-25 15:39:19 +00003272 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3273 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3274 # Marc Recht
Benjamin Petersoneac68f42008-11-16 17:54:55 +00003275 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 +00003276 define_xopen_source=no;;
Martin v. Löwisb41afb52010-05-28 15:28:47 +00003277 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3278 # request to enable features supported by the standard as a request
3279 # to disable features not supported by the standard. The best way
3280 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3281 # entirely and define __EXTENSIONS__ instead.
3282 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003283 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003284 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3285 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003286 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003287 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003288 define_xopen_source=no;;
3289 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003290 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003291 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003292 define_xopen_source=no;;
Martin v. Löwisbb86d832008-11-04 20:40:09 +00003293 # On FreeBSD 4, the math functions C89 does not cover are never defined
3294 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3295 FreeBSD/4.*)
3296 define_xopen_source=no;;
3297 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3298 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3299 # identifies itself as Darwin/7.*
3300 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3301 # disables platform specific features beyond repair.
3302 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3303 # has no effect, don't bother defining them
3304 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003305 define_xopen_source=no;;
Ronald Oussorena55af9a2010-01-17 16:25:57 +00003306 Darwin/1[0-9].*)
3307 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003308 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3309 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3310 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003311 AIX/4)
3312 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003313 AIX/5)
3314 if test `uname -r` -eq 1; then
3315 define_xopen_source=no
3316 fi
3317 ;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00003318 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3319 # defining NI_NUMERICHOST.
3320 QNX/6.3.2)
3321 define_xopen_source=no
3322 ;;
Martin v. Löwisa0588362006-04-04 06:03:50 +00003323
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003324esac
3325
3326if test $define_xopen_source = yes
3327then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003328
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003329$as_echo "#define _XOPEN_SOURCE 600" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003330
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003331
3332 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3333 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3334 # several APIs are not declared. Since this is also needed in some
3335 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003336
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003337$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003338
3339
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003340
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003341$as_echo "#define _POSIX_C_SOURCE 200112L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003342
3343
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003344fi
3345
Guido van Rossum91922671997-10-09 20:24:13 +00003346#
3347# SGI compilers allow the specification of the both the ABI and the
3348# ISA on the command line. Depending on the values of these switches,
3349# different and often incompatable code will be generated.
3350#
3351# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3352# thus supply support for various ABI/ISA combinations. The MACHDEP
3353# variable is also adjusted.
3354#
3355
3356if test ! -z "$SGI_ABI"
3357then
3358 CC="cc $SGI_ABI"
3359 LDFLAGS="$SGI_ABI $LDFLAGS"
3360 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3361fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003362{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3363$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003364
Jack Jansen83f898c2002-12-30 22:23:40 +00003365# And add extra plat-mac for darwin
3366
Jack Jansen7b59b422003-03-17 15:44:10 +00003367
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking EXTRAPLATDIR" >&5
3369$as_echo_n "checking EXTRAPLATDIR... " >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00003370if test -z "$EXTRAPLATDIR"
3371then
3372 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00003373 darwin)
3374 EXTRAPLATDIR="\$(PLATMACDIRS)"
3375 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
3376 ;;
3377 *)
3378 EXTRAPLATDIR=""
3379 EXTRAMACHDEPPATH=""
3380 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00003381 esac
3382fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003383{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRAPLATDIR" >&5
3384$as_echo "$EXTRAPLATDIR" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00003385
Jack Jansen6b08a402004-06-03 12:41:45 +00003386# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3387# it may influence the way we can build extensions, so distutils
3388# needs to check it
3389
Ronald Oussoren988117f2006-04-29 11:31:35 +00003390
Jack Jansen6b08a402004-06-03 12:41:45 +00003391CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Ronald Oussoren988117f2006-04-29 11:31:35 +00003392EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003393
Guido van Rossum627b2d71993-12-24 10:39:16 +00003394# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003395
3396# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3397# for debug/optimization stuff. BASECFLAGS is for flags that are required
3398# just to get things to compile and link. Users are free to override OPT
3399# when running configure or make. The build should not break if they do.
3400# BASECFLAGS should generally not be messed with, however.
3401
3402# XXX shouldn't some/most/all of this code be merged with the stuff later
3403# on that fiddles with OPT and BASECFLAGS?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003404{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3405$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003406
Martin v. Löwiseba40652007-08-30 20:10:57 +00003407# Check whether --with-gcc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003408if test "${with_gcc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003409 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003410 case $withval in
Mark Dickinson04b27232009-01-04 12:29:36 +00003411 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003412 without_gcc=yes;;
3413 yes) CC=gcc
3414 without_gcc=no;;
3415 *) CC=$withval
3416 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003417 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003418else
Martin v. Löwis11437992002-04-12 09:54:03 +00003419
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003420 case $ac_sys_system in
Antoine Pitrou285cd162010-09-21 15:23:17 +00003421 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003422 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003423 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003424 case $BE_HOST_CPU in
3425 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00003426 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003427 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00003428 BASECFLAGS="$BASECFLAGS -export pragma"
3429 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003430 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003431 ;;
3432 x86)
Fred Drake5790be12000-10-09 17:06:13 +00003433 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003434 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00003435 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003436 ;;
3437 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003438 as_fn_error $? "Unknown BeOS platform \"$BE_HOST_CPU\"" "$LINENO" 5
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003439 ;;
3440 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003441 AR="\$(srcdir)/Modules/ar_beos"
3442 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003443 ;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003444 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003445 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00003446fi
3447
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003448{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3449$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003450
Guido van Rossum8b131c51995-03-09 14:10:13 +00003451# If the user switches compilers, we can't believe the cache
3452if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3453then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003454 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003455(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003456fi
3457
Trent Nelson15daa352012-12-13 06:46:39 +00003458if test "$MACHDEP" = "irix6" && test "$CC" != "gcc"; then
3459 # Normally, MIPSpro CC treats #error directives as warnings, which means
3460 # a successful exit code is returned (0). This is a problem because IRIX
3461 # has a bunch of system headers with this guard at the top:
3462 #
3463 # #ifndef __c99
3464 # #error This header file is to be used only for c99 mode compilations
3465 # #else
3466 #
3467 # When autoconf tests for such a header, like stdint.h, this happens:
3468 #
3469 # configure:4619: cc -c conftest.c >&5
3470 # cc-1035 cc: WARNING File = /usr/include/stdint.h, Line = 5
3471 # #error directive: This header file is to be used only for c99 mode
3472 # compilations
3473 #
3474 # #error This header file is to be used only for c99 mode compilations
3475 # ^
3476 #
3477 # configure:4619: $? = 0
3478 # configure:4619: result: yes
3479 #
3480 # Therefore, we use `-diag_error 1035` to have the compiler treat the
3481 # warning as an error, which causes cc to return a non-zero result,
3482 # which autoconf can interpret correctly.
3483 CFLAGS="$CFLAGS -diag_error 1035"
3484 # Whilst we're here, we might as well make sure CXX defaults to something
3485 # sensible if we're not using gcc.
3486 if test -z "$CXX"; then
3487 CXX="CC"
3488 fi
3489fi
3490
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00003491# If the user set CFLAGS, use this instead of the automatically
3492# determined setting
3493preset_cflags="$CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +00003494ac_ext=c
3495ac_cpp='$CPP $CPPFLAGS'
3496ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3497ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3498ac_compiler_gnu=$ac_cv_c_compiler_gnu
3499if test -n "$ac_tool_prefix"; then
3500 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3501set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003502{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3503$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003504if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003505 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003506else
3507 if test -n "$CC"; then
3508 ac_cv_prog_CC="$CC" # Let the user override the test.
3509else
Martin v. Löwis11437992002-04-12 09:54:03 +00003510as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3511for as_dir in $PATH
3512do
3513 IFS=$as_save_IFS
3514 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003515 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003516 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003517 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003518 $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 +00003519 break 2
3520 fi
3521done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003522 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003523IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003524
Jack Jansendd19cf82001-12-06 22:36:17 +00003525fi
3526fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003527CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003528if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3530$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003531else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3533$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003534fi
3535
Martin v. Löwiseba40652007-08-30 20:10:57 +00003536
Martin v. Löwis11437992002-04-12 09:54:03 +00003537fi
3538if test -z "$ac_cv_prog_CC"; then
3539 ac_ct_CC=$CC
3540 # Extract the first word of "gcc", so it can be a program name with args.
3541set dummy gcc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3543$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003544if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003545 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003546else
3547 if test -n "$ac_ct_CC"; then
3548 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3549else
3550as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3551for as_dir in $PATH
3552do
3553 IFS=$as_save_IFS
3554 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003555 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003556 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003557 ac_cv_prog_ac_ct_CC="gcc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003558 $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 +00003559 break 2
3560 fi
3561done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003562 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003563IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003564
3565fi
3566fi
3567ac_ct_CC=$ac_cv_prog_ac_ct_CC
3568if test -n "$ac_ct_CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003569 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3570$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003571else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003572 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3573$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003574fi
3575
Martin v. Löwiseba40652007-08-30 20:10:57 +00003576 if test "x$ac_ct_CC" = x; then
3577 CC=""
3578 else
3579 case $cross_compiling:$ac_tool_warned in
3580yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003581{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3582$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00003583ac_tool_warned=yes ;;
3584esac
3585 CC=$ac_ct_CC
3586 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003587else
3588 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003589fi
3590
Jack Jansendd19cf82001-12-06 22:36:17 +00003591if test -z "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003592 if test -n "$ac_tool_prefix"; then
3593 # 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 +00003594set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3596$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003597if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003598 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003599else
3600 if test -n "$CC"; then
3601 ac_cv_prog_CC="$CC" # Let the user override the test.
3602else
Martin v. Löwis11437992002-04-12 09:54:03 +00003603as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3604for as_dir in $PATH
3605do
3606 IFS=$as_save_IFS
3607 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003608 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003609 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003610 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003611 $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 +00003612 break 2
3613 fi
3614done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003615 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003616IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003617
3618fi
3619fi
3620CC=$ac_cv_prog_CC
3621if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003622 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3623$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003624else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003625 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3626$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003627fi
3628
Martin v. Löwiseba40652007-08-30 20:10:57 +00003629
Martin v. Löwis11437992002-04-12 09:54:03 +00003630 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003631fi
3632if test -z "$CC"; then
3633 # Extract the first word of "cc", so it can be a program name with args.
3634set dummy cc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3636$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003637if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003638 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003639else
3640 if test -n "$CC"; then
3641 ac_cv_prog_CC="$CC" # Let the user override the test.
3642else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003643 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003644as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3645for as_dir in $PATH
3646do
3647 IFS=$as_save_IFS
3648 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003649 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003650 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003651 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3652 ac_prog_rejected=yes
3653 continue
3654 fi
3655 ac_cv_prog_CC="cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003656 $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 +00003657 break 2
3658 fi
3659done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003660 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003661IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003662
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003663if test $ac_prog_rejected = yes; then
3664 # We found a bogon in the path, so make sure we never use it.
3665 set dummy $ac_cv_prog_CC
3666 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003667 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003668 # We chose a different compiler from the bogus one.
3669 # However, it has the same basename, so the bogon will be chosen
3670 # first if we set CC to just the basename; use the full file name.
3671 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003672 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003673 fi
3674fi
3675fi
3676fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003677CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003678if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3680$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003681else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3683$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003684fi
3685
Martin v. Löwiseba40652007-08-30 20:10:57 +00003686
Martin v. Löwis11437992002-04-12 09:54:03 +00003687fi
3688if test -z "$CC"; then
3689 if test -n "$ac_tool_prefix"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003690 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003691 do
3692 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3693set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3695$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003696if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003697 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003698else
3699 if test -n "$CC"; then
3700 ac_cv_prog_CC="$CC" # Let the user override the test.
3701else
Martin v. Löwis11437992002-04-12 09:54:03 +00003702as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3703for as_dir in $PATH
3704do
3705 IFS=$as_save_IFS
3706 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003707 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003708 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003709 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003710 $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 +00003711 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003712 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003713done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003714 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003715IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003716
3717fi
3718fi
3719CC=$ac_cv_prog_CC
3720if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3722$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003723else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3725$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003726fi
3727
Martin v. Löwiseba40652007-08-30 20:10:57 +00003728
Martin v. Löwis11437992002-04-12 09:54:03 +00003729 test -n "$CC" && break
3730 done
3731fi
3732if test -z "$CC"; then
3733 ac_ct_CC=$CC
Martin v. Löwiseba40652007-08-30 20:10:57 +00003734 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003735do
3736 # Extract the first word of "$ac_prog", so it can be a program name with args.
3737set dummy $ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3739$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003740if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003741 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003742else
3743 if test -n "$ac_ct_CC"; then
3744 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3745else
3746as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3747for as_dir in $PATH
3748do
3749 IFS=$as_save_IFS
3750 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003751 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003752 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003753 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003754 $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 +00003755 break 2
3756 fi
3757done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003758 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003759IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003760
Martin v. Löwis11437992002-04-12 09:54:03 +00003761fi
3762fi
3763ac_ct_CC=$ac_cv_prog_ac_ct_CC
3764if test -n "$ac_ct_CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3766$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003767else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3769$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003770fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003771
Martin v. Löwiseba40652007-08-30 20:10:57 +00003772
Martin v. Löwis11437992002-04-12 09:54:03 +00003773 test -n "$ac_ct_CC" && break
3774done
Michael W. Hudson54241132001-12-07 15:38:26 +00003775
Martin v. Löwiseba40652007-08-30 20:10:57 +00003776 if test "x$ac_ct_CC" = x; then
3777 CC=""
3778 else
3779 case $cross_compiling:$ac_tool_warned in
3780yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003781{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3782$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00003783ac_tool_warned=yes ;;
3784esac
3785 CC=$ac_ct_CC
3786 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003787fi
3788
3789fi
3790
3791
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003792test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3793$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003794as_fn_error $? "no acceptable C compiler found in \$PATH
Matthias Klose3cef2a92012-03-14 23:39:33 +01003795See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003796
3797# Provide some information about the compiler.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003798$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3799set X $ac_compile
3800ac_compiler=$2
3801for ac_option in --version -v -V -qversion; do
3802 { { ac_try="$ac_compiler $ac_option >&5"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003803case "(($ac_try" in
3804 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3805 *) ac_try_echo=$ac_try;;
3806esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003807eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3808$as_echo "$ac_try_echo"; } >&5
3809 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003810 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003811 if test -s conftest.err; then
3812 sed '10a\
3813... rest of stderr output deleted ...
3814 10q' conftest.err >conftest.er1
3815 cat conftest.er1 >&5
3816 fi
3817 rm -f conftest.er1 conftest.err
3818 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3819 test $ac_status = 0; }
3820done
Martin v. Löwis11437992002-04-12 09:54:03 +00003821
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003822cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003823/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003824
Martin v. Löwis11437992002-04-12 09:54:03 +00003825int
3826main ()
3827{
3828
3829 ;
3830 return 0;
3831}
3832_ACEOF
3833ac_clean_files_save=$ac_clean_files
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003834ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003835# Try to create an executable without -o first, disregard a.out.
3836# It will help us diagnose broken compilers, and finding out an intuition
3837# of exeext.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3839$as_echo_n "checking whether the C compiler works... " >&6; }
3840ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3841
3842# The possible output files:
3843ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3844
Martin v. Löwiseba40652007-08-30 20:10:57 +00003845ac_rmfiles=
3846for ac_file in $ac_files
3847do
3848 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003849 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00003850 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3851 esac
3852done
3853rm -f $ac_rmfiles
3854
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003855if { { ac_try="$ac_link_default"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003856case "(($ac_try" in
3857 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3858 *) ac_try_echo=$ac_try;;
3859esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003860eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3861$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003862 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003863 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003864 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3865 test $ac_status = 0; }; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003866 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3867# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3868# in a Makefile. We should not override ac_cv_exeext if it was cached,
3869# so that the user can short-circuit this test for compilers unknown to
3870# Autoconf.
3871for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003872do
3873 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003874 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003875 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Skip Montanarof0d5f792004-08-15 14:08:23 +00003876 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003877 [ab].out )
Skip Montanarof0d5f792004-08-15 14:08:23 +00003878 # We found the default executable, but exeext='' is most
3879 # certainly right.
3880 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003881 *.* )
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003882 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Martin v. Löwiseba40652007-08-30 20:10:57 +00003883 then :; else
3884 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3885 fi
3886 # We set ac_cv_exeext here because the later test for it is not
3887 # safe: cross compilers may not add the suffix if given an `-o'
3888 # argument, so we may need to know it at that point already.
3889 # Even if this section looks crufty: it has the advantage of
3890 # actually working.
Skip Montanarof0d5f792004-08-15 14:08:23 +00003891 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003892 * )
Skip Montanarof0d5f792004-08-15 14:08:23 +00003893 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003894 esac
3895done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003896test "$ac_cv_exeext" = no && ac_cv_exeext=
3897
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003898else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003899 ac_file=''
3900fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003901if test -z "$ac_file"; then :
3902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3903$as_echo "no" >&6; }
3904$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003905sed 's/^/| /' conftest.$ac_ext >&5
3906
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003907{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3908$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003909as_fn_error 77 "C compiler cannot create executables
Matthias Klose3cef2a92012-03-14 23:39:33 +01003910See \`config.log' for more details" "$LINENO" 5; }
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003911else
3912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3913$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003914fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3916$as_echo_n "checking for C compiler default output file name... " >&6; }
3917{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3918$as_echo "$ac_file" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003919ac_exeext=$ac_cv_exeext
Michael W. Hudson54241132001-12-07 15:38:26 +00003920
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003921rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00003922ac_clean_files=$ac_clean_files_save
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3924$as_echo_n "checking for suffix of executables... " >&6; }
3925if { { ac_try="$ac_link"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003926case "(($ac_try" in
3927 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3928 *) ac_try_echo=$ac_try;;
3929esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003930eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3931$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003932 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003933 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003934 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3935 test $ac_status = 0; }; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00003936 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3937# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3938# work properly (i.e., refer to `conftest.exe'), while it won't with
3939# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00003940for ac_file in conftest.exe conftest conftest.*; do
3941 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003942 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003943 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003944 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
Skip Montanarof0d5f792004-08-15 14:08:23 +00003945 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003946 * ) break;;
3947 esac
3948done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003949else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003950 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3951$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003952as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Matthias Klose3cef2a92012-03-14 23:39:33 +01003953See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003954fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003955rm -f conftest conftest$ac_cv_exeext
3956{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3957$as_echo "$ac_cv_exeext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003958
3959rm -f conftest.$ac_ext
3960EXEEXT=$ac_cv_exeext
3961ac_exeext=$EXEEXT
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003962cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3963/* end confdefs.h. */
3964#include <stdio.h>
3965int
3966main ()
3967{
3968FILE *f = fopen ("conftest.out", "w");
3969 return ferror (f) || fclose (f) != 0;
3970
3971 ;
3972 return 0;
3973}
Skip Montanaro6dead952003-09-25 14:50:04 +00003974_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003975ac_clean_files="$ac_clean_files conftest.out"
3976# Check that the compiler produces executables we can run. If not, either
3977# the compiler is broken, or we cross compile.
3978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3979$as_echo_n "checking whether we are cross compiling... " >&6; }
3980if test "$cross_compiling" != yes; then
3981 { { ac_try="$ac_link"
3982case "(($ac_try" in
3983 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3984 *) ac_try_echo=$ac_try;;
3985esac
3986eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3987$as_echo "$ac_try_echo"; } >&5
3988 (eval "$ac_link") 2>&5
3989 ac_status=$?
3990 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3991 test $ac_status = 0; }
3992 if { ac_try='./conftest$ac_cv_exeext'
3993 { { case "(($ac_try" in
3994 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3995 *) ac_try_echo=$ac_try;;
3996esac
3997eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3998$as_echo "$ac_try_echo"; } >&5
3999 (eval "$ac_try") 2>&5
4000 ac_status=$?
4001 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4002 test $ac_status = 0; }; }; then
4003 cross_compiling=no
4004 else
4005 if test "$cross_compiling" = maybe; then
4006 cross_compiling=yes
4007 else
4008 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4009$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004010as_fn_error $? "cannot run C compiled programs.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004011If you meant to cross compile, use \`--host'.
Matthias Klose3cef2a92012-03-14 23:39:33 +01004012See \`config.log' for more details" "$LINENO" 5; }
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004013 fi
4014 fi
4015fi
4016{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4017$as_echo "$cross_compiling" >&6; }
4018
4019rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4020ac_clean_files=$ac_clean_files_save
4021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4022$as_echo_n "checking for suffix of object files... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004023if ${ac_cv_objext+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004024 $as_echo_n "(cached) " >&6
4025else
4026 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004027/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004028
Martin v. Löwis11437992002-04-12 09:54:03 +00004029int
4030main ()
4031{
4032
4033 ;
4034 return 0;
4035}
4036_ACEOF
4037rm -f conftest.o conftest.obj
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004038if { { ac_try="$ac_compile"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004039case "(($ac_try" in
4040 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4041 *) ac_try_echo=$ac_try;;
4042esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004043eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4044$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00004045 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004046 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004047 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4048 test $ac_status = 0; }; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004049 for ac_file in conftest.o conftest.obj conftest.*; do
4050 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004051 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004052 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004053 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4054 break;;
4055 esac
4056done
4057else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004058 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004059sed 's/^/| /' conftest.$ac_ext >&5
4060
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004061{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4062$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004063as_fn_error $? "cannot compute suffix of object files: cannot compile
Matthias Klose3cef2a92012-03-14 23:39:33 +01004064See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004065fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004066rm -f conftest.$ac_cv_objext conftest.$ac_ext
4067fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004068{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4069$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004070OBJEXT=$ac_cv_objext
4071ac_objext=$OBJEXT
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4073$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004074if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004075 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004076else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004077 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004078/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004079
Martin v. Löwis11437992002-04-12 09:54:03 +00004080int
4081main ()
4082{
4083#ifndef __GNUC__
4084 choke me
4085#endif
4086
4087 ;
4088 return 0;
4089}
4090_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004091if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004092 ac_compiler_gnu=yes
4093else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004094 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004095fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004096rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004097ac_cv_c_compiler_gnu=$ac_compiler_gnu
4098
4099fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004100{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4101$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4102if test $ac_compiler_gnu = yes; then
4103 GCC=yes
4104else
4105 GCC=
4106fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004107ac_test_CFLAGS=${CFLAGS+set}
4108ac_save_CFLAGS=$CFLAGS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4110$as_echo_n "checking whether $CC accepts -g... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004111if ${ac_cv_prog_cc_g+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004112 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004113else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004114 ac_save_c_werror_flag=$ac_c_werror_flag
4115 ac_c_werror_flag=yes
4116 ac_cv_prog_cc_g=no
4117 CFLAGS="-g"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004118 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004119/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004120
Martin v. Löwis11437992002-04-12 09:54:03 +00004121int
4122main ()
4123{
4124
4125 ;
4126 return 0;
4127}
4128_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004129if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004130 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004131else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004132 CFLAGS=""
4133 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004134/* end confdefs.h. */
4135
4136int
4137main ()
4138{
4139
4140 ;
4141 return 0;
4142}
4143_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004144if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004145
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004146else
4147 ac_c_werror_flag=$ac_save_c_werror_flag
Martin v. Löwiseba40652007-08-30 20:10:57 +00004148 CFLAGS="-g"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004149 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004150/* end confdefs.h. */
4151
4152int
4153main ()
4154{
4155
4156 ;
4157 return 0;
4158}
4159_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004160if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004161 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004162fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004163rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004164fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004165rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4166fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004167rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4168 ac_c_werror_flag=$ac_save_c_werror_flag
4169fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004170{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4171$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004172if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004173 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004174elif test $ac_cv_prog_cc_g = yes; then
4175 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004176 CFLAGS="-g -O2"
4177 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004178 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004179 fi
4180else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004181 if test "$GCC" = yes; then
4182 CFLAGS="-O2"
4183 else
4184 CFLAGS=
4185 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004186fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4188$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004189if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004190 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004191else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004192 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004193ac_save_CC=$CC
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004194cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004195/* end confdefs.h. */
4196#include <stdarg.h>
4197#include <stdio.h>
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004198struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004199/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4200struct buf { int x; };
4201FILE * (*rcsopen) (struct buf *, struct stat *, int);
4202static char *e (p, i)
4203 char **p;
4204 int i;
4205{
4206 return p[i];
4207}
4208static char *f (char * (*g) (char **, int), char **p, ...)
4209{
4210 char *s;
4211 va_list v;
4212 va_start (v,p);
4213 s = g (p, va_arg (v,int));
4214 va_end (v);
4215 return s;
4216}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004217
4218/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4219 function prototypes and stuff, but not '\xHH' hex character constants.
4220 These don't provoke an error unfortunately, instead are silently treated
Martin v. Löwiseba40652007-08-30 20:10:57 +00004221 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004222 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4223 array size at least. It's necessary to write '\x00'==0 to get something
Martin v. Löwiseba40652007-08-30 20:10:57 +00004224 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004225int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4226
Martin v. Löwiseba40652007-08-30 20:10:57 +00004227/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4228 inside strings and character constants. */
4229#define FOO(x) 'x'
4230int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4231
Skip Montanaro6dead952003-09-25 14:50:04 +00004232int test (int i, double x);
4233struct s1 {int (*f) (int a);};
4234struct s2 {int (*f) (double a);};
4235int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4236int argc;
4237char **argv;
4238int
4239main ()
4240{
4241return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4242 ;
4243 return 0;
4244}
4245_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00004246for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4247 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004248do
4249 CC="$ac_save_CC $ac_arg"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004250 if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004251 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004252fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004253rm -f core conftest.err conftest.$ac_objext
4254 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004255done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004256rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004257CC=$ac_save_CC
4258
4259fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004260# AC_CACHE_VAL
4261case "x$ac_cv_prog_cc_c89" in
4262 x)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4264$as_echo "none needed" >&6; } ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00004265 xno)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004266 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4267$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004268 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00004269 CC="$CC $ac_cv_prog_cc_c89"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004270 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4271$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004272esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004273if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004274
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004275fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004276
Martin v. Löwis11437992002-04-12 09:54:03 +00004277ac_ext=c
4278ac_cpp='$CPP $CPPFLAGS'
4279ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4280ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4281ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004282
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00004283if test ! -z "$preset_cflags"
4284then
4285 CFLAGS=$preset_cflags
4286fi
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004287
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004288
4289
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4291$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004292
Martin v. Löwiseba40652007-08-30 20:10:57 +00004293# Check whether --with-cxx_main was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004294if test "${with_cxx_main+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004295 withval=$with_cxx_main;
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004296
4297 case $withval in
4298 no) with_cxx_main=no
4299 MAINCC='$(CC)';;
4300 yes) with_cxx_main=yes
4301 MAINCC='$(CXX)';;
4302 *) with_cxx_main=yes
4303 MAINCC=$withval
4304 if test -z "$CXX"
4305 then
4306 CXX=$withval
4307 fi;;
4308 esac
4309else
4310
4311 with_cxx_main=no
4312 MAINCC='$(CC)'
4313
Martin v. Löwiseba40652007-08-30 20:10:57 +00004314fi
4315
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004316{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4317$as_echo "$with_cxx_main" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004318
4319preset_cxx="$CXX"
4320if test -z "$CXX"
4321then
4322 case "$CC" in
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004323 gcc) if test -n "$ac_tool_prefix"; then
4324 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4325set dummy ${ac_tool_prefix}g++; ac_word=$2
4326{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4327$as_echo_n "checking for $ac_word... " >&6; }
4328if ${ac_cv_path_CXX+:} false; then :
4329 $as_echo_n "(cached) " >&6
4330else
4331 case $CXX in
4332 [\\/]* | ?:[\\/]*)
4333 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4334 ;;
4335 *)
4336 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4337for as_dir in notfound
4338do
4339 IFS=$as_save_IFS
4340 test -z "$as_dir" && as_dir=.
4341 for ac_exec_ext in '' $ac_executable_extensions; do
4342 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4343 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4344 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4345 break 2
4346 fi
4347done
4348 done
4349IFS=$as_save_IFS
4350
4351 ;;
4352esac
4353fi
4354CXX=$ac_cv_path_CXX
4355if test -n "$CXX"; then
4356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4357$as_echo "$CXX" >&6; }
4358else
4359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4360$as_echo "no" >&6; }
4361fi
4362
4363
4364fi
4365if test -z "$ac_cv_path_CXX"; then
4366 ac_pt_CXX=$CXX
4367 # Extract the first word of "g++", so it can be a program name with args.
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004368set dummy g++; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4370$as_echo_n "checking for $ac_word... " >&6; }
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004371if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004372 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004373else
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004374 case $ac_pt_CXX in
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004375 [\\/]* | ?:[\\/]*)
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004376 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 +00004377 ;;
4378 *)
4379 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4380for as_dir in notfound
4381do
4382 IFS=$as_save_IFS
4383 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004384 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004385 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004386 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004387 $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 +00004388 break 2
4389 fi
4390done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004391 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004392IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004393
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004394 ;;
4395esac
4396fi
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004397ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4398if test -n "$ac_pt_CXX"; then
4399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4400$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004401else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4403$as_echo "no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004404fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004405
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004406 if test "x$ac_pt_CXX" = x; then
4407 CXX="g++"
4408 else
4409 case $cross_compiling:$ac_tool_warned in
4410yes:)
4411{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4412$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4413ac_tool_warned=yes ;;
4414esac
4415 CXX=$ac_pt_CXX
4416 fi
4417else
4418 CXX="$ac_cv_path_CXX"
4419fi
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004420 ;;
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004421 cc) if test -n "$ac_tool_prefix"; then
4422 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4423set dummy ${ac_tool_prefix}c++; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4425$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004426if ${ac_cv_path_CXX+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004427 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004428else
4429 case $CXX in
4430 [\\/]* | ?:[\\/]*)
4431 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4432 ;;
4433 *)
4434 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4435for as_dir in notfound
4436do
4437 IFS=$as_save_IFS
4438 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004439 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004440 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004441 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004442 $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 +00004443 break 2
4444 fi
4445done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004446 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004447IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004448
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004449 ;;
4450esac
4451fi
4452CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00004453if test -n "$CXX"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004454 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4455$as_echo "$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004456else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4458$as_echo "no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004459fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004460
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004461
4462fi
4463if test -z "$ac_cv_path_CXX"; then
4464 ac_pt_CXX=$CXX
4465 # Extract the first word of "c++", so it can be a program name with args.
4466set dummy c++; ac_word=$2
4467{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4468$as_echo_n "checking for $ac_word... " >&6; }
4469if ${ac_cv_path_ac_pt_CXX+:} false; then :
4470 $as_echo_n "(cached) " >&6
4471else
4472 case $ac_pt_CXX in
4473 [\\/]* | ?:[\\/]*)
4474 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4475 ;;
4476 *)
4477 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4478for as_dir in notfound
4479do
4480 IFS=$as_save_IFS
4481 test -z "$as_dir" && as_dir=.
4482 for ac_exec_ext in '' $ac_executable_extensions; do
4483 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4484 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4485 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4486 break 2
4487 fi
4488done
4489 done
4490IFS=$as_save_IFS
4491
4492 ;;
4493esac
4494fi
4495ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4496if test -n "$ac_pt_CXX"; then
4497 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4498$as_echo "$ac_pt_CXX" >&6; }
4499else
4500 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4501$as_echo "no" >&6; }
4502fi
4503
4504 if test "x$ac_pt_CXX" = x; then
4505 CXX="c++"
4506 else
4507 case $cross_compiling:$ac_tool_warned in
4508yes:)
4509{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4510$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4511ac_tool_warned=yes ;;
4512esac
4513 CXX=$ac_pt_CXX
4514 fi
4515else
4516 CXX="$ac_cv_path_CXX"
4517fi
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004518 ;;
4519 esac
4520 if test "$CXX" = "notfound"
4521 then
4522 CXX=""
4523 fi
4524fi
4525if test -z "$CXX"
4526then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004527 if test -n "$ac_tool_prefix"; then
4528 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4529 do
4530 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4531set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4533$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004534if ${ac_cv_prog_CXX+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004535 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004536else
4537 if test -n "$CXX"; then
4538 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4539else
4540as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4541for as_dir in $PATH
4542do
4543 IFS=$as_save_IFS
4544 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004545 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004546 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004547 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004548 $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 +00004549 break 2
4550 fi
4551done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004552 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004553IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004554
4555fi
4556fi
4557CXX=$ac_cv_prog_CXX
4558if test -n "$CXX"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4560$as_echo "$CXX" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004561else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4563$as_echo "no" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004564fi
4565
Martin v. Löwiseba40652007-08-30 20:10:57 +00004566
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004567 test -n "$CXX" && break
4568 done
4569fi
4570if test -z "$CXX"; then
4571 ac_ct_CXX=$CXX
4572 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4573do
4574 # Extract the first word of "$ac_prog", so it can be a program name with args.
4575set dummy $ac_prog; ac_word=$2
4576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4577$as_echo_n "checking for $ac_word... " >&6; }
4578if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4579 $as_echo_n "(cached) " >&6
4580else
4581 if test -n "$ac_ct_CXX"; then
4582 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4583else
4584as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4585for as_dir in $PATH
4586do
4587 IFS=$as_save_IFS
4588 test -z "$as_dir" && as_dir=.
4589 for ac_exec_ext in '' $ac_executable_extensions; do
4590 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4591 ac_cv_prog_ac_ct_CXX="$ac_prog"
4592 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4593 break 2
4594 fi
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004595done
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004596 done
4597IFS=$as_save_IFS
4598
4599fi
4600fi
4601ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4602if test -n "$ac_ct_CXX"; then
4603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4604$as_echo "$ac_ct_CXX" >&6; }
4605else
4606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4607$as_echo "no" >&6; }
4608fi
4609
4610
4611 test -n "$ac_ct_CXX" && break
4612done
4613
4614 if test "x$ac_ct_CXX" = x; then
4615 CXX="notfound"
4616 else
4617 case $cross_compiling:$ac_tool_warned in
4618yes:)
4619{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4620$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4621ac_tool_warned=yes ;;
4622esac
4623 CXX=$ac_ct_CXX
4624 fi
4625fi
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004626
4627 if test "$CXX" = "notfound"
4628 then
4629 CXX=""
4630 fi
4631fi
4632if test "$preset_cxx" != "$CXX"
4633then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004634 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004635
4636 By default, distutils will build C++ extension modules with \"$CXX\".
4637 If this is not intended, then set CXX on the configure command line.
4638 " >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004639$as_echo "$as_me: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004640
4641 By default, distutils will build C++ extension modules with \"$CXX\".
4642 If this is not intended, then set CXX on the configure command line.
4643 " >&2;}
4644fi
4645
doko@python.org4e63fbe2013-01-25 13:08:27 +01004646MULTIARCH=$($CC --print-multiarch 2>/dev/null)
4647
4648
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004649
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004650# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004651
4652ac_ext=c
4653ac_cpp='$CPP $CPPFLAGS'
4654ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4655ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4656ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4658$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004659# On Suns, sometimes $CPP names a directory.
4660if test -n "$CPP" && test -d "$CPP"; then
4661 CPP=
4662fi
4663if test -z "$CPP"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +01004664 if ${ac_cv_prog_CPP+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004665 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004666else
Martin v. Löwis11437992002-04-12 09:54:03 +00004667 # Double quotes because CPP needs to be expanded
4668 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4669 do
4670 ac_preproc_ok=false
4671for ac_c_preproc_warn_flag in '' yes
4672do
4673 # Use a header file that comes with gcc, so configuring glibc
4674 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004675 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4676 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004677 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004678 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004679 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004680/* end confdefs.h. */
4681#ifdef __STDC__
4682# include <limits.h>
4683#else
4684# include <assert.h>
4685#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004686 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004687_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004688if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004689
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004690else
Martin v. Löwis11437992002-04-12 09:54:03 +00004691 # Broken: fails on valid input.
4692continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004693fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004694rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004695
Martin v. Löwiseba40652007-08-30 20:10:57 +00004696 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004697 # can be detected and how.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004698 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004699/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004700#include <ac_nonexistent.h>
4701_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004702if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004703 # Broken: success on invalid input.
4704continue
4705else
Martin v. Löwis11437992002-04-12 09:54:03 +00004706 # Passes both tests.
4707ac_preproc_ok=:
4708break
4709fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004710rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004711
4712done
4713# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004714rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004715if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004716 break
4717fi
4718
4719 done
4720 ac_cv_prog_CPP=$CPP
4721
4722fi
4723 CPP=$ac_cv_prog_CPP
4724else
4725 ac_cv_prog_CPP=$CPP
4726fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004727{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4728$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004729ac_preproc_ok=false
4730for ac_c_preproc_warn_flag in '' yes
4731do
4732 # Use a header file that comes with gcc, so configuring glibc
4733 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004734 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4735 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004736 # On the NeXT, cc -E runs the code through the compiler's parser,
4737 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004738 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004739/* end confdefs.h. */
4740#ifdef __STDC__
4741# include <limits.h>
4742#else
4743# include <assert.h>
4744#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004745 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004746_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004747if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004748
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004749else
Martin v. Löwis11437992002-04-12 09:54:03 +00004750 # Broken: fails on valid input.
4751continue
4752fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004753rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004754
Martin v. Löwiseba40652007-08-30 20:10:57 +00004755 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004756 # can be detected and how.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004757 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004758/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004759#include <ac_nonexistent.h>
4760_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004761if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004762 # Broken: success on invalid input.
4763continue
4764else
Martin v. Löwis11437992002-04-12 09:54:03 +00004765 # Passes both tests.
4766ac_preproc_ok=:
4767break
4768fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004769rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004770
4771done
4772# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004773rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004774if $ac_preproc_ok; then :
4775
Martin v. Löwis11437992002-04-12 09:54:03 +00004776else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004777 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4778$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004779as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
Matthias Klose3cef2a92012-03-14 23:39:33 +01004780See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004781fi
4782
4783ac_ext=c
4784ac_cpp='$CPP $CPPFLAGS'
4785ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4786ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4787ac_compiler_gnu=$ac_cv_c_compiler_gnu
4788
4789
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4791$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004792if ${ac_cv_path_GREP+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004793 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004794else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004795 if test -z "$GREP"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004796 ac_path_GREP_found=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004797 # Loop through the user's path and test for each of PROGNAME-LIST
4798 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00004799for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4800do
4801 IFS=$as_save_IFS
4802 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004803 for ac_prog in grep ggrep; do
4804 for ac_exec_ext in '' $ac_executable_extensions; do
4805 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004806 as_fn_executable_p "$ac_path_GREP" || continue
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004807# Check for GNU ac_path_GREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004808 # Check for GNU $ac_path_GREP
4809case `"$ac_path_GREP" --version 2>&1` in
4810*GNU*)
4811 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4812*)
4813 ac_count=0
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004814 $as_echo_n 0123456789 >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004815 while :
4816 do
4817 cat "conftest.in" "conftest.in" >"conftest.tmp"
4818 mv "conftest.tmp" "conftest.in"
4819 cp "conftest.in" "conftest.nl"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004820 $as_echo 'GREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004821 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4822 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004823 as_fn_arith $ac_count + 1 && ac_count=$as_val
Martin v. Löwiseba40652007-08-30 20:10:57 +00004824 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4825 # Best one so far, save it but keep looking for a better one
4826 ac_cv_path_GREP="$ac_path_GREP"
4827 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00004828 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004829 # 10*(2^10) chars as input seems more than enough
4830 test $ac_count -gt 10 && break
4831 done
4832 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4833esac
4834
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004835 $ac_path_GREP_found && break 3
4836 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004837 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004838 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004839IFS=$as_save_IFS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004840 if test -z "$ac_cv_path_GREP"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004841 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 +00004842 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004843else
4844 ac_cv_path_GREP=$GREP
4845fi
4846
Martin v. Löwiseba40652007-08-30 20:10:57 +00004847fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004848{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4849$as_echo "$ac_cv_path_GREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00004850 GREP="$ac_cv_path_GREP"
4851
4852
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4854$as_echo_n "checking for egrep... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004855if ${ac_cv_path_EGREP+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004856 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +00004857else
4858 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4859 then ac_cv_path_EGREP="$GREP -E"
4860 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004861 if test -z "$EGREP"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004862 ac_path_EGREP_found=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004863 # Loop through the user's path and test for each of PROGNAME-LIST
4864 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00004865for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4866do
4867 IFS=$as_save_IFS
4868 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004869 for ac_prog in egrep; do
4870 for ac_exec_ext in '' $ac_executable_extensions; do
4871 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004872 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004873# Check for GNU ac_path_EGREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004874 # Check for GNU $ac_path_EGREP
4875case `"$ac_path_EGREP" --version 2>&1` in
4876*GNU*)
4877 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4878*)
4879 ac_count=0
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004880 $as_echo_n 0123456789 >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004881 while :
4882 do
4883 cat "conftest.in" "conftest.in" >"conftest.tmp"
4884 mv "conftest.tmp" "conftest.in"
4885 cp "conftest.in" "conftest.nl"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004886 $as_echo 'EGREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004887 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4888 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004889 as_fn_arith $ac_count + 1 && ac_count=$as_val
Martin v. Löwiseba40652007-08-30 20:10:57 +00004890 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4891 # Best one so far, save it but keep looking for a better one
4892 ac_cv_path_EGREP="$ac_path_EGREP"
4893 ac_path_EGREP_max=$ac_count
4894 fi
4895 # 10*(2^10) chars as input seems more than enough
4896 test $ac_count -gt 10 && break
4897 done
4898 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4899esac
4900
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004901 $ac_path_EGREP_found && break 3
4902 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004903 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004904 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004905IFS=$as_save_IFS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004906 if test -z "$ac_cv_path_EGREP"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004907 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 +00004908 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004909else
4910 ac_cv_path_EGREP=$EGREP
4911fi
4912
Martin v. Löwiseba40652007-08-30 20:10:57 +00004913 fi
4914fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004915{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4916$as_echo "$ac_cv_path_EGREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00004917 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00004918
4919
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4921$as_echo_n "checking for ANSI C header files... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004922if ${ac_cv_header_stdc+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004923 $as_echo_n "(cached) " >&6
4924else
4925 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00004926/* end confdefs.h. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004927#include <stdlib.h>
4928#include <stdarg.h>
4929#include <string.h>
4930#include <float.h>
4931
4932int
4933main ()
4934{
4935
4936 ;
4937 return 0;
4938}
4939_ACEOF
4940if ac_fn_c_try_compile "$LINENO"; then :
4941 ac_cv_header_stdc=yes
4942else
4943 ac_cv_header_stdc=no
4944fi
4945rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4946
4947if test $ac_cv_header_stdc = yes; then
4948 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4949 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4950/* end confdefs.h. */
4951#include <string.h>
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00004952
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00004953_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004954if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004955 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004956
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004957else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004958 ac_cv_header_stdc=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004959fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00004960rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004961
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004962fi
4963
4964if test $ac_cv_header_stdc = yes; then
4965 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4966 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4967/* end confdefs.h. */
4968#include <stdlib.h>
4969
4970_ACEOF
4971if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4972 $EGREP "free" >/dev/null 2>&1; then :
4973
4974else
4975 ac_cv_header_stdc=no
4976fi
4977rm -f conftest*
4978
4979fi
4980
4981if test $ac_cv_header_stdc = yes; then
4982 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4983 if test "$cross_compiling" = yes; then :
4984 :
4985else
4986 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4987/* end confdefs.h. */
4988#include <ctype.h>
4989#include <stdlib.h>
4990#if ((' ' & 0x0FF) == 0x020)
4991# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4992# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4993#else
4994# define ISLOWER(c) \
4995 (('a' <= (c) && (c) <= 'i') \
4996 || ('j' <= (c) && (c) <= 'r') \
4997 || ('s' <= (c) && (c) <= 'z'))
4998# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4999#endif
5000
5001#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5002int
5003main ()
5004{
5005 int i;
5006 for (i = 0; i < 256; i++)
5007 if (XOR (islower (i), ISLOWER (i))
5008 || toupper (i) != TOUPPER (i))
5009 return 2;
5010 return 0;
5011}
5012_ACEOF
5013if ac_fn_c_try_run "$LINENO"; then :
5014
5015else
5016 ac_cv_header_stdc=no
5017fi
5018rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5019 conftest.$ac_objext conftest.beam conftest.$ac_ext
5020fi
5021
5022fi
5023fi
5024{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5025$as_echo "$ac_cv_header_stdc" >&6; }
5026if test $ac_cv_header_stdc = yes; then
5027
5028$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5029
5030fi
5031
5032# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5033for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5034 inttypes.h stdint.h unistd.h
5035do :
5036 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5037ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5038"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00005039if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005040 cat >>confdefs.h <<_ACEOF
5041#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5042_ACEOF
5043
5044fi
5045
5046done
5047
5048
5049
5050 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 +01005051if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005052 MINIX=yes
5053else
5054 MINIX=
5055fi
5056
5057
5058 if test "$MINIX" = yes; then
5059
5060$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5061
5062
5063$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5064
5065
5066$as_echo "#define _MINIX 1" >>confdefs.h
5067
5068 fi
5069
5070
5071 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5072$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005073if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005074 $as_echo_n "(cached) " >&6
5075else
5076 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5077/* end confdefs.h. */
5078
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005079# define __EXTENSIONS__ 1
5080 $ac_includes_default
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005081int
5082main ()
5083{
5084
5085 ;
5086 return 0;
5087}
5088_ACEOF
5089if ac_fn_c_try_compile "$LINENO"; then :
5090 ac_cv_safe_to_define___extensions__=yes
5091else
5092 ac_cv_safe_to_define___extensions__=no
5093fi
5094rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5095fi
5096{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5097$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5098 test $ac_cv_safe_to_define___extensions__ = yes &&
5099 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5100
5101 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5102
5103 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5104
5105 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5106
5107 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5108
5109
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005110
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005111# Check for unsupported systems
5112case $ac_sys_system/$ac_sys_release in
5113atheos*|Linux*/1*)
5114 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5115 echo See README for details.
5116 exit 1;;
5117esac
5118
5119
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5121$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005122
5123# Check whether --with-suffix was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005124if test "${with_suffix+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005125 withval=$with_suffix;
5126 case $withval in
5127 no) EXEEXT=;;
5128 yes) EXEEXT=.exe;;
5129 *) EXEEXT=$withval;;
5130 esac
5131fi
5132
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005133{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5134$as_echo "$EXEEXT" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005135
5136# Test whether we're running on a non-case-sensitive system, in which
5137# case we give a warning if no ext is given
5138
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5140$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005141if test ! -d CaseSensitiveTestDir; then
5142mkdir CaseSensitiveTestDir
5143fi
5144
5145if test -d casesensitivetestdir
5146then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5148$as_echo "yes" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005149 BUILDEXEEXT=.exe
5150else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005151 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5152$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005153 BUILDEXEEXT=$EXEEXT
5154fi
5155rmdir CaseSensitiveTestDir
5156
5157case $MACHDEP in
5158bsdos*)
5159 case $CC in
5160 gcc) CC="$CC -D_HAVE_BSDI";;
5161 esac;;
5162esac
5163
5164case $ac_sys_system in
5165hp*|HP*)
5166 case $CC in
5167 cc|*/cc) CC="$CC -Ae";;
5168 esac;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005169SunOS*)
5170 # Some functions have a prototype only with that define, e.g. confstr
5171
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005172$as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005173
5174 ;;
5175esac
5176
5177
5178
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5180$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005181if test -z "$LIBRARY"
5182then
5183 LIBRARY='libpython$(VERSION).a'
5184fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005185{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5186$as_echo "$LIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005187
5188# LDLIBRARY is the name of the library to link against (as opposed to the
5189# name of the library into which to insert object files). BLDLIBRARY is also
5190# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5191# is blank as the main program is not linked directly against LDLIBRARY.
5192# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5193# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5194# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5195# DLLLIBRARY is the shared (i.e., DLL) library.
5196#
5197# RUNSHARED is used to run shared python without installed libraries
5198#
5199# INSTSONAME is the name of the shared library that will be use to install
5200# on the system - some systems like version suffix, others don't
5201
5202
5203
5204
5205
5206
5207LDLIBRARY="$LIBRARY"
5208BLDLIBRARY='$(LDLIBRARY)'
5209INSTSONAME='$(LDLIBRARY)'
5210DLLLIBRARY=''
5211LDLIBRARYDIR=''
5212RUNSHARED=''
5213
5214# LINKCC is the command that links the python executable -- default is $(CC).
5215# If CXX is set, and if it is needed to link a main function that was
5216# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5217# python might then depend on the C++ runtime
5218# This is altered for AIX in order to build the export list before
5219# linking.
5220
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5222$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005223if test -z "$LINKCC"
5224then
5225 LINKCC='$(PURIFY) $(MAINCC)'
5226 case $ac_sys_system in
5227 AIX*)
5228 exp_extra="\"\""
5229 if test $ac_sys_release -ge 5 -o \
5230 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5231 exp_extra="."
5232 fi
5233 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005234 QNX*)
5235 # qcc must be used because the other compilers do not
5236 # support -N.
5237 LINKCC=qcc;;
5238 esac
5239fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005240{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5241$as_echo "$LINKCC" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005242
5243# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5244# make sure we default having it set to "no": this is used by
5245# distutils.unixccompiler to know if it should add --enable-new-dtags
5246# to linker command lines, and failing to detect GNU ld simply results
5247# in the same bahaviour as before.
5248
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5250$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005251ac_prog=ld
5252if test "$GCC" = yes; then
5253 ac_prog=`$CC -print-prog-name=ld`
5254fi
5255case `"$ac_prog" -V 2>&1 < /dev/null` in
5256 *GNU*)
5257 GNULD=yes;;
5258 *)
5259 GNULD=no;;
5260esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005261{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5262$as_echo "$GNULD" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005263
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5265$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005266# Check whether --enable-shared was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005267if test "${enable_shared+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005268 enableval=$enable_shared;
5269fi
5270
5271
5272if test -z "$enable_shared"
5273then
5274 case $ac_sys_system in
5275 CYGWIN* | atheos*)
5276 enable_shared="yes";;
5277 *)
5278 enable_shared="no";;
5279 esac
5280fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005281{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5282$as_echo "$enable_shared" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005283
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5285$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005286# Check whether --enable-profiling was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005287if test "${enable_profiling+set}" = set; then :
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005288 enableval=$enable_profiling;
5289fi
5290
5291if test "x$enable_profiling" = xyes; then
5292 ac_save_cc="$CC"
Benjamin Petersonb9be7bb2013-03-26 08:55:37 -04005293 CC="$CC -pg"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005294 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005295/* end confdefs.h. */
5296int main() { return 0; }
5297_ACEOF
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005298if ac_fn_c_try_link "$LINENO"; then :
5299
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005300else
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005301 enable_profiling=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005302fi
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005303rm -f core conftest.err conftest.$ac_objext \
5304 conftest$ac_exeext conftest.$ac_ext
5305 CC="$ac_save_cc"
5306else
5307 enable_profiling=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005308fi
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005309{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5310$as_echo "$enable_profiling" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005311
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005312if test "x$enable_profiling" = xyes; then
5313 BASECFLAGS="-pg $BASECFLAGS"
5314 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005315fi
5316
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5318$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005319
5320# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5321# library that we build, but we do not want to link against it (we
5322# will find it with a -framework option). For this reason there is an
5323# extra variable BLDLIBRARY against which Python and the extension
5324# modules are linked, BLDLIBRARY. This is normally the same as
5325# LDLIBRARY, but empty for MacOSX framework builds.
5326if test "$enable_framework"
5327then
5328 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005329 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005330 BLDLIBRARY=''
5331else
5332 BLDLIBRARY='$(LDLIBRARY)'
5333fi
5334
5335# Other platforms follow
5336if test $enable_shared = "yes"; then
5337
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005338$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005339
5340 case $ac_sys_system in
5341 BeOS*)
5342 LDLIBRARY='libpython$(VERSION).so'
5343 ;;
5344 CYGWIN*)
5345 LDLIBRARY='libpython$(VERSION).dll.a'
5346 DLLLIBRARY='libpython$(VERSION).dll'
5347 ;;
5348 SunOS*)
5349 LDLIBRARY='libpython$(VERSION).so'
5350 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005351 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005352 INSTSONAME="$LDLIBRARY".$SOVERSION
5353 ;;
Charles-François Natali3de8c732011-07-24 22:33:35 +02005354 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005355 LDLIBRARY='libpython$(VERSION).so'
5356 BLDLIBRARY='-L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005357 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005358 case $ac_sys_system in
5359 FreeBSD*)
5360 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
5361 ;;
5362 esac
5363 INSTSONAME="$LDLIBRARY".$SOVERSION
5364 ;;
5365 hp*|HP*)
5366 case `uname -m` in
5367 ia64)
5368 LDLIBRARY='libpython$(VERSION).so'
5369 ;;
5370 *)
5371 LDLIBRARY='libpython$(VERSION).sl'
5372 ;;
5373 esac
5374 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005375 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005376 ;;
5377 OSF*)
5378 LDLIBRARY='libpython$(VERSION).so'
5379 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005380 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005381 ;;
5382 atheos*)
5383 LDLIBRARY='libpython$(VERSION).so'
5384 BLDLIBRARY='-L. -lpython$(VERSION)'
5385 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
5386 ;;
5387 Darwin*)
5388 LDLIBRARY='libpython$(VERSION).dylib'
5389 BLDLIBRARY='-L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005390 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005391 ;;
Antoine Pitrouaabdceb2010-09-10 20:03:17 +00005392 AIX*)
5393 LDLIBRARY='libpython$(VERSION).so'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005394 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrouaabdceb2010-09-10 20:03:17 +00005395 ;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005396
5397 esac
5398else # shared is disabled
5399 case $ac_sys_system in
5400 CYGWIN*)
5401 BLDLIBRARY='$(LIBRARY)'
5402 LDLIBRARY='libpython$(VERSION).dll.a'
5403 ;;
5404 esac
5405fi
5406
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005407if test "$cross_compiling" = yes; then
5408 RUNSHARED=
5409fi
5410
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005411{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5412$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005413
5414if test -n "$ac_tool_prefix"; then
5415 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5416set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5418$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005419if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005420 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005421else
5422 if test -n "$RANLIB"; then
5423 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5424else
5425as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5426for as_dir in $PATH
5427do
5428 IFS=$as_save_IFS
5429 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005430 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005431 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005432 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005433 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005434 break 2
5435 fi
5436done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005437 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005438IFS=$as_save_IFS
5439
5440fi
5441fi
5442RANLIB=$ac_cv_prog_RANLIB
5443if test -n "$RANLIB"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5445$as_echo "$RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005446else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005447 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5448$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005449fi
5450
5451
5452fi
5453if test -z "$ac_cv_prog_RANLIB"; then
5454 ac_ct_RANLIB=$RANLIB
5455 # Extract the first word of "ranlib", so it can be a program name with args.
5456set dummy ranlib; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5458$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005459if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005460 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005461else
5462 if test -n "$ac_ct_RANLIB"; then
5463 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5464else
5465as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5466for as_dir in $PATH
5467do
5468 IFS=$as_save_IFS
5469 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005470 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005471 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005472 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005473 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005474 break 2
5475 fi
5476done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005477 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005478IFS=$as_save_IFS
5479
5480fi
5481fi
5482ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5483if test -n "$ac_ct_RANLIB"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5485$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005486else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005487 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5488$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005489fi
5490
5491 if test "x$ac_ct_RANLIB" = x; then
5492 RANLIB=":"
5493 else
5494 case $cross_compiling:$ac_tool_warned in
5495yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005496{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5497$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005498ac_tool_warned=yes ;;
5499esac
5500 RANLIB=$ac_ct_RANLIB
5501 fi
5502else
5503 RANLIB="$ac_cv_prog_RANLIB"
5504fi
5505
5506
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005507if test -n "$ac_tool_prefix"; then
5508 for ac_prog in ar aal
5509 do
5510 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5511set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5513$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005514if ${ac_cv_prog_AR+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005515 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005516else
5517 if test -n "$AR"; then
5518 ac_cv_prog_AR="$AR" # Let the user override the test.
5519else
5520as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5521for as_dir in $PATH
5522do
5523 IFS=$as_save_IFS
5524 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005525 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005526 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005527 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005528 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005529 break 2
5530 fi
5531done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005532 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005533IFS=$as_save_IFS
5534
5535fi
5536fi
5537AR=$ac_cv_prog_AR
5538if test -n "$AR"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005539 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5540$as_echo "$AR" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005541else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5543$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005544fi
5545
5546
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005547 test -n "$AR" && break
5548 done
5549fi
5550if test -z "$AR"; then
5551 ac_ct_AR=$AR
5552 for ac_prog in ar aal
5553do
5554 # Extract the first word of "$ac_prog", so it can be a program name with args.
5555set dummy $ac_prog; ac_word=$2
5556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5557$as_echo_n "checking for $ac_word... " >&6; }
5558if ${ac_cv_prog_ac_ct_AR+:} false; then :
5559 $as_echo_n "(cached) " >&6
5560else
5561 if test -n "$ac_ct_AR"; then
5562 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5563else
5564as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5565for as_dir in $PATH
5566do
5567 IFS=$as_save_IFS
5568 test -z "$as_dir" && as_dir=.
5569 for ac_exec_ext in '' $ac_executable_extensions; do
5570 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5571 ac_cv_prog_ac_ct_AR="$ac_prog"
5572 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5573 break 2
5574 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005575done
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005576 done
5577IFS=$as_save_IFS
5578
5579fi
5580fi
5581ac_ct_AR=$ac_cv_prog_ac_ct_AR
5582if test -n "$ac_ct_AR"; then
5583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5584$as_echo "$ac_ct_AR" >&6; }
5585else
5586 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5587$as_echo "no" >&6; }
5588fi
5589
5590
5591 test -n "$ac_ct_AR" && break
5592done
5593
5594 if test "x$ac_ct_AR" = x; then
5595 AR="ar"
5596 else
5597 case $cross_compiling:$ac_tool_warned in
5598yes:)
5599{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5600$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5601ac_tool_warned=yes ;;
5602esac
5603 AR=$ac_ct_AR
5604 fi
5605fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005606
5607
5608# tweak ARFLAGS only if the user didn't set it on the command line
5609
5610if test -z "$ARFLAGS"
5611then
5612 ARFLAGS="rc"
5613fi
5614
5615
5616# Extract the first word of "svnversion", so it can be a program name with args.
5617set dummy svnversion; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5619$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005620if ${ac_cv_prog_SVNVERSION+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005621 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005622else
5623 if test -n "$SVNVERSION"; then
5624 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
5625else
5626as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5627for as_dir in $PATH
5628do
5629 IFS=$as_save_IFS
5630 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005631 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005632 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005633 ac_cv_prog_SVNVERSION="found"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005634 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005635 break 2
5636 fi
5637done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005638 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005639IFS=$as_save_IFS
5640
5641 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
5642fi
5643fi
5644SVNVERSION=$ac_cv_prog_SVNVERSION
5645if test -n "$SVNVERSION"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SVNVERSION" >&5
5647$as_echo "$SVNVERSION" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005648else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5650$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005651fi
5652
5653
5654if test $SVNVERSION = found
5655then
5656 SVNVERSION="svnversion \$(srcdir)"
5657else
5658 SVNVERSION="echo Unversioned directory"
5659fi
5660
Trent Nelsond86ceec2012-10-16 09:42:45 -04005661
Trent Nelsonabf20512012-10-17 04:32:49 -04005662if test "$abs_srcdir" != "$abs_builddir"; then
Trent Nelsond86ceec2012-10-16 09:42:45 -04005663 # If we're building out-of-tree make sure Include (in the current dir)
5664 # gets picked up before its $srcdir counterpart in order for Python-ast.h
5665 # and graminit.h to get picked up from the correct directory.
5666 # (A side effect of this is that these resources will automatically be
5667 # regenerated when building out-of-tree, regardless of whether or not
5668 # the $srcdir counterpart is up-to-date. This is an acceptable trade
5669 # off.)
5670 BASECPPFLAGS="-IInclude"
5671else
5672 BASECPPFLAGS=""
5673fi
5674
Georg Brandl3a5508e2011-03-06 10:42:21 +01005675
5676
5677
5678# Extract the first word of "hg", so it can be a program name with args.
5679set dummy hg; ac_word=$2
5680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5681$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005682if ${ac_cv_prog_HAS_HG+:} false; then :
Georg Brandl3a5508e2011-03-06 10:42:21 +01005683 $as_echo_n "(cached) " >&6
5684else
5685 if test -n "$HAS_HG"; then
5686 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
5687else
5688as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5689for as_dir in $PATH
5690do
5691 IFS=$as_save_IFS
5692 test -z "$as_dir" && as_dir=.
5693 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005694 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Georg Brandl3a5508e2011-03-06 10:42:21 +01005695 ac_cv_prog_HAS_HG="found"
5696 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5697 break 2
5698 fi
5699done
5700 done
5701IFS=$as_save_IFS
5702
5703 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
5704fi
5705fi
5706HAS_HG=$ac_cv_prog_HAS_HG
5707if test -n "$HAS_HG"; then
5708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
5709$as_echo "$HAS_HG" >&6; }
5710else
5711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5712$as_echo "no" >&6; }
5713fi
5714
5715
5716if test $HAS_HG = found
5717then
5718 HGVERSION="hg id -i \$(srcdir)"
5719 HGTAG="hg id -t \$(srcdir)"
5720 HGBRANCH="hg id -b \$(srcdir)"
5721else
5722 HGVERSION=""
5723 HGTAG=""
5724 HGBRANCH=""
5725fi
5726
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005727case $MACHDEP in
5728bsdos*|hp*|HP*)
5729 # install -d does not work on BSDI or HP-UX
5730 if test -z "$INSTALL"
5731 then
5732 INSTALL="${srcdir}/install-sh -c"
5733 fi
5734esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005735# Find a good install program. We prefer a C program (faster),
5736# so one script is as good as another. But avoid the broken or
5737# incompatible versions:
5738# SysV /etc/install, /usr/sbin/install
5739# SunOS /usr/etc/install
5740# IRIX /sbin/install
5741# AIX /bin/install
5742# AmigaOS /C/install, which installs bootblocks on floppy discs
5743# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5744# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5745# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5746# OS/2's system install, which has a completely different semantic
5747# ./install, which can be erroneously created by make from ./install.sh.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005748# Reject install programs that cannot install multiple files.
5749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5750$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005751if test -z "$INSTALL"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +01005752if ${ac_cv_path_install+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005753 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005754else
5755 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5756for as_dir in $PATH
5757do
5758 IFS=$as_save_IFS
5759 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005760 # Account for people who put trailing slashes in PATH elements.
5761case $as_dir/ in #((
5762 ./ | .// | /[cC]/* | \
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005763 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005764 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005765 /usr/ucb/* ) ;;
5766 *)
5767 # OSF1 and SCO ODT 3.0 have their own names for install.
5768 # Don't use installbsd from OSF since it installs stuff as root
5769 # by default.
5770 for ac_prog in ginstall scoinst install; do
5771 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005772 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005773 if test $ac_prog = install &&
5774 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5775 # AIX install. It has an incompatible calling convention.
5776 :
5777 elif test $ac_prog = install &&
5778 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5779 # program-specific install script used by HP pwplus--don't use.
5780 :
5781 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005782 rm -rf conftest.one conftest.two conftest.dir
5783 echo one > conftest.one
5784 echo two > conftest.two
5785 mkdir conftest.dir
5786 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5787 test -s conftest.one && test -s conftest.two &&
5788 test -s conftest.dir/conftest.one &&
5789 test -s conftest.dir/conftest.two
5790 then
5791 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5792 break 3
5793 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005794 fi
5795 fi
5796 done
5797 done
5798 ;;
5799esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005800
5801 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005802IFS=$as_save_IFS
5803
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005804rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005805
5806fi
5807 if test "${ac_cv_path_install+set}" = set; then
5808 INSTALL=$ac_cv_path_install
5809 else
5810 # As a last resort, use the slow shell script. Don't cache a
5811 # value for INSTALL within a source directory, because that will
5812 # break other packages using the cache if that directory is
5813 # removed, or if the value is a relative name.
5814 INSTALL=$ac_install_sh
5815 fi
5816fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5818$as_echo "$INSTALL" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005819
5820# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5821# It thinks the first close brace ends the variable substitution.
5822test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5823
5824test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5825
5826test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5827
Trent Nelsonf6407a12012-08-30 14:56:13 +00005828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
5829$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
5830if test -z "$MKDIR_P"; then
5831 if ${ac_cv_path_mkdir+:} false; then :
5832 $as_echo_n "(cached) " >&6
5833else
5834 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5835for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
5836do
5837 IFS=$as_save_IFS
5838 test -z "$as_dir" && as_dir=.
5839 for ac_prog in mkdir gmkdir; do
5840 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005841 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Trent Nelsonf6407a12012-08-30 14:56:13 +00005842 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
5843 'mkdir (GNU coreutils) '* | \
5844 'mkdir (coreutils) '* | \
5845 'mkdir (fileutils) '4.1*)
5846 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
5847 break 3;;
5848 esac
5849 done
5850 done
5851 done
5852IFS=$as_save_IFS
5853
5854fi
5855
5856 test -d ./--version && rmdir ./--version
5857 if test "${ac_cv_path_mkdir+set}" = set; then
5858 MKDIR_P="$ac_cv_path_mkdir -p"
5859 else
5860 # As a last resort, use the slow shell script. Don't cache a
5861 # value for MKDIR_P within a source directory, because that will
5862 # break other packages using the cache if that directory is
5863 # removed, or if the value is a relative name.
5864 MKDIR_P="$ac_install_sh -d"
5865 fi
5866fi
5867{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
5868$as_echo "$MKDIR_P" >&6; }
5869
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005870
5871# Not every filesystem supports hard links
5872
5873if test -z "$LN" ; then
5874 case $ac_sys_system in
5875 BeOS*) LN="ln -s";;
5876 CYGWIN*) LN="ln -s";;
5877 atheos*) LN="ln -s";;
5878 *) LN=ln;;
5879 esac
5880fi
5881
5882# Check for --with-pydebug
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
5884$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005885
5886# Check whether --with-pydebug was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005887if test "${with_pydebug+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005888 withval=$with_pydebug;
5889if test "$withval" != no
5890then
5891
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005892$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005893
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5895$as_echo "yes" >&6; };
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005896 Py_DEBUG='true'
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005897else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5898$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005899fi
5900else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005901 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5902$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005903fi
5904
5905
5906# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5907# merged with this chunk of code?
5908
5909# Optimizer/debugger flags
5910# ------------------------
5911# (The following bit of code is complicated enough - please keep things
5912# indented properly. Just pretend you're editing Python code. ;-)
5913
5914# There are two parallel sets of case statements below, one that checks to
5915# see if OPT was set and one that does BASECFLAGS setting based upon
5916# compiler and platform. BASECFLAGS tweaks need to be made even if the
5917# user set OPT.
5918
5919# tweak OPT based on compiler and platform, only if the user didn't set
5920# it on the command line
5921
Benjamin Petersond4b721b2010-03-23 20:58:37 +00005922if test "${OPT-unset}" = "unset"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005923then
5924 case $GCC in
5925 yes)
5926 if test "$CC" != 'g++' ; then
5927 STRICT_PROTO="-Wstrict-prototypes"
5928 fi
5929 # For gcc 4.x we need to use -fwrapv so lets check if its supported
5930 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
5931 WRAP="-fwrapv"
5932 fi
Stefan Krah503e5e12011-09-14 15:19:42 +02005933
5934 # Clang also needs -fwrapv
Stefan Krah2bc1e8f2011-12-08 22:26:06 +01005935 case $CC in
5936 *clang*) WRAP="-fwrapv"
5937 ;;
5938 esac
Stefan Krah503e5e12011-09-14 15:19:42 +02005939
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005940 case $ac_cv_prog_cc_g in
5941 yes)
5942 if test "$Py_DEBUG" = 'true' ; then
5943 # Optimization messes up debuggers, so turn it off for
5944 # debug builds.
Mark Dickinsond2f3e3f2010-05-05 22:23:58 +00005945 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005946 else
5947 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
5948 fi
5949 ;;
5950 *)
5951 OPT="-O3 -Wall $STRICT_PROTO"
5952 ;;
5953 esac
5954 case $ac_sys_system in
5955 SCO_SV*) OPT="$OPT -m486 -DSCO5"
5956 ;;
5957 esac
5958 ;;
5959
5960 *)
5961 OPT="-O"
5962 ;;
5963 esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005964fi
5965
5966
5967
5968# The -arch flags for universal builds on OSX
5969UNIVERSAL_ARCH_FLAGS=
5970
5971
5972# tweak BASECFLAGS based on compiler and platform
5973case $GCC in
5974yes)
5975 # Python violates C99 rules, by casting between incompatible
5976 # pointer types. GCC may generate bad code as a result of that,
5977 # so use -fno-strict-aliasing if supported.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005978 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -fno-strict-aliasing" >&5
5979$as_echo_n "checking whether $CC accepts -fno-strict-aliasing... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005980 ac_save_cc="$CC"
5981 CC="$CC -fno-strict-aliasing"
Matthias Klose3cef2a92012-03-14 23:39:33 +01005982 if ${ac_cv_no_strict_aliasing_ok+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005983 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00005984else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005985 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005986/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00005987
5988int
5989main ()
5990{
Mark Dickinson5e13e292010-05-11 08:55:06 +00005991
Gregory P. Smith373469a2009-11-01 21:03:38 +00005992 ;
5993 return 0;
5994}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005995_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005996if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005997 ac_cv_no_strict_aliasing_ok=yes
5998else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005999 ac_cv_no_strict_aliasing_ok=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006000fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00006001rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00006002fi
6003
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006004 CC="$ac_save_cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006005 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing_ok" >&5
6006$as_echo "$ac_cv_no_strict_aliasing_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006007 if test $ac_cv_no_strict_aliasing_ok = yes
6008 then
6009 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6010 fi
6011
6012 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
6013 # support. Without this, treatment of subnormals doesn't follow
6014 # the standard.
doko@python.orgd65e2ba2013-01-31 23:52:03 +01006015 case $host in
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006016 alpha*)
6017 BASECFLAGS="$BASECFLAGS -mieee"
6018 ;;
6019 esac
6020
6021 case $ac_sys_system in
6022 SCO_SV*)
6023 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
6024 ;;
6025 # is there any other compiler on Darwin besides gcc?
6026 Darwin*)
6027 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
6028 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006029 if test "${CC}" = gcc
6030 then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006031 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
6032$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006033 case "${UNIVERSALSDK}" in
6034 */MacOSX10.4u.sdk)
6035 # Build using 10.4 SDK, force usage of gcc when the
6036 # compiler is gcc, otherwise the user will get very
6037 # confusing error messages when building on OSX 10.6
6038 CC=gcc-4.0
6039 CPP=cpp-4.0
6040 ;;
6041 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
6043$as_echo "$CC" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006044 fi
6045
6046 # Calculate the right deployment target for this build.
6047 #
Ned Deilyc40b9032014-06-25 13:48:46 -07006048 cur_target_major=`sw_vers -productVersion | \
6049 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
6050 cur_target_minor=`sw_vers -productVersion | \
6051 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
6052 cur_target="${cur_target_major}.${cur_target_minor}"
6053 if test ${cur_target_major} -eq 10 && \
6054 test ${cur_target_minor} -ge 3
6055 then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006056 cur_target=10.3
Ronald Oussoren25967582009-09-06 10:00:26 +00006057 if test ${enable_universalsdk}; then
6058 if test "${UNIVERSAL_ARCHS}" = "all"; then
6059 # Ensure that the default platform for a
6060 # 4-way universal build is OSX 10.5,
6061 # that's the first OS release where
6062 # 4-way builds make sense.
6063 cur_target='10.5'
Ronald Oussoren23d92532009-09-07 06:12:00 +00006064
6065 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
6066 cur_target='10.5'
6067
6068 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
6069 cur_target='10.5'
6070
6071 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
6072 cur_target='10.5'
Ronald Oussoren25967582009-09-06 10:00:26 +00006073 fi
6074 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00006075 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren25967582009-09-06 10:00:26 +00006076 # On Intel macs default to a deployment
6077 # target of 10.4, that's the first OSX
6078 # release with Intel support.
6079 cur_target="10.4"
6080 fi
6081 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006082 fi
6083 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
6084
6085 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
6086 # environment with a value that is the same as what we'll use
6087 # in the Makefile to ensure that we'll get the same compiler
6088 # environment during configure and build time.
6089 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
6090 export MACOSX_DEPLOYMENT_TARGET
6091 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
6092
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006093 if test "${enable_universalsdk}"; then
6094 UNIVERSAL_ARCH_FLAGS=""
6095 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
6096 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
6097 ARCH_RUN_32BIT=""
Ronald Oussoren75912852010-04-08 08:13:31 +00006098 LIPO_32BIT_FLAGS=""
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006099
6100 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
6101 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
6102 LIPO_32BIT_FLAGS=""
6103 ARCH_RUN_32BIT="true"
6104
6105 elif test "$UNIVERSAL_ARCHS" = "all" ; then
6106 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
6107 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren92397ce2010-01-17 19:32:00 +00006108 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006109
6110 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
6111 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
6112 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren92397ce2010-01-17 19:32:00 +00006113 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006114
6115 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
6116 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
6117 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren9922f172010-02-11 13:19:34 +00006118 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006119
6120 else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006121 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 +00006122
6123 fi
6124
6125
Ronald Oussoren974eb5e2010-04-18 17:59:37 +00006126 CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
6127 if test "${UNIVERSALSDK}" != "/"
6128 then
6129 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
6130 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
6131 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006132 fi
6133
6134 fi
6135
6136
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006137 ;;
6138 OSF*)
6139 BASECFLAGS="$BASECFLAGS -mieee"
6140 ;;
6141 esac
6142 ;;
6143
6144*)
6145 case $ac_sys_system in
6146 OpenUNIX*|UnixWare*)
6147 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
6148 ;;
6149 OSF*)
6150 BASECFLAGS="$BASECFLAGS -ieee -std"
6151 ;;
6152 SCO_SV*)
6153 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
6154 ;;
6155 esac
6156 ;;
6157esac
6158
6159if test "$Py_DEBUG" = 'true'; then
6160 :
6161else
6162 OPT="-DNDEBUG $OPT"
6163fi
6164
6165if test "$ac_arch_flags"
6166then
6167 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
6168fi
6169
6170# disable check for icc since it seems to pass, but generates a warning
6171if test "$CC" = icc
6172then
6173 ac_cv_opt_olimit_ok=no
6174fi
6175
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -OPT:Olimit=0" >&5
6177$as_echo_n "checking whether $CC accepts -OPT:Olimit=0... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006178if ${ac_cv_opt_olimit_ok+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006179 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006180else
6181 ac_save_cc="$CC"
6182CC="$CC -OPT:Olimit=0"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006183cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006184/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00006185
6186int
6187main ()
6188{
Mark Dickinson5e13e292010-05-11 08:55:06 +00006189
Gregory P. Smith373469a2009-11-01 21:03:38 +00006190 ;
6191 return 0;
6192}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006193_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006194if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006195 ac_cv_opt_olimit_ok=yes
6196else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006197 ac_cv_opt_olimit_ok=no
Matthias Klosec511b472010-05-08 11:01:39 +00006198
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006199fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00006200rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006201CC="$ac_save_cc"
6202fi
6203
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006204{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_opt_olimit_ok" >&5
6205$as_echo "$ac_cv_opt_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006206if test $ac_cv_opt_olimit_ok = yes; then
6207 case $ac_sys_system in
6208 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
6209 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
6210 # environment?
6211 Darwin*)
6212 ;;
Trent Nelson34562e12012-10-17 18:01:12 -04006213 # XXX thankfully this useless troublemaker of a flag has been
6214 # eradicated in the 3.x line. For now, make sure it isn't picked
6215 # up by any of our other platforms that use CC.
6216 AIX*|SunOS*|HP-UX*|IRIX*)
6217 ;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006218 *)
6219 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
6220 ;;
6221 esac
6222else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006223 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Olimit 1500" >&5
6224$as_echo_n "checking whether $CC accepts -Olimit 1500... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006225 if ${ac_cv_olimit_ok+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006226 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006227else
6228 ac_save_cc="$CC"
6229 CC="$CC -Olimit 1500"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006230 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006231/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00006232
6233int
6234main ()
6235{
Mark Dickinson5e13e292010-05-11 08:55:06 +00006236
Gregory P. Smith373469a2009-11-01 21:03:38 +00006237 ;
6238 return 0;
6239}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006240_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006241if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006242 ac_cv_olimit_ok=yes
6243else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006244 ac_cv_olimit_ok=no
Matthias Klosec511b472010-05-08 11:01:39 +00006245
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006246fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00006247rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006248 CC="$ac_save_cc"
6249fi
6250
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006251 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_olimit_ok" >&5
6252$as_echo "$ac_cv_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006253 if test $ac_cv_olimit_ok = yes; then
Stefan Krah67473262012-11-29 00:17:05 +01006254 case $ac_sys_system in
6255 # Issue #16534: On HP-UX ac_cv_olimit_ok=yes is a false positive.
6256 HP-UX*)
6257 ;;
6258 *)
6259 BASECFLAGS="$BASECFLAGS -Olimit 1500"
6260 ;;
6261 esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006262 fi
6263fi
6264
6265# Check whether GCC supports PyArg_ParseTuple format
6266if test "$GCC" = "yes"
6267then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006268 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
6269$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006270 save_CFLAGS=$CFLAGS
Benjamin Petersonc8759662013-05-11 13:00:05 -05006271 CFLAGS="$CFLAGS -Werror -Wformat"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006272 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006273/* end confdefs.h. */
6274
6275 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006276int
6277main ()
6278{
6279
6280 ;
6281 return 0;
6282}
Matthias Klosec511b472010-05-08 11:01:39 +00006283
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006284_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006285if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006286
Matthias Klosec511b472010-05-08 11:01:39 +00006287
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006288$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006289
Matthias Klosec511b472010-05-08 11:01:39 +00006290 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006291$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00006292
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006293else
Matthias Klosec511b472010-05-08 11:01:39 +00006294
6295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006296$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006297
6298fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006299rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6300 CFLAGS=$save_CFLAGS
6301fi
6302
6303# On some compilers, pthreads are available without further options
6304# (e.g. MacOS X). On some of these systems, the compiler will not
6305# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
6306# So we have to see first whether pthreads are available without
6307# options before we can check whether -Kpthread improves anything.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
6309$as_echo_n "checking whether pthreads are available without options... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006310if ${ac_cv_pthread_is_default+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006311 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006312else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006313 if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006314 ac_cv_pthread_is_default=no
6315else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006316 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006317/* end confdefs.h. */
6318
Stefan Krahae66ca62012-11-22 22:36:57 +01006319#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006320#include <pthread.h>
6321
6322void* routine(void* p){return NULL;}
6323
6324int main(){
6325 pthread_t p;
6326 if(pthread_create(&p,NULL,routine,NULL)!=0)
6327 return 1;
6328 (void)pthread_detach(p);
6329 return 0;
6330}
6331
6332_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006333if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006334
6335 ac_cv_pthread_is_default=yes
6336 ac_cv_kthread=no
6337 ac_cv_pthread=no
6338
6339else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006340 ac_cv_pthread_is_default=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006341fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006342rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6343 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006344fi
6345
6346
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006347fi
6348
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006349{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
6350$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006351
6352
6353if test $ac_cv_pthread_is_default = yes
6354then
6355 ac_cv_kpthread=no
6356else
6357# -Kpthread, if available, provides the right #defines
6358# and linker options to make pthread_create available
6359# Some compilers won't report that they do not support -Kpthread,
6360# so we need to run a program to see whether it really made the
6361# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
6363$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006364if ${ac_cv_kpthread+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006365 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006366else
6367 ac_save_cc="$CC"
6368CC="$CC -Kpthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006369if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006370 ac_cv_kpthread=no
6371else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006372 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006373/* end confdefs.h. */
6374
Stefan Krahae66ca62012-11-22 22:36:57 +01006375#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006376#include <pthread.h>
6377
6378void* routine(void* p){return NULL;}
6379
6380int main(){
6381 pthread_t p;
6382 if(pthread_create(&p,NULL,routine,NULL)!=0)
6383 return 1;
6384 (void)pthread_detach(p);
6385 return 0;
6386}
6387
6388_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006389if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006390 ac_cv_kpthread=yes
6391else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006392 ac_cv_kpthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006393fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006394rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6395 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006396fi
6397
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006398CC="$ac_save_cc"
6399fi
6400
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006401{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
6402$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006403fi
6404
6405if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
6406then
6407# -Kthread, if available, provides the right #defines
6408# and linker options to make pthread_create available
6409# Some compilers won't report that they do not support -Kthread,
6410# so we need to run a program to see whether it really made the
6411# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
6413$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006414if ${ac_cv_kthread+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006415 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006416else
6417 ac_save_cc="$CC"
6418CC="$CC -Kthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006419if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006420 ac_cv_kthread=no
6421else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006422 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006423/* end confdefs.h. */
6424
Stefan Krahae66ca62012-11-22 22:36:57 +01006425#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006426#include <pthread.h>
6427
6428void* routine(void* p){return NULL;}
6429
6430int main(){
6431 pthread_t p;
6432 if(pthread_create(&p,NULL,routine,NULL)!=0)
6433 return 1;
6434 (void)pthread_detach(p);
6435 return 0;
6436}
6437
6438_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006439if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006440 ac_cv_kthread=yes
6441else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006442 ac_cv_kthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006443fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006444rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6445 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006446fi
6447
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006448CC="$ac_save_cc"
6449fi
6450
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006451{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
6452$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006453fi
6454
6455if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
6456then
6457# -pthread, if available, provides the right #defines
6458# and linker options to make pthread_create available
6459# Some compilers won't report that they do not support -pthread,
6460# so we need to run a program to see whether it really made the
6461# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
6463$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.orgfa3f9a32013-01-25 15:32:31 +01006464if ${ac_cv_pthread+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006465 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006466else
6467 ac_save_cc="$CC"
6468CC="$CC -pthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006469if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006470 ac_cv_pthread=no
6471else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006472 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006473/* end confdefs.h. */
6474
Stefan Krahae66ca62012-11-22 22:36:57 +01006475#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006476#include <pthread.h>
6477
6478void* routine(void* p){return NULL;}
6479
6480int main(){
6481 pthread_t p;
6482 if(pthread_create(&p,NULL,routine,NULL)!=0)
6483 return 1;
6484 (void)pthread_detach(p);
6485 return 0;
6486}
6487
6488_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006489if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006490 ac_cv_pthread=yes
6491else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006492 ac_cv_pthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006493fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006494rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6495 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006496fi
6497
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006498CC="$ac_save_cc"
6499fi
6500
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006501{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
6502$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006503fi
6504
6505# If we have set a CC compiler flag for thread support then
6506# check if it works for CXX, too.
6507ac_cv_cxx_thread=no
6508if test ! -z "$CXX"
6509then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
6511$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006512ac_save_cxx="$CXX"
6513
6514if test "$ac_cv_kpthread" = "yes"
6515then
6516 CXX="$CXX -Kpthread"
6517 ac_cv_cxx_thread=yes
6518elif test "$ac_cv_kthread" = "yes"
6519then
6520 CXX="$CXX -Kthread"
6521 ac_cv_cxx_thread=yes
6522elif test "$ac_cv_pthread" = "yes"
6523then
6524 CXX="$CXX -pthread"
6525 ac_cv_cxx_thread=yes
6526fi
6527
6528if test $ac_cv_cxx_thread = yes
6529then
6530 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
6531 $CXX -c conftest.$ac_ext 2>&5
6532 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
6533 && test -s conftest$ac_exeext && ./conftest$ac_exeext
6534 then
6535 ac_cv_cxx_thread=yes
6536 else
6537 ac_cv_cxx_thread=no
6538 fi
6539 rm -fr conftest*
6540fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006541{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
6542$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006543fi
6544CXX="$ac_save_cxx"
6545
6546
6547# checks for header files
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6549$as_echo_n "checking for ANSI C header files... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006550if ${ac_cv_header_stdc+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006551 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006552else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006553 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006554/* end confdefs.h. */
6555#include <stdlib.h>
6556#include <stdarg.h>
6557#include <string.h>
6558#include <float.h>
6559
6560int
6561main ()
6562{
6563
6564 ;
6565 return 0;
6566}
6567_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006568if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006569 ac_cv_header_stdc=yes
6570else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006571 ac_cv_header_stdc=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006572fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006573rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6574
6575if test $ac_cv_header_stdc = yes; then
6576 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006577 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006578/* end confdefs.h. */
6579#include <string.h>
6580
6581_ACEOF
6582if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006583 $EGREP "memchr" >/dev/null 2>&1; then :
6584
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006585else
6586 ac_cv_header_stdc=no
6587fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006588rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006589
6590fi
6591
6592if test $ac_cv_header_stdc = yes; then
6593 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006594 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006595/* end confdefs.h. */
6596#include <stdlib.h>
6597
6598_ACEOF
6599if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006600 $EGREP "free" >/dev/null 2>&1; then :
6601
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006602else
6603 ac_cv_header_stdc=no
6604fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006605rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006606
6607fi
6608
6609if test $ac_cv_header_stdc = yes; then
6610 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006611 if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006612 :
6613else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006614 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006615/* end confdefs.h. */
6616#include <ctype.h>
6617#include <stdlib.h>
6618#if ((' ' & 0x0FF) == 0x020)
6619# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6620# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6621#else
6622# define ISLOWER(c) \
6623 (('a' <= (c) && (c) <= 'i') \
6624 || ('j' <= (c) && (c) <= 'r') \
6625 || ('s' <= (c) && (c) <= 'z'))
6626# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6627#endif
6628
6629#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6630int
6631main ()
6632{
6633 int i;
6634 for (i = 0; i < 256; i++)
6635 if (XOR (islower (i), ISLOWER (i))
6636 || toupper (i) != TOUPPER (i))
6637 return 2;
6638 return 0;
6639}
6640_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006641if ac_fn_c_try_run "$LINENO"; then :
6642
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006643else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006644 ac_cv_header_stdc=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006645fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006646rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6647 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006648fi
6649
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006650fi
6651fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006652{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6653$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006654if test $ac_cv_header_stdc = yes; then
6655
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006656$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006657
6658fi
6659
doko@ubuntu.comf27ec3e2014-04-17 20:11:19 +02006660for ac_header in asm/types.h conio.h direct.h dlfcn.h errno.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00006661fcntl.h grp.h \
doko@ubuntu.comf27ec3e2014-04-17 20:11:19 +02006662ieeefp.h io.h langinfo.h libintl.h poll.h process.h pthread.h \
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00006663shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006664unistd.h utime.h \
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00006665sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
6666sys/lock.h sys/mkdev.h sys/modem.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00006667sys/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 +00006668sys/termio.h sys/time.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00006669sys/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 +00006670sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimes3aa138f2013-06-18 13:25:24 +02006671bluetooth/bluetooth.h linux/tipc.h spawn.h util.h alloca.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006672do :
6673 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6674ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006675if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006676 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006677#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006678_ACEOF
6679
6680fi
6681
Guido van Rossum627b2d71993-12-24 10:39:16 +00006682done
6683
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006684ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006685for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006686 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6688$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006689if eval \${$as_ac_Header+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006690 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006691else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006692 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006693/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006694#include <sys/types.h>
6695#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006696
Martin v. Löwis11437992002-04-12 09:54:03 +00006697int
6698main ()
6699{
6700if ((DIR *) 0)
6701return 0;
6702 ;
6703 return 0;
6704}
6705_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006706if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006707 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006708else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006709 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006710fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006711rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006712fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006713eval ac_res=\$$as_ac_Header
6714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6715$as_echo "$ac_res" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006716if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006717 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006718#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006719_ACEOF
6720
6721ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006722fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006723
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006724done
6725# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6726if test $ac_header_dirent = dirent.h; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006727 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6728$as_echo_n "checking for library containing opendir... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006729if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006730 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006731else
Martin v. Löwis11437992002-04-12 09:54:03 +00006732 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006733cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006734/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006735
Martin v. Löwiseba40652007-08-30 20:10:57 +00006736/* Override any GCC internal prototype to avoid an error.
6737 Use char because int might match the return type of a GCC
6738 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006739#ifdef __cplusplus
6740extern "C"
6741#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006742char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006743int
6744main ()
6745{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006746return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006747 ;
6748 return 0;
6749}
6750_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006751for ac_lib in '' dir; do
6752 if test -z "$ac_lib"; then
6753 ac_res="none required"
6754 else
6755 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00006756 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00006757 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006758 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006759 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00006760fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006761rm -f core conftest.err conftest.$ac_objext \
6762 conftest$ac_exeext
Matthias Klose3cef2a92012-03-14 23:39:33 +01006763 if ${ac_cv_search_opendir+:} false; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006764 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00006765fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006766done
Matthias Klose3cef2a92012-03-14 23:39:33 +01006767if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006768
Martin v. Löwiseba40652007-08-30 20:10:57 +00006769else
6770 ac_cv_search_opendir=no
6771fi
6772rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006773LIBS=$ac_func_search_save_LIBS
6774fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006775{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6776$as_echo "$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006777ac_res=$ac_cv_search_opendir
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006778if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006779 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006780
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006781fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006782
Michael W. Hudson54241132001-12-07 15:38:26 +00006783else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006784 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6785$as_echo_n "checking for library containing opendir... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006786if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006787 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006788else
6789 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006790cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006791/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006792
Martin v. Löwiseba40652007-08-30 20:10:57 +00006793/* Override any GCC internal prototype to avoid an error.
6794 Use char because int might match the return type of a GCC
6795 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006796#ifdef __cplusplus
6797extern "C"
6798#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006799char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006800int
6801main ()
6802{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006803return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006804 ;
6805 return 0;
6806}
6807_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006808for ac_lib in '' x; do
6809 if test -z "$ac_lib"; then
6810 ac_res="none required"
6811 else
6812 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00006813 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00006814 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006815 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006816 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00006817fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006818rm -f core conftest.err conftest.$ac_objext \
6819 conftest$ac_exeext
Matthias Klose3cef2a92012-03-14 23:39:33 +01006820 if ${ac_cv_search_opendir+:} false; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006821 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00006822fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006823done
Matthias Klose3cef2a92012-03-14 23:39:33 +01006824if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006825
Martin v. Löwiseba40652007-08-30 20:10:57 +00006826else
6827 ac_cv_search_opendir=no
6828fi
6829rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006830LIBS=$ac_func_search_save_LIBS
6831fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006832{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6833$as_echo "$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006834ac_res=$ac_cv_search_opendir
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006835if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006836 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006837
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006838fi
6839
6840fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006841
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
6843$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006844if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006845 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006846else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006847 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006848/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006849#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006850int
6851main ()
6852{
6853return makedev(0, 0);
6854 ;
6855 return 0;
6856}
6857_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006858if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006859 ac_cv_header_sys_types_h_makedev=yes
6860else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006861 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006862fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006863rm -f core conftest.err conftest.$ac_objext \
6864 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006865
6866fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006867{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
6868$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006869
6870if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006871ac_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 +01006872if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006873
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006874$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006875
6876fi
6877
6878
6879
6880 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006881 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 +01006882if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006883
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006884$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006885
6886fi
6887
6888
6889 fi
6890fi
6891
Michael W. Hudson54241132001-12-07 15:38:26 +00006892
Martin v. Löwis11017b12006-01-14 18:12:57 +00006893# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00006894for ac_header in linux/netlink.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006895do :
6896 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 +00006897#ifdef HAVE_ASM_TYPES_H
6898#include <asm/types.h>
6899#endif
6900#ifdef HAVE_SYS_SOCKET_H
6901#include <sys/socket.h>
6902#endif
6903
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006904"
Matthias Klose3cef2a92012-03-14 23:39:33 +01006905if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00006906 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006907#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006908_ACEOF
6909
6910fi
6911
6912done
6913
6914
Guido van Rossum627b2d71993-12-24 10:39:16 +00006915# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006916was_it_defined=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
6918$as_echo_n "checking for clock_t in time.h... " >&6; }
6919cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006920/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006921#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006922
6923_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006924if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006925 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00006926 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006927else
Martin v. Löwis11437992002-04-12 09:54:03 +00006928
6929
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006930$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00006931
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006932
Guido van Rossum627b2d71993-12-24 10:39:16 +00006933fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006934rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006935
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006936{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
6937$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006938
Neal Norwitz11690112002-07-30 01:08:28 +00006939# Check whether using makedev requires defining _OSF_SOURCE
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
6941$as_echo_n "checking for makedev... " >&6; }
6942cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006943/* end confdefs.h. */
Jesus Cea616de772010-04-28 10:32:30 +00006944
6945#if defined(MAJOR_IN_MKDEV)
6946#include <sys/mkdev.h>
6947#elif defined(MAJOR_IN_SYSMACROS)
6948#include <sys/sysmacros.h>
6949#else
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006950#include <sys/types.h>
Jesus Cea616de772010-04-28 10:32:30 +00006951#endif
Neal Norwitz11690112002-07-30 01:08:28 +00006952int
6953main ()
6954{
6955 makedev(0, 0)
6956 ;
6957 return 0;
6958}
6959_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006960if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006961 ac_cv_has_makedev=yes
6962else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006963 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006964fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006965rm -f core conftest.err conftest.$ac_objext \
6966 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006967if test "$ac_cv_has_makedev" = "no"; then
6968 # we didn't link, try if _OSF_SOURCE will allow us to link
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006969 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006970/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006971
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006972#define _OSF_SOURCE 1
6973#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006974
Neal Norwitz11690112002-07-30 01:08:28 +00006975int
6976main ()
6977{
6978 makedev(0, 0)
6979 ;
6980 return 0;
6981}
6982_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006983if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006984 ac_cv_has_makedev=yes
6985else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006986 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006987fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006988rm -f core conftest.err conftest.$ac_objext \
6989 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006990 if test "$ac_cv_has_makedev" = "yes"; then
6991
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006992$as_echo "#define _OSF_SOURCE 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006993
6994 fi
6995fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006996{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
6997$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006998if test "$ac_cv_has_makedev" = "yes"; then
6999
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007000$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007001
7002fi
7003
Martin v. Löwis399a6892002-10-04 10:22:02 +00007004# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
7005# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
7006# defined, but the compiler does not support pragma redefine_extname,
7007# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
7008# structures (such as rlimit64) without declaring them. As a
7009# work-around, disable LFS on such configurations
7010
7011use_lfs=yes
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
7013$as_echo_n "checking Solaris LFS bug... " >&6; }
7014cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007015/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00007016
7017#define _LARGEFILE_SOURCE 1
7018#define _FILE_OFFSET_BITS 64
7019#include <sys/resource.h>
7020
Martin v. Löwis399a6892002-10-04 10:22:02 +00007021int
7022main ()
7023{
7024struct rlimit foo;
7025 ;
7026 return 0;
7027}
7028_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007029if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00007030 sol_lfs_bug=no
7031else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007032 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00007033fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007034rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007035{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
7036$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00007037if test "$sol_lfs_bug" = "yes"; then
7038 use_lfs=no
7039fi
7040
7041if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00007042# Two defines needed to enable largefile support on various platforms
7043# These may affect some typedefs
Georg Brandl94800df2011-02-25 11:09:02 +00007044case $ac_sys_system/$ac_sys_release in
7045AIX*)
7046
7047$as_echo "#define _LARGE_FILES 1" >>confdefs.h
7048
7049 ;;
7050esac
Guido van Rossum810cc512001-09-09 23:51:39 +00007051
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007052$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007053
7054
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007055$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00007056
Martin v. Löwis399a6892002-10-04 10:22:02 +00007057fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007058
Guido van Rossum84e7b241996-08-19 21:59:00 +00007059# Add some code to confdefs.h so that the test for off_t works on SCO
7060cat >> confdefs.h <<\EOF
7061#if defined(SCO_DS)
7062#undef _OFF_T
7063#endif
7064EOF
7065
Guido van Rossumef2255b2000-03-10 22:30:29 +00007066# Type availability checks
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007067ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007068if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007069
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007070else
Martin v. Löwis11437992002-04-12 09:54:03 +00007071
7072cat >>confdefs.h <<_ACEOF
7073#define mode_t int
7074_ACEOF
7075
7076fi
7077
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007078ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007079if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007080
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007081else
Martin v. Löwis11437992002-04-12 09:54:03 +00007082
7083cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007084#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00007085_ACEOF
7086
7087fi
7088
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007089ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007090if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007091
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007092else
Martin v. Löwis11437992002-04-12 09:54:03 +00007093
7094cat >>confdefs.h <<_ACEOF
7095#define pid_t int
7096_ACEOF
7097
7098fi
7099
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007100
Martin v. Löwis11437992002-04-12 09:54:03 +00007101cat >>confdefs.h <<_ACEOF
Matthias Klosecbf54b12010-05-08 11:04:18 +00007102#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00007103_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007104
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007105ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007106if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007107
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007108else
Martin v. Löwis11437992002-04-12 09:54:03 +00007109
7110cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007111#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007112_ACEOF
7113
7114fi
7115
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
7117$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007118if ${ac_cv_type_uid_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007119 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007120else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007122/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007123#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007124
7125_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007126if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007127 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007128 ac_cv_type_uid_t=yes
7129else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007130 ac_cv_type_uid_t=no
7131fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00007132rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007133
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007134fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007135{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
7136$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007137if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007138
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007139$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007140
7141
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007142$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007143
7144fi
7145
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007146
7147# There are two separate checks for each of the exact-width integer types we
7148# need. First we check whether the type is available using the usual
7149# AC_CHECK_TYPE macro with the default includes (which includes <inttypes.h>
7150# and <stdint.h> where available). We then also use the special type checks of
7151# the form AC_TYPE_UINT32_T, which in the case that uint32_t is not available
7152# directly, #define's uint32_t to be a suitable type.
7153
7154ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
7155if test "x$ac_cv_type_uint32_t" = xyes; then :
7156
7157$as_echo "#define HAVE_UINT32_T 1" >>confdefs.h
7158
7159fi
7160
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007161ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
7162case $ac_cv_c_uint32_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007163 no|yes) ;; #(
7164 *)
7165
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007166$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007167
7168
7169cat >>confdefs.h <<_ACEOF
7170#define uint32_t $ac_cv_c_uint32_t
7171_ACEOF
7172;;
7173 esac
7174
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007175
7176ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
7177if test "x$ac_cv_type_uint64_t" = xyes; then :
7178
7179$as_echo "#define HAVE_UINT64_T 1" >>confdefs.h
7180
7181fi
7182
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007183ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
7184case $ac_cv_c_uint64_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007185 no|yes) ;; #(
7186 *)
7187
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007188$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007189
7190
7191cat >>confdefs.h <<_ACEOF
7192#define uint64_t $ac_cv_c_uint64_t
7193_ACEOF
7194;;
7195 esac
7196
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007197
7198ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
7199if test "x$ac_cv_type_int32_t" = xyes; then :
7200
7201$as_echo "#define HAVE_INT32_T 1" >>confdefs.h
7202
7203fi
7204
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007205ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
7206case $ac_cv_c_int32_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007207 no|yes) ;; #(
7208 *)
7209
7210cat >>confdefs.h <<_ACEOF
7211#define int32_t $ac_cv_c_int32_t
7212_ACEOF
7213;;
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007214esac
7215
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007216
7217ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
7218if test "x$ac_cv_type_int64_t" = xyes; then :
7219
7220$as_echo "#define HAVE_INT64_T 1" >>confdefs.h
7221
7222fi
7223
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007224ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
7225case $ac_cv_c_int64_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007226 no|yes) ;; #(
7227 *)
7228
7229cat >>confdefs.h <<_ACEOF
7230#define int64_t $ac_cv_c_int64_t
7231_ACEOF
7232;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007233esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00007234
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007235
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007236ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007237if test "x$ac_cv_type_ssize_t" = xyes; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007238
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007239$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00007240
7241fi
7242
Jack Jansendd19cf82001-12-06 22:36:17 +00007243
Michael W. Hudson54241132001-12-07 15:38:26 +00007244# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007245# ANSI C requires sizeof(char) == 1, so no need to check it
Martin v. Löwiseba40652007-08-30 20:10:57 +00007246# The cast to long int works around a bug in the HP C Compiler
7247# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7248# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7249# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
7251$as_echo_n "checking size of int... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007252if ${ac_cv_sizeof_int+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007253 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007254else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007255 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 +00007256
Martin v. Löwis11437992002-04-12 09:54:03 +00007257else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007258 if test "$ac_cv_type_int" = yes; then
7259 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7260$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007261as_fn_error 77 "cannot compute sizeof (int)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007262See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007263 else
7264 ac_cv_sizeof_int=0
7265 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007266fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007267
Martin v. Löwis11437992002-04-12 09:54:03 +00007268fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007269{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
7270$as_echo "$ac_cv_sizeof_int" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007271
7272
7273
Martin v. Löwis11437992002-04-12 09:54:03 +00007274cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007275#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007276_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007277
7278
Martin v. Löwiseba40652007-08-30 20:10:57 +00007279# The cast to long int works around a bug in the HP C Compiler
7280# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7281# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7282# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
7284$as_echo_n "checking size of long... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007285if ${ac_cv_sizeof_long+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007286 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007287else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007288 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 +00007289
Martin v. Löwis11437992002-04-12 09:54:03 +00007290else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007291 if test "$ac_cv_type_long" = yes; then
7292 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7293$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007294as_fn_error 77 "cannot compute sizeof (long)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007295See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007296 else
7297 ac_cv_sizeof_long=0
7298 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007299fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007300
Martin v. Löwis11437992002-04-12 09:54:03 +00007301fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007302{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
7303$as_echo "$ac_cv_sizeof_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007304
7305
7306
Martin v. Löwis11437992002-04-12 09:54:03 +00007307cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007308#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007309_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007310
7311
Martin v. Löwiseba40652007-08-30 20:10:57 +00007312# The cast to long int works around a bug in the HP C Compiler
7313# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7314# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7315# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
7317$as_echo_n "checking size of void *... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007318if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007319 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007320else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007321 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 +00007322
Martin v. Löwis11437992002-04-12 09:54:03 +00007323else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007324 if test "$ac_cv_type_void_p" = yes; then
7325 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7326$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007327as_fn_error 77 "cannot compute sizeof (void *)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007328See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007329 else
7330 ac_cv_sizeof_void_p=0
7331 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007332fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007333
Martin v. Löwis11437992002-04-12 09:54:03 +00007334fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007335{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
7336$as_echo "$ac_cv_sizeof_void_p" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007337
7338
7339
Martin v. Löwis11437992002-04-12 09:54:03 +00007340cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007341#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00007342_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007343
7344
Martin v. Löwiseba40652007-08-30 20:10:57 +00007345# The cast to long int works around a bug in the HP C Compiler
7346# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7347# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7348# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
7350$as_echo_n "checking size of short... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007351if ${ac_cv_sizeof_short+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007352 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007353else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007354 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 +00007355
Martin v. Löwis11437992002-04-12 09:54:03 +00007356else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007357 if test "$ac_cv_type_short" = yes; then
7358 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7359$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007360as_fn_error 77 "cannot compute sizeof (short)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007361See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007362 else
7363 ac_cv_sizeof_short=0
7364 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007365fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007366
Martin v. Löwis11437992002-04-12 09:54:03 +00007367fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007368{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
7369$as_echo "$ac_cv_sizeof_short" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007370
7371
7372
Martin v. Löwis11437992002-04-12 09:54:03 +00007373cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007374#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007375_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007376
7377
Martin v. Löwiseba40652007-08-30 20:10:57 +00007378# The cast to long int works around a bug in the HP C Compiler
7379# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7380# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7381# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
7383$as_echo_n "checking size of float... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007384if ${ac_cv_sizeof_float+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007385 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007386else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007387 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 +00007388
Martin v. Löwis11437992002-04-12 09:54:03 +00007389else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007390 if test "$ac_cv_type_float" = yes; then
7391 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7392$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007393as_fn_error 77 "cannot compute sizeof (float)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007394See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007395 else
7396 ac_cv_sizeof_float=0
7397 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007398fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007399
Martin v. Löwis11437992002-04-12 09:54:03 +00007400fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007401{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
7402$as_echo "$ac_cv_sizeof_float" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007403
7404
7405
Martin v. Löwis11437992002-04-12 09:54:03 +00007406cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007407#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007408_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007409
7410
Martin v. Löwiseba40652007-08-30 20:10:57 +00007411# The cast to long int works around a bug in the HP C Compiler
7412# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7413# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7414# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
7416$as_echo_n "checking size of double... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007417if ${ac_cv_sizeof_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007418 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007419else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007420 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 +00007421
Martin v. Löwis11437992002-04-12 09:54:03 +00007422else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007423 if test "$ac_cv_type_double" = yes; then
7424 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7425$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007426as_fn_error 77 "cannot compute sizeof (double)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007427See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007428 else
7429 ac_cv_sizeof_double=0
7430 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007431fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007432
Martin v. Löwis11437992002-04-12 09:54:03 +00007433fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007434{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
7435$as_echo "$ac_cv_sizeof_double" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007436
7437
7438
Martin v. Löwis11437992002-04-12 09:54:03 +00007439cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007440#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007441_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007442
7443
Martin v. Löwiseba40652007-08-30 20:10:57 +00007444# The cast to long int works around a bug in the HP C Compiler
7445# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7446# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7447# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
7449$as_echo_n "checking size of fpos_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007450if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007451 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007452else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007453 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 +00007454
Martin v. Löwis11437992002-04-12 09:54:03 +00007455else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007456 if test "$ac_cv_type_fpos_t" = yes; then
7457 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7458$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007459as_fn_error 77 "cannot compute sizeof (fpos_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007460See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007461 else
7462 ac_cv_sizeof_fpos_t=0
7463 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007464fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007465
Martin v. Löwis11437992002-04-12 09:54:03 +00007466fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007467{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
7468$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007469
7470
7471
Martin v. Löwis11437992002-04-12 09:54:03 +00007472cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007473#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007474_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007475
Michael W. Hudson54241132001-12-07 15:38:26 +00007476
Martin v. Löwiseba40652007-08-30 20:10:57 +00007477# The cast to long int works around a bug in the HP C Compiler
7478# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7479# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7480# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
7482$as_echo_n "checking size of size_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007483if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007484 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007485else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007486 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 +00007487
Martin v. Löwis18e16552006-02-15 17:27:45 +00007488else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007489 if test "$ac_cv_type_size_t" = yes; then
7490 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7491$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007492as_fn_error 77 "cannot compute sizeof (size_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007493See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007494 else
7495 ac_cv_sizeof_size_t=0
7496 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00007497fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007498
Martin v. Löwis18e16552006-02-15 17:27:45 +00007499fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007500{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
7501$as_echo "$ac_cv_sizeof_size_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007502
7503
7504
Martin v. Löwis18e16552006-02-15 17:27:45 +00007505cat >>confdefs.h <<_ACEOF
7506#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
7507_ACEOF
7508
7509
Christian Heimes951cc0f2008-01-31 23:08:23 +00007510# The cast to long int works around a bug in the HP C Compiler
7511# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7512# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7513# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
7515$as_echo_n "checking size of pid_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007516if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007517 $as_echo_n "(cached) " >&6
Christian Heimes951cc0f2008-01-31 23:08:23 +00007518else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007519 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 +00007520
Christian Heimes951cc0f2008-01-31 23:08:23 +00007521else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007522 if test "$ac_cv_type_pid_t" = yes; then
7523 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7524$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007525as_fn_error 77 "cannot compute sizeof (pid_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007526See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes951cc0f2008-01-31 23:08:23 +00007527 else
7528 ac_cv_sizeof_pid_t=0
7529 fi
7530fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007531
Christian Heimes951cc0f2008-01-31 23:08:23 +00007532fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007533{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
7534$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes951cc0f2008-01-31 23:08:23 +00007535
7536
7537
7538cat >>confdefs.h <<_ACEOF
7539#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
7540_ACEOF
7541
7542
Michael W. Hudson54241132001-12-07 15:38:26 +00007543
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
7545$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007546have_long_long=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007547cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007548/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007549
Martin v. Löwis11437992002-04-12 09:54:03 +00007550int
7551main ()
7552{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007553long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007554 ;
7555 return 0;
7556}
7557_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007558if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007559
7560
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007561$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007562
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007563 have_long_long=yes
7564
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007565fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007566rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007567{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
7568$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007569if test "$have_long_long" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00007570# The cast to long int works around a bug in the HP C Compiler
7571# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7572# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7573# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
7575$as_echo_n "checking size of long long... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007576if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007577 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007578else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007579 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 +00007580
Martin v. Löwis11437992002-04-12 09:54:03 +00007581else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007582 if test "$ac_cv_type_long_long" = yes; then
7583 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7584$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007585as_fn_error 77 "cannot compute sizeof (long long)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007586See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007587 else
7588 ac_cv_sizeof_long_long=0
7589 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007590fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007591
Martin v. Löwis11437992002-04-12 09:54:03 +00007592fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007593{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
7594$as_echo "$ac_cv_sizeof_long_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007595
7596
7597
Martin v. Löwis11437992002-04-12 09:54:03 +00007598cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007599#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007600_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007601
Michael W. Hudson54241132001-12-07 15:38:26 +00007602
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007603fi
7604
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
7606$as_echo_n "checking for long double support... " >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007607have_long_double=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007608cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007609/* end confdefs.h. */
7610
7611int
7612main ()
7613{
Matthias Klosec511b472010-05-08 11:01:39 +00007614long double x; x = (long double)0;
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007615 ;
7616 return 0;
7617}
7618_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007619if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007620
7621
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007622$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007623
7624 have_long_double=yes
7625
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007626fi
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007627rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007628{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
7629$as_echo "$have_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007630if test "$have_long_double" = yes ; then
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007631# The cast to long int works around a bug in the HP C Compiler
7632# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7633# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7634# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
7636$as_echo_n "checking size of long double... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007637if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007638 $as_echo_n "(cached) " >&6
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007639else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007640 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 +00007641
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007642else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007643 if test "$ac_cv_type_long_double" = yes; then
7644 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7645$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007646as_fn_error 77 "cannot compute sizeof (long double)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007647See \`config.log' for more details" "$LINENO" 5; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007648 else
7649 ac_cv_sizeof_long_double=0
7650 fi
7651fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007652
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007653fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007654{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
7655$as_echo "$ac_cv_sizeof_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007656
7657
7658
7659cat >>confdefs.h <<_ACEOF
7660#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
7661_ACEOF
7662
7663
7664fi
7665
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
7667$as_echo_n "checking for _Bool support... " >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007668have_c99_bool=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007669cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007670/* end confdefs.h. */
7671
7672int
7673main ()
7674{
7675_Bool x; x = (_Bool)0;
7676 ;
7677 return 0;
7678}
7679_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007680if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007681
7682
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007683$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007684
7685 have_c99_bool=yes
7686
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007687fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007688rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007689{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7690$as_echo "$have_c99_bool" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007691if test "$have_c99_bool" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00007692# The cast to long int works around a bug in the HP C Compiler
7693# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7694# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7695# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7697$as_echo_n "checking size of _Bool... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007698if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007699 $as_echo_n "(cached) " >&6
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007700else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007701 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 +00007702
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007703else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007704 if test "$ac_cv_type__Bool" = yes; then
7705 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7706$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007707as_fn_error 77 "cannot compute sizeof (_Bool)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007708See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007709 else
7710 ac_cv_sizeof__Bool=0
7711 fi
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007712fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007713
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007714fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007715{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7716$as_echo "$ac_cv_sizeof__Bool" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007717
7718
7719
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007720cat >>confdefs.h <<_ACEOF
7721#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7722_ACEOF
7723
7724
7725fi
7726
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007727ac_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 +00007728 #include <stdint.h>
7729 #endif
Antoine Pitrou7be5a652010-10-10 08:14:41 +00007730 #ifdef HAVE_INTTYPES_H
7731 #include <inttypes.h>
7732 #endif
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007733"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007734if test "x$ac_cv_type_uintptr_t" = xyes; then :
Martin v. Löwisebe26702006-10-02 14:55:51 +00007735
7736cat >>confdefs.h <<_ACEOF
7737#define HAVE_UINTPTR_T 1
7738_ACEOF
7739
Martin v. Löwiseba40652007-08-30 20:10:57 +00007740# The cast to long int works around a bug in the HP C Compiler
7741# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7742# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7743# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7745$as_echo_n "checking size of uintptr_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007746if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007747 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007748else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007749 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 +00007750
Martin v. Löwis11437992002-04-12 09:54:03 +00007751else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007752 if test "$ac_cv_type_uintptr_t" = yes; then
7753 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7754$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007755as_fn_error 77 "cannot compute sizeof (uintptr_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007756See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007757 else
7758 ac_cv_sizeof_uintptr_t=0
7759 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007760fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007761
Martin v. Löwis11437992002-04-12 09:54:03 +00007762fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007763{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7764$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007765
7766
7767
Martin v. Löwis11437992002-04-12 09:54:03 +00007768cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007769#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007770_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007771
Michael W. Hudson54241132001-12-07 15:38:26 +00007772
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007773fi
7774
Martin v. Löwisebe26702006-10-02 14:55:51 +00007775
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007776# The cast to long int works around a bug in the HP C Compiler
7777# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7778# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7779# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
7781$as_echo_n "checking size of off_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007782if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007783 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007784else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007785 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007786#ifdef HAVE_SYS_TYPES_H
7787#include <sys/types.h>
7788#endif
7789
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007790"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007791
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007792else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007793 if test "$ac_cv_type_off_t" = yes; then
7794 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7795$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007796as_fn_error 77 "cannot compute sizeof (off_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007797See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007798 else
7799 ac_cv_sizeof_off_t=0
7800 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007801fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007802
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007803fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007804{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
7805$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007806
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007807
7808
Martin v. Löwis11437992002-04-12 09:54:03 +00007809cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007810#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007811_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007812
Michael W. Hudson54241132001-12-07 15:38:26 +00007813
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007814
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
7816$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson0ef0b912009-12-31 21:11:48 +00007817if test "$have_long_long" = yes
7818then
7819if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007820 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007821
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007822$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007823
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7825$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007826else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7828$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007829fi
Mark Dickinson0ef0b912009-12-31 21:11:48 +00007830else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7832$as_echo "no" >&6; }
Mark Dickinson0ef0b912009-12-31 21:11:48 +00007833fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007834
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007835# The cast to long int works around a bug in the HP C Compiler
7836# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7837# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7838# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
7840$as_echo_n "checking size of time_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007841if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007842 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007843else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007844 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007845#ifdef HAVE_SYS_TYPES_H
7846#include <sys/types.h>
7847#endif
7848#ifdef HAVE_TIME_H
7849#include <time.h>
7850#endif
7851
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007852"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007853
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007854else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007855 if test "$ac_cv_type_time_t" = yes; then
7856 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7857$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007858as_fn_error 77 "cannot compute sizeof (time_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007859See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007860 else
7861 ac_cv_sizeof_time_t=0
7862 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007863fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007864
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007865fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007866{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
7867$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007868
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007869
7870
Martin v. Löwis11437992002-04-12 09:54:03 +00007871cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007872#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007873_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007874
Michael W. Hudson54241132001-12-07 15:38:26 +00007875
7876
Trent Mick635f6fb2000-08-23 21:33:05 +00007877# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007878ac_save_cc="$CC"
7879if test "$ac_cv_kpthread" = "yes"
7880then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00007881elif test "$ac_cv_kthread" = "yes"
7882then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00007883elif test "$ac_cv_pthread" = "yes"
7884then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007885fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
7887$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007888have_pthread_t=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007889cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007890/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00007891
7892 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007893int
7894main ()
7895{
Guido van Rossum12580492000-09-24 16:47:19 +00007896pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007897 ;
7898 return 0;
7899}
Matthias Klosec511b472010-05-08 11:01:39 +00007900
Martin v. Löwis11437992002-04-12 09:54:03 +00007901_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007902if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00007903 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00007904fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007905rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007906{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
7907$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007908if test "$have_pthread_t" = yes ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007909 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007910# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7911# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7912# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
7914$as_echo_n "checking size of pthread_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007915if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007916 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007917else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007918 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007919#ifdef HAVE_PTHREAD_H
7920#include <pthread.h>
7921#endif
7922
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007923"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007924
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007925else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007926 if test "$ac_cv_type_pthread_t" = yes; then
7927 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7928$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007929as_fn_error 77 "cannot compute sizeof (pthread_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007930See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007931 else
7932 ac_cv_sizeof_pthread_t=0
7933 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00007934fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007935
Trent Mick635f6fb2000-08-23 21:33:05 +00007936fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007937{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
7938$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007939
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007940
7941
Martin v. Löwis11437992002-04-12 09:54:03 +00007942cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007943#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007944_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007945
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007946
Trent Mick635f6fb2000-08-23 21:33:05 +00007947fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007948CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00007949
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-toolbox-glue" >&5
7951$as_echo_n "checking for --enable-toolbox-glue... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007952# Check whether --enable-toolbox-glue was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007953if test "${enable_toolbox_glue+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007954 enableval=$enable_toolbox_glue;
7955fi
Jack Jansene578a632001-08-15 01:27:14 +00007956
7957
7958if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +00007959then
Jack Jansene578a632001-08-15 01:27:14 +00007960 case $ac_sys_system/$ac_sys_release in
7961 Darwin/*)
7962 enable_toolbox_glue="yes";;
7963 *)
7964 enable_toolbox_glue="no";;
7965 esac
7966fi
7967case "$enable_toolbox_glue" in
7968yes)
Jack Jansene578a632001-08-15 01:27:14 +00007969 extra_machdep_objs="Python/mactoolboxglue.o"
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007970 extra_undefs="-u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +00007971
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007972$as_echo "#define USE_TOOLBOX_OBJECT_GLUE 1" >>confdefs.h
Jack Jansene578a632001-08-15 01:27:14 +00007973
7974 ;;
7975*)
Jack Jansene578a632001-08-15 01:27:14 +00007976 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00007977 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00007978 ;;
7979esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007980{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_toolbox_glue" >&5
7981$as_echo "$enable_toolbox_glue" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007982
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007983
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00007984
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007985case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +00007986 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007987 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
7988 ;;
7989 Darwin/*)
7990 OTHER_LIBTOOL_OPT=""
7991 ;;
7992esac
7993
7994
Ronald Oussoren25967582009-09-06 10:00:26 +00007995
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007996case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +00007997 Darwin/[01567]\..*)
Ronald Oussoren988117f2006-04-29 11:31:35 +00007998 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
7999 if test "${enable_universalsdk}"; then
8000 :
8001 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00008002 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Ronald Oussoren988117f2006-04-29 11:31:35 +00008003 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008004 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008005 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008006 Darwin/*)
Ronald Oussorena55af9a2010-01-17 16:25:57 +00008007 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008008 if test ${gcc_version} '<' 4.0
8009 then
8010 LIBTOOL_CRUFT="-lcc_dynamic"
8011 else
8012 LIBTOOL_CRUFT=""
8013 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008014 if test "$cross_compiling" = yes; then :
Ronald Oussoren23d92532009-09-07 06:12:00 +00008015 ac_osx_32bit=yes
Ronald Oussoren25967582009-09-06 10:00:26 +00008016else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008017 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren25967582009-09-06 10:00:26 +00008018/* end confdefs.h. */
Ronald Oussoren23d92532009-09-07 06:12:00 +00008019
Ronald Oussoren25967582009-09-06 10:00:26 +00008020 #include <unistd.h>
8021 int main(int argc, char*argv[])
8022 {
8023 if (sizeof(long) == 4) {
8024 return 0;
8025 } else {
8026 return 1;
8027 }
Ronald Oussoren84ddd722009-09-08 07:17:10 +00008028 }
Ronald Oussoren23d92532009-09-07 06:12:00 +00008029
Ronald Oussoren25967582009-09-06 10:00:26 +00008030_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008031if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren25967582009-09-06 10:00:26 +00008032 ac_osx_32bit=yes
8033else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008034 ac_osx_32bit=no
Ronald Oussoren25967582009-09-06 10:00:26 +00008035fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008036rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8037 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren25967582009-09-06 10:00:26 +00008038fi
8039
8040
Ronald Oussoren25967582009-09-06 10:00:26 +00008041 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00008042 case `/usr/bin/arch` in
Ronald Oussoren25967582009-09-06 10:00:26 +00008043 i386)
8044 MACOSX_DEFAULT_ARCH="i386"
8045 ;;
8046 ppc)
8047 MACOSX_DEFAULT_ARCH="ppc"
8048 ;;
8049 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008050 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren25967582009-09-06 10:00:26 +00008051 ;;
8052 esac
8053 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00008054 case `/usr/bin/arch` in
Ronald Oussoren25967582009-09-06 10:00:26 +00008055 i386)
8056 MACOSX_DEFAULT_ARCH="x86_64"
8057 ;;
8058 ppc)
8059 MACOSX_DEFAULT_ARCH="ppc64"
8060 ;;
8061 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008062 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren25967582009-09-06 10:00:26 +00008063 ;;
8064 esac
8065
8066 #ARCH_RUN_32BIT="true"
8067 fi
8068
8069 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00008070 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008071 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008072esac
8073
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
8075$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008076if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008077then
Skip Montanarodecc6a42003-01-01 20:07:49 +00008078 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00008079 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008080 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008081
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008082$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008083
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8085$as_echo "yes" >&6; }
Ronald Oussoren450d5612009-06-08 21:12:41 +00008086 if test $enable_shared = "yes"
8087 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008088 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 +00008089 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008090else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8092$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008093fi
8094
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
8096$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008097case $ac_sys_system/$ac_sys_release in
8098 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008099
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008100$as_echo "#define WITH_DYLD 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: always on for Darwin" >&5
8103$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008104 ;;
8105 *)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8107$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008108 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008109esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008110
Guido van Rossum0a516c91994-09-12 10:58:40 +00008111# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008112
Michael W. Hudson54241132001-12-07 15:38:26 +00008113
8114
8115
8116
Ronald Oussoren75912852010-04-08 08:13:31 +00008117
Guido van Rossum0a516c91994-09-12 10:58:40 +00008118# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00008119# -- usually .so, .sl on HP-UX, .dll on Cygwin
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
8121$as_echo_n "checking SO... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008122if test -z "$SO"
8123then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008124 case $ac_sys_system in
Neal Norwitz58e28882006-05-19 07:00:58 +00008125 hp*|HP*)
8126 case `uname -m` in
8127 ia64) SO=.so;;
8128 *) SO=.sl;;
8129 esac
8130 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00008131 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00008132 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008133 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +00008134else
8135 # this might also be a termcap variable, see #610332
8136 echo
8137 echo '====================================================================='
8138 echo '+ +'
8139 echo '+ WARNING: You have set SO in your environment. +'
8140 echo '+ Do you really mean to change the extension for shared libraries? +'
8141 echo '+ Continuing in 10 seconds to let you to ponder. +'
8142 echo '+ +'
8143 echo '====================================================================='
8144 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +00008145fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008146{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
8147$as_echo "$SO" >&6; }
Neal Norwitz58e28882006-05-19 07:00:58 +00008148
Ronald Oussoren79f90492009-01-02 10:44:46 +00008149
Neal Norwitz58e28882006-05-19 07:00:58 +00008150cat >>confdefs.h <<_ACEOF
8151#define SHLIB_EXT "$SO"
8152_ACEOF
8153
Guido van Rossum0a516c91994-09-12 10:58:40 +00008154# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00008155# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008156# (Shared libraries in this instance are shared modules to be loaded into
8157# Python, as opposed to building Python itself as a shared library.)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
8159$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008160if test -z "$LDSHARED"
8161then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008162 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008163 AIX*)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008164 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00008165 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008166 ;;
8167 BeOS*)
8168 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +00008169 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008170 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00008171 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00008172 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008173 SunOS/5*)
Ronald Oussoren75912852010-04-08 08:13:31 +00008174 if test "$GCC" = "yes" ; then
8175 LDSHARED='$(CC) -shared'
8176 LDCXXSHARED='$(CXX) -shared'
8177 else
8178 LDSHARED='$(CC) -G'
8179 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a662000-05-26 12:22:54 +00008180 fi ;;
Thomas Hellerdc96a772008-04-04 10:07:55 +00008181 hp*|HP*)
Ronald Oussoren75912852010-04-08 08:13:31 +00008182 if test "$GCC" = "yes" ; then
8183 LDSHARED='$(CC) -shared'
8184 LDCXXSHARED='$(CXX) -shared'
8185 else
8186 LDSHARED='ld -b'
Thomas Hellerdc96a772008-04-04 10:07:55 +00008187 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +00008188 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +00008189 Darwin/1.3*)
Stefan Krah3a3e2032010-11-28 15:30:05 +00008190 LDSHARED='$(CC) -bundle'
8191 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00008192 if test "$enable_framework" ; then
8193 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008194 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8195 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008196 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008197 else
8198 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00008199 LDSHARED="$LDSHARED -undefined suppress"
Ronald Oussoren75912852010-04-08 08:13:31 +00008200 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00008201 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008202 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Stefan Krah3a3e2032010-11-28 15:30:05 +00008203 LDSHARED='$(CC) -bundle'
8204 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00008205 if test "$enable_framework" ; then
8206 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008207 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8208 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008209 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008210 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00008211 # No framework, use the Python app as bundle-loader
8212 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00008213 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008214 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008215 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008216 Darwin/*)
8217 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
8218 # This allows an extension to be used in any Python
Ronald Oussoren38f1b982007-09-02 09:46:07 +00008219
Ned Deilyc40b9032014-06-25 13:48:46 -07008220 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
8221 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
8222 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
8223 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
8224 if test ${dep_target_major} -eq 10 && \
8225 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00008226 then
Ned Deilyc40b9032014-06-25 13:48:46 -07008227 # building for OS X 10.0 through 10.2
Stefan Krah3a3e2032010-11-28 15:30:05 +00008228 LDSHARED='$(CC) -bundle'
8229 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00008230 if test "$enable_framework" ; then
8231 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008232 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8233 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008234 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008235 else
8236 # No framework, use the Python app as bundle-loader
8237 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
8238 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008239 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008240 fi
Ned Deilyc40b9032014-06-25 13:48:46 -07008241 else
8242 # building for OS X 10.3 and later
8243 if test "${enable_universalsdk}"; then
8244 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
8245 fi
8246 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
8247 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
8248 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00008249 fi
8250 ;;
Ronald Oussoren75912852010-04-08 08:13:31 +00008251 Linux*|GNU*|QNX*)
8252 LDSHARED='$(CC) -shared'
8253 LDCXXSHARED='$(CXX) -shared';;
8254 BSD/OS*/4*)
8255 LDSHARED="gcc -shared"
8256 LDCXXSHARED="g++ -shared";;
Martin v. Löwis222c5152006-06-03 07:37:13 +00008257 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00008258 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00008259 then
Stefan Krah3a3e2032010-11-28 15:30:05 +00008260 LDSHARED='$(CC) -shared'
8261 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00008262 else
Stefan Krah3a3e2032010-11-28 15:30:05 +00008263 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00008264 fi;;
Martin v. Löwis222c5152006-06-03 07:37:13 +00008265 OpenBSD*)
8266 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8267 then
Stefan Krah3a3e2032010-11-28 15:30:05 +00008268 LDSHARED='$(CC) -shared $(CCSHARED)'
8269 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Martin v. Löwis222c5152006-06-03 07:37:13 +00008270 else
8271 case `uname -r` in
8272 [01].* | 2.[0-7] | 2.[0-7].*)
8273 LDSHARED="ld -Bshareable ${LDFLAGS}"
8274 ;;
8275 *)
Stefan Krah3a3e2032010-11-28 15:30:05 +00008276 LDSHARED='$(CC) -shared $(CCSHARED)'
8277 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Martin v. Löwis222c5152006-06-03 07:37:13 +00008278 ;;
8279 esac
8280 fi;;
Ronald Oussoren75912852010-04-08 08:13:31 +00008281 NetBSD*|DragonFly*)
Antoine Pitroucb402772011-01-02 20:51:34 +00008282 LDSHARED='$(CC) -shared'
8283 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008284 OpenUNIX*|UnixWare*)
Ronald Oussoren75912852010-04-08 08:13:31 +00008285 if test "$GCC" = "yes" ; then
8286 LDSHARED='$(CC) -shared'
8287 LDCXXSHARED='$(CXX) -shared'
8288 else
8289 LDSHARED='$(CC) -G'
8290 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00008291 fi;;
Ronald Oussoren75912852010-04-08 08:13:31 +00008292 SCO_SV*)
8293 LDSHARED='$(CC) -Wl,-G,-Bexport'
8294 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
8295 CYGWIN*)
8296 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
8297 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
8298 atheos*)
8299 LDSHARED="gcc -shared"
8300 LDCXXSHARED="g++ -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008301 *) LDSHARED="ld";;
8302 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008303fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008304{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
8305$as_echo "$LDSHARED" >&6; }
Ronald Oussoren75912852010-04-08 08:13:31 +00008306LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008307BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00008308# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008309# library (module) -- this is only needed for a few systems
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
8311$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008312if test -z "$CCSHARED"
8313then
Guido van Rossum07397971997-04-29 21:49:50 +00008314 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008315 SunOS*) if test "$GCC" = yes;
Martin v. Löwiseb623572007-03-12 10:50:39 +00008316 then CCSHARED="-fPIC";
8317 elif test `uname -p` = sparc;
8318 then CCSHARED="-xcode=pic32";
8319 else CCSHARED="-Kpic";
8320 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00008321 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00008322 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00008323 else CCSHARED="+z";
8324 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008325 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008326 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008327 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008328 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008329 if test "$GCC" = "yes"
8330 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008331 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008332 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008333 SCO_SV*)
8334 if test "$GCC" = "yes"
8335 then CCSHARED="-fPIC"
8336 else CCSHARED="-Kpic -belf"
8337 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008338 IRIX*/6*) case $CC in
8339 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00008340 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008341 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008342 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008343 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008344fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008345{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
8346$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008347# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008348# the python executable -- this is only needed for a few systems
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
8350$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008351if test -z "$LINKFORSHARED"
8352then
Guido van Rossum07397971997-04-29 21:49:50 +00008353 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008354 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008355 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00008356 LINKFORSHARED="-Wl,-E -Wl,+s";;
8357# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008358 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008359 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008360 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00008361 Darwin/*)
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008362 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
8363 # which is
Jack Jansene578a632001-08-15 01:27:14 +00008364 # not used by the core itself but which needs to be in the core so
8365 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +00008366 # -prebind is no longer used, because it actually seems to give a
8367 # slowdown in stead of a speedup, maybe due to the large number of
8368 # dynamic loads Python does.
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008369
8370 LINKFORSHARED="$extra_undefs"
Jack Jansene578a632001-08-15 01:27:14 +00008371 if test "$enable_framework"
8372 then
Jack Jansenda49e192005-01-07 13:08:22 +00008373 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008374 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008375 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008376 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008377 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00008378 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008379 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00008380 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8381 then
8382 LINKFORSHARED="-Wl,--export-dynamic"
8383 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008384 SunOS/5*) case $CC in
8385 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00008386 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00008387 then
8388 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008389 fi;;
8390 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00008391 CYGWIN*)
8392 if test $enable_shared = "no"
8393 then
8394 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
8395 fi;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00008396 QNX*)
8397 # -Wl,-E causes the symbols to be added to the dynamic
8398 # symbol table so that they can be found when a module
8399 # is loaded. -N 2048K causes the stack size to be set
8400 # to 2048 kilobytes so that the stack doesn't overflow
8401 # when running test_compile.py.
8402 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008403 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008404fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008405{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
8406$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008407
Michael W. Hudson54241132001-12-07 15:38:26 +00008408
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00008409
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
8411$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008412if test ! "$LIBRARY" = "$LDLIBRARY"
8413then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00008414 case $ac_sys_system in
8415 CYGWIN*)
8416 # Cygwin needs CCSHARED when building extension DLLs
8417 # but not when building the interpreter DLL.
8418 CFLAGSFORSHARED='';;
8419 *)
8420 CFLAGSFORSHARED='$(CCSHARED)'
8421 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008422fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008423{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
8424$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008425
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008426# SHLIBS are libraries (except -lc and -lm) to link to the python shared
8427# library (with --enable-shared).
8428# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008429# symbols, this must be set to $(LIBS) (expanded by make). We do this even
8430# if it is not required, since it creates a dependency of the shared library
8431# to LIBS. This, in turn, means that applications linking the shared libpython
8432# don't need to link LIBS explicitly. The default should be only changed
8433# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008434
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
8436$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008437case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008438 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008439 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008440esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008441{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
8442$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008443
8444
Guido van Rossum627b2d71993-12-24 10:39:16 +00008445# checks for libraries
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
8447$as_echo_n "checking for dlopen in -ldl... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008448if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008449 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008450else
Martin v. Löwis11437992002-04-12 09:54:03 +00008451 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008452LIBS="-ldl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008453cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008454/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008455
Martin v. Löwiseba40652007-08-30 20:10:57 +00008456/* Override any GCC internal prototype to avoid an error.
8457 Use char because int might match the return type of a GCC
8458 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008459#ifdef __cplusplus
8460extern "C"
8461#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008462char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008463int
8464main ()
8465{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008466return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008467 ;
8468 return 0;
8469}
8470_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008471if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008472 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008473else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008474 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008475fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008476rm -f core conftest.err conftest.$ac_objext \
8477 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008478LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008479fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008480{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
8481$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008482if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008483 cat >>confdefs.h <<_ACEOF
8484#define HAVE_LIBDL 1
8485_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008486
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008487 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00008488
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008489fi
8490 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
8492$as_echo_n "checking for shl_load in -ldld... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008493if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008494 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008495else
Martin v. Löwis11437992002-04-12 09:54:03 +00008496 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008497LIBS="-ldld $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008498cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008499/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008500
Martin v. Löwiseba40652007-08-30 20:10:57 +00008501/* Override any GCC internal prototype to avoid an error.
8502 Use char because int might match the return type of a GCC
8503 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008504#ifdef __cplusplus
8505extern "C"
8506#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008507char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008508int
8509main ()
8510{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008511return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008512 ;
8513 return 0;
8514}
8515_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008516if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008517 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008518else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008519 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008520fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008521rm -f core conftest.err conftest.$ac_objext \
8522 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008523LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008524fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008525{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
8526$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008527if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008528 cat >>confdefs.h <<_ACEOF
8529#define HAVE_LIBDLD 1
8530_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008531
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008532 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008533
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008534fi
8535 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00008536
Ronald Oussoren79f90492009-01-02 10:44:46 +00008537# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00008538if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008539 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
8540$as_echo_n "checking for library containing sem_init... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008541if ${ac_cv_search_sem_init+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008542 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008543else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008544 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008545cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008546/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008547
Martin v. Löwiseba40652007-08-30 20:10:57 +00008548/* Override any GCC internal prototype to avoid an error.
8549 Use char because int might match the return type of a GCC
8550 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008551#ifdef __cplusplus
8552extern "C"
8553#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008554char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008555int
8556main ()
8557{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008558return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008559 ;
8560 return 0;
8561}
8562_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00008563for ac_lib in '' pthread rt posix4; do
8564 if test -z "$ac_lib"; then
8565 ac_res="none required"
8566 else
8567 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00008568 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00008569 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008570 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008571 ac_cv_search_sem_init=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00008572fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008573rm -f core conftest.err conftest.$ac_objext \
8574 conftest$ac_exeext
Matthias Klose3cef2a92012-03-14 23:39:33 +01008575 if ${ac_cv_search_sem_init+:} false; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008576 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00008577fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008578done
Matthias Klose3cef2a92012-03-14 23:39:33 +01008579if ${ac_cv_search_sem_init+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008580
Martin v. Löwiseba40652007-08-30 20:10:57 +00008581else
8582 ac_cv_search_sem_init=no
8583fi
8584rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008585LIBS=$ac_func_search_save_LIBS
8586fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008587{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
8588$as_echo "$ac_cv_search_sem_init" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008589ac_res=$ac_cv_search_sem_init
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008590if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008591 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008592
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008593fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00008594 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00008595 # posix4 on Solaris 2.6
8596 # pthread (first!) on Linux
8597fi
8598
Martin v. Löwis19d17342003-06-14 21:03:05 +00008599# check if we need libintl for locale functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
8601$as_echo_n "checking for textdomain in -lintl... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008602if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008603 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00008604else
8605 ac_check_lib_save_LIBS=$LIBS
8606LIBS="-lintl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008607cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008608/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008609
Martin v. Löwiseba40652007-08-30 20:10:57 +00008610/* Override any GCC internal prototype to avoid an error.
8611 Use char because int might match the return type of a GCC
8612 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008613#ifdef __cplusplus
8614extern "C"
8615#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00008616char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008617int
8618main ()
8619{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008620return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008621 ;
8622 return 0;
8623}
8624_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008625if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008626 ac_cv_lib_intl_textdomain=yes
8627else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008628 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00008629fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008630rm -f core conftest.err conftest.$ac_objext \
8631 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00008632LIBS=$ac_check_lib_save_LIBS
8633fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008634{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
8635$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008636if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008637
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008638$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00008639
8640fi
8641
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008642
8643# checks for system dependent C++ extensions support
8644case "$ac_sys_system" in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008645 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
8646$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
8647 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008648/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00008649
Georg Brandl94800df2011-02-25 11:09:02 +00008650 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008651int
8652main ()
8653{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008654loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00008655 ;
8656 return 0;
8657}
Matthias Klosec511b472010-05-08 11:01:39 +00008658
Martin v. Löwis11437992002-04-12 09:54:03 +00008659_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008660if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008661
Matthias Klosec511b472010-05-08 11:01:39 +00008662
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008663$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008664
Matthias Klosec511b472010-05-08 11:01:39 +00008665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008666$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00008667
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008668else
Matthias Klosec511b472010-05-08 11:01:39 +00008669
8670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008671$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00008672
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008673fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008674rm -f core conftest.err conftest.$ac_objext \
8675 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008676 *) ;;
8677esac
8678
Guido van Rossum70c7f481998-03-26 18:44:10 +00008679# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008680# BeOS' sockets are stashed in libnet.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
8682$as_echo_n "checking for t_open in -lnsl... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008683if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008684 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008685else
Martin v. Löwis11437992002-04-12 09:54:03 +00008686 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008687LIBS="-lnsl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008688cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008689/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008690
Martin v. Löwiseba40652007-08-30 20:10:57 +00008691/* Override any GCC internal prototype to avoid an error.
8692 Use char because int might match the return type of a GCC
8693 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008694#ifdef __cplusplus
8695extern "C"
8696#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008697char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008698int
8699main ()
8700{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008701return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008702 ;
8703 return 0;
8704}
8705_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008706if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008707 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008708else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008709 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008710fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008711rm -f core conftest.err conftest.$ac_objext \
8712 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008713LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008714fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008715{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
8716$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008717if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008718 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008719fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00008720 # SVR4
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8722$as_echo_n "checking for socket in -lsocket... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008723if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008724 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008725else
Martin v. Löwis11437992002-04-12 09:54:03 +00008726 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008727LIBS="-lsocket $LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008728cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008729/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008730
Martin v. Löwiseba40652007-08-30 20:10:57 +00008731/* Override any GCC internal prototype to avoid an error.
8732 Use char because int might match the return type of a GCC
8733 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008734#ifdef __cplusplus
8735extern "C"
8736#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008737char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008738int
8739main ()
8740{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008741return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008742 ;
8743 return 0;
8744}
8745_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008746if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008747 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008748else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008749 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008750fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008751rm -f core conftest.err conftest.$ac_objext \
8752 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008753LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008754fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008755{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8756$as_echo "$ac_cv_lib_socket_socket" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008757if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00008758 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00008759fi
8760 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00008761
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +00008762case "$ac_sys_system" in
8763BeOS*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lnet" >&5
8765$as_echo_n "checking for socket in -lnet... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008766if ${ac_cv_lib_net_socket+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008767 $as_echo_n "(cached) " >&6
Guido van Rossumad678af1998-10-02 14:42:15 +00008768else
Martin v. Löwis11437992002-04-12 09:54:03 +00008769 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00008770LIBS="-lnet $LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008771cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008772/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008773
Martin v. Löwiseba40652007-08-30 20:10:57 +00008774/* Override any GCC internal prototype to avoid an error.
8775 Use char because int might match the return type of a GCC
8776 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008777#ifdef __cplusplus
8778extern "C"
8779#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008780char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008781int
8782main ()
8783{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008784return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008785 ;
8786 return 0;
8787}
8788_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008789if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008790 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +00008791else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008792 ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +00008793fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008794rm -f core conftest.err conftest.$ac_objext \
8795 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008796LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00008797fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008798{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_net_socket" >&5
8799$as_echo "$ac_cv_lib_net_socket" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008800if test "x$ac_cv_lib_net_socket" = xyes; then :
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008801 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008802fi
8803 # BeOS
8804;;
8805esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00008806
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
8808$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008809
Martin v. Löwiseba40652007-08-30 20:10:57 +00008810# Check whether --with-libs was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008811if test "${with_libs+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008812 withval=$with_libs;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008813{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8814$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00008815LIBS="$withval $LIBS"
8816
8817else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008818 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8819$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008820fi
8821
Guido van Rossum7f43da71994-08-01 12:15:30 +00008822
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008823if test -n "$ac_tool_prefix"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008824 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8825set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8827$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008828if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008829 $as_echo_n "(cached) " >&6
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008830else
8831 case $PKG_CONFIG in
8832 [\\/]* | ?:[\\/]*)
8833 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8834 ;;
8835 *)
8836 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8837for as_dir in $PATH
8838do
8839 IFS=$as_save_IFS
8840 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008841 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01008842 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008843 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008844 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008845 break 2
8846 fi
8847done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008848 done
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008849IFS=$as_save_IFS
8850
8851 ;;
8852esac
8853fi
8854PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8855if test -n "$PKG_CONFIG"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8857$as_echo "$PKG_CONFIG" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008858else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8860$as_echo "no" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008861fi
8862
8863
8864fi
8865if test -z "$ac_cv_path_PKG_CONFIG"; then
8866 ac_pt_PKG_CONFIG=$PKG_CONFIG
8867 # Extract the first word of "pkg-config", so it can be a program name with args.
8868set dummy pkg-config; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8870$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008871if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008872 $as_echo_n "(cached) " >&6
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008873else
8874 case $ac_pt_PKG_CONFIG in
8875 [\\/]* | ?:[\\/]*)
8876 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8877 ;;
8878 *)
8879 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8880for as_dir in $PATH
8881do
8882 IFS=$as_save_IFS
8883 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008884 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01008885 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008886 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008887 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008888 break 2
8889 fi
8890done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008891 done
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008892IFS=$as_save_IFS
8893
8894 ;;
8895esac
8896fi
8897ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8898if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
8900$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008901else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8903$as_echo "no" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008904fi
8905
8906 if test "x$ac_pt_PKG_CONFIG" = x; then
8907 PKG_CONFIG=""
8908 else
8909 case $cross_compiling:$ac_tool_warned in
8910yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008911{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8912$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008913ac_tool_warned=yes ;;
8914esac
8915 PKG_CONFIG=$ac_pt_PKG_CONFIG
8916 fi
8917else
8918 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8919fi
8920
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008921
8922# Check for use of the system expat library
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
8924$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008925
8926# Check whether --with-system_expat was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008927if test "${with_system_expat+set}" = set; then :
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008928 withval=$with_system_expat;
Benjamin Petersonf2d1b2a2010-10-31 16:53:53 +00008929else
8930 with_system_expat="no"
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008931fi
8932
8933
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008934{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
8935$as_echo "$with_system_expat" >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008936
8937# Check for use of the system libffi library
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
8939$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008940
8941# Check whether --with-system_ffi was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008942if test "${with_system_ffi+set}" = set; then :
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008943 withval=$with_system_ffi;
Benjamin Petersonf2d1b2a2010-10-31 16:53:53 +00008944else
8945 with_system_ffi="no"
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008946fi
8947
8948
8949if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008950 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
8951else
8952 LIBFFI_INCLUDEDIR=""
8953fi
8954
8955
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008956{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
8957$as_echo "$with_system_ffi" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +00008958
Ned Deilya2a9f572013-10-25 00:30:10 -07008959# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
8960
8961
8962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
8963$as_echo_n "checking for --with-tcltk-includes... " >&6; }
8964
8965# Check whether --with-tcltk-includes was given.
8966if test "${with_tcltk_includes+set}" = set; then :
8967 withval=$with_tcltk_includes;
8968else
8969 with_tcltk_includes="default"
8970fi
8971
8972{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
8973$as_echo "$with_tcltk_includes" >&6; }
8974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
8975$as_echo_n "checking for --with-tcltk-libs... " >&6; }
8976
8977# Check whether --with-tcltk-libs was given.
8978if test "${with_tcltk_libs+set}" = set; then :
8979 withval=$with_tcltk_libs;
8980else
8981 with_tcltk_libs="default"
8982fi
8983
8984{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
8985$as_echo "$with_tcltk_libs" >&6; }
8986if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
8987then
8988 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
8989 then
8990 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
8991 fi
8992 TCLTK_INCLUDES=""
8993 TCLTK_LIBS=""
8994else
8995 TCLTK_INCLUDES="$with_tcltk_includes"
8996 TCLTK_LIBS="$with_tcltk_libs"
8997fi
8998
Benjamin Peterson867475c2009-04-29 20:36:25 +00008999# Check for --with-dbmliborder
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
9001$as_echo_n "checking for --with-dbmliborder... " >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +00009002
9003# Check whether --with-dbmliborder was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009004if test "${with_dbmliborder+set}" = set; then :
Benjamin Peterson867475c2009-04-29 20:36:25 +00009005 withval=$with_dbmliborder;
9006if test x$with_dbmliborder = xyes
9007then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009008as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Benjamin Peterson867475c2009-04-29 20:36:25 +00009009else
9010 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
9011 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
9012 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009013 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Benjamin Peterson867475c2009-04-29 20:36:25 +00009014 fi
9015 done
9016fi
9017fi
9018
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009019{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
9020$as_echo "$with_dbmliborder" >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +00009021
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009022# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009023
9024
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
9026$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009027
Martin v. Löwiseba40652007-08-30 20:10:57 +00009028# Check whether --with-signal-module was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009029if test "${with_signal_module+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009030 withval=$with_signal_module;
9031fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009032
9033
9034if test -z "$with_signal_module"
9035then with_signal_module="yes"
9036fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009037{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
9038$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009039
9040if test "${with_signal_module}" = "yes"; then
9041 USE_SIGNAL_MODULE=""
9042 SIGNAL_OBJS=""
9043else
9044 USE_SIGNAL_MODULE="#"
9045 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9046fi
9047
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009048# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009049
Barry Warsawc0d24d82000-06-29 16:12:00 +00009050USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009051
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dec-threads" >&5
9053$as_echo_n "checking for --with-dec-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009054
Guido van Rossumec2f0731997-01-22 20:54:01 +00009055
Martin v. Löwiseba40652007-08-30 20:10:57 +00009056# Check whether --with-dec-threads was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009057if test "${with_dec_threads+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009058 withval=$with_dec_threads;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009059{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9060$as_echo "$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +00009061LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00009062if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00009063 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00009064fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009065else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9067$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009068fi
9069
Martin v. Löwis11437992002-04-12 09:54:03 +00009070
9071# Templates for things AC_DEFINEd more than once.
9072# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009073
9074
Martin v. Löwis11437992002-04-12 09:54:03 +00009075
9076
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
9078$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009079
Martin v. Löwiseba40652007-08-30 20:10:57 +00009080# Check whether --with-threads was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009081if test "${with_threads+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009082 withval=$with_threads;
9083fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009084
9085
Barry Warsawc0d24d82000-06-29 16:12:00 +00009086# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009087
Martin v. Löwiseba40652007-08-30 20:10:57 +00009088# Check whether --with-thread was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009089if test "${with_thread+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009090 withval=$with_thread; with_threads=$with_thread
9091fi
9092
Barry Warsawc0d24d82000-06-29 16:12:00 +00009093
9094if test -z "$with_threads"
9095then with_threads="yes"
9096fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009097{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
9098$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d82000-06-29 16:12:00 +00009099
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009100
Barry Warsawc0d24d82000-06-29 16:12:00 +00009101if test "$with_threads" = "no"
9102then
9103 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009104elif test "$ac_cv_pthread_is_default" = yes
9105then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009106 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009107
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009108 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009109 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009110
9111 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009112 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009113elif test "$ac_cv_kpthread" = "yes"
9114then
9115 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009116 if test "$ac_cv_cxx_thread" = "yes"; then
9117 CXX="$CXX -Kpthread"
9118 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009119 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009120
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009121 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009122 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009123elif test "$ac_cv_kthread" = "yes"
9124then
9125 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009126 if test "$ac_cv_cxx_thread" = "yes"; then
9127 CXX="$CXX -Kthread"
9128 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009129 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009130
9131 posix_threads=yes
9132 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009133elif test "$ac_cv_pthread" = "yes"
9134then
9135 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009136 if test "$ac_cv_cxx_thread" = "yes"; then
9137 CXX="$CXX -pthread"
9138 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009139 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009140
9141 posix_threads=yes
9142 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009143else
9144 if test ! -z "$with_threads" -a -d "$with_threads"
9145 then LDFLAGS="$LDFLAGS -L$with_threads"
9146 fi
9147 if test ! -z "$withval" -a -d "$withval"
9148 then LDFLAGS="$LDFLAGS -L$withval"
9149 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009150
9151 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00009152 # define _POSIX_THREADS in unistd.h. Some apparently don't
9153 # (e.g. gnu pth with pthread emulation)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009154 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
9155$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
9156 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009157/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009158
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009159#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009160#ifdef _POSIX_THREADS
9161yes
9162#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009163
9164_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009165if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009166 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009167 unistd_defines_pthreads=yes
9168else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009169 unistd_defines_pthreads=no
9170fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009171rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009172
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009173 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
9174$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009175
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009176 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009177
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009178 ac_fn_c_check_header_mongrel "$LINENO" "cthreads.h" "ac_cv_header_cthreads_h" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01009179if test "x$ac_cv_header_cthreads_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009180 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00009181
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009182 $as_echo "#define C_THREADS 1" >>confdefs.h
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009183
Martin v. Löwis11437992002-04-12 09:54:03 +00009184
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009185$as_echo "#define HURD_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009186
9187 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009188 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009189else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009190
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009191 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 +01009192if test "x$ac_cv_header_mach_cthreads_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009193 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00009194
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009195 $as_echo "#define C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009196
Martin v. Löwis11437992002-04-12 09:54:03 +00009197
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009198$as_echo "#define MACH_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009199
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009200 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009201else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009202
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009203 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pth" >&5
9204$as_echo_n "checking for --with-pth... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009205
Martin v. Löwiseba40652007-08-30 20:10:57 +00009206# Check whether --with-pth was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009207if test "${with_pth+set}" = set; then :
9208 withval=$with_pth; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9209$as_echo "$withval" >&6; }
9210 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009211
9212
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009213$as_echo "#define HAVE_PTH 1" >>confdefs.h
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009214
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009215 LIBS="-lpth $LIBS"
9216 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009217else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009218 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9219$as_echo "no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009220
9221 # Just looking for pthread_create in libpthread is not enough:
9222 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
9223 # So we really have to include pthread.h, and then link.
9224 _libs=$LIBS
9225 LIBS="$LIBS -lpthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009226 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
9227$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
9228 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009229/* end confdefs.h. */
Stefan Krahae66ca62012-11-22 22:36:57 +01009230
9231#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009232#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00009233
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009234void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00009235int
9236main ()
9237{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009238
9239pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00009240 ;
9241 return 0;
9242}
9243_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009244if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009245
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009246 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9247$as_echo "yes" >&6; }
9248 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00009249
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009250 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009251 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009252else
Martin v. Löwis11437992002-04-12 09:54:03 +00009253
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009254 LIBS=$_libs
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009255 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Matthias Klose3cef2a92012-03-14 23:39:33 +01009256if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009257 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00009258
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009259 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009260 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00009261else
Guido van Rossumad678af1998-10-02 14:42:15 +00009262
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009263 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 +01009264if test "x$ac_cv_header_atheos_threads_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009265 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009266
9267
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009268$as_echo "#define ATHEOS_THREADS 1" >>confdefs.h
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009269
9270 THREADOBJ="Python/thread.o"
9271else
9272
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009273 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 +01009274if test "x$ac_cv_header_kernel_OS_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009275 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009276
9277
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009278$as_echo "#define BEOS_THREADS 1" >>confdefs.h
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009279
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009280 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009281else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009282
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009283 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
9284$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009285if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009286 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009287else
Martin v. Löwis11437992002-04-12 09:54:03 +00009288 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009289LIBS="-lpthreads $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009290cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009291/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009292
Martin v. Löwiseba40652007-08-30 20:10:57 +00009293/* Override any GCC internal prototype to avoid an error.
9294 Use char because int might match the return type of a GCC
9295 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009296#ifdef __cplusplus
9297extern "C"
9298#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009299char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009300int
9301main ()
9302{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009303return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009304 ;
9305 return 0;
9306}
9307_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009308if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009309 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00009310else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009311 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00009312fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009313rm -f core conftest.err conftest.$ac_objext \
9314 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009315LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009316fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009317{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
9318$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009319if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009320 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00009321
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009322 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009323 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009324 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00009325else
Greg Steinadf63d62000-07-05 10:38:09 +00009326
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009327 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
9328$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009329if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009330 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00009331else
Martin v. Löwis11437992002-04-12 09:54:03 +00009332 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009333LIBS="-lc_r $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009334cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009335/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009336
Martin v. Löwiseba40652007-08-30 20:10:57 +00009337/* Override any GCC internal prototype to avoid an error.
9338 Use char because int might match the return type of a GCC
9339 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009340#ifdef __cplusplus
9341extern "C"
9342#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009343char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009344int
9345main ()
9346{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009347return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009348 ;
9349 return 0;
9350}
9351_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009352if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009353 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00009354else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009355 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00009356fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009357rm -f core conftest.err conftest.$ac_objext \
9358 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009359LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00009360fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009361{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
9362$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009363if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009364 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00009365
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009366 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009367 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009368 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009369else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009370
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009371 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
9372$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009373if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009374 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009375else
Martin v. Löwis11437992002-04-12 09:54:03 +00009376 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009377LIBS="-lpthread $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009378cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009379/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009380
Martin v. Löwiseba40652007-08-30 20:10:57 +00009381/* Override any GCC internal prototype to avoid an error.
9382 Use char because int might match the return type of a GCC
9383 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009384#ifdef __cplusplus
9385extern "C"
9386#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009387char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009388int
9389main ()
9390{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009391return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009392 ;
9393 return 0;
9394}
9395_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009396if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009397 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009398else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009399 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009400fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009401rm -f core conftest.err conftest.$ac_objext \
9402 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009403LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009404fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009405{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
9406$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009407if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009408 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009409
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009410 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009411 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009412 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009413else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009414
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009415 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
9416$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009417if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009418 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00009419else
Martin v. Löwis11437992002-04-12 09:54:03 +00009420 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009421LIBS="-lcma $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009422cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009423/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009424
Martin v. Löwiseba40652007-08-30 20:10:57 +00009425/* Override any GCC internal prototype to avoid an error.
9426 Use char because int might match the return type of a GCC
9427 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009428#ifdef __cplusplus
9429extern "C"
9430#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009431char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009432int
9433main ()
9434{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009435return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009436 ;
9437 return 0;
9438}
9439_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009440if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009441 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00009442else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009443 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00009444fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009445rm -f core conftest.err conftest.$ac_objext \
9446 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009447LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009448fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009449{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
9450$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009451if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009452 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00009453
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009454 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009455 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009456 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00009457else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00009458
Martin v. Löwis130fb172001-07-19 11:00:41 +00009459 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00009460fi
9461
Guido van Rossum627b2d71993-12-24 10:39:16 +00009462
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009463fi
9464
Guido van Rossum0be3e491997-05-22 20:33:33 +00009465fi
9466
Guido van Rossum49545951997-12-02 19:28:29 +00009467fi
9468
Guido van Rossumb93a8621998-05-07 13:27:32 +00009469fi
9470
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009471
Michael W. Hudson54241132001-12-07 15:38:26 +00009472fi
9473
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009474
9475fi
9476
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009477fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009478rm -f core conftest.err conftest.$ac_objext \
9479 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009480fi
9481
Martin v. Löwis11437992002-04-12 09:54:03 +00009482fi
9483
9484
9485fi
9486
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009487
Michael W. Hudson54241132001-12-07 15:38:26 +00009488
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009489 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
9490$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009491if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009492 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009493else
Martin v. Löwis11437992002-04-12 09:54:03 +00009494 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009495LIBS="-lmpc $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009496cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009497/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009498
Martin v. Löwiseba40652007-08-30 20:10:57 +00009499/* Override any GCC internal prototype to avoid an error.
9500 Use char because int might match the return type of a GCC
9501 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009502#ifdef __cplusplus
9503extern "C"
9504#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009505char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009506int
9507main ()
9508{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009509return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009510 ;
9511 return 0;
9512}
9513_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009514if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009515 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009516else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009517 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009518fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009519rm -f core conftest.err conftest.$ac_objext \
9520 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009521LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009522fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009523{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
9524$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009525if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009526 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009527
Martin v. Löwis130fb172001-07-19 11:00:41 +00009528 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009529 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009530 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009531fi
9532
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009533
Neal Norwitza978ab02002-11-02 16:58:05 +00009534 if test "$posix_threads" != "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009535 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
9536$as_echo_n "checking for thr_create in -lthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009537if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009538 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009539else
Martin v. Löwis11437992002-04-12 09:54:03 +00009540 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009541LIBS="-lthread $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009542cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009543/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009544
Martin v. Löwiseba40652007-08-30 20:10:57 +00009545/* Override any GCC internal prototype to avoid an error.
9546 Use char because int might match the return type of a GCC
9547 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009548#ifdef __cplusplus
9549extern "C"
9550#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009551char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009552int
9553main ()
9554{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009555return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009556 ;
9557 return 0;
9558}
9559_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009560if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009561 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009562else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009563 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009564fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009565rm -f core conftest.err conftest.$ac_objext \
9566 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009567LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009568fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009569{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
9570$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009571if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009572 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009573
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009574 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009575 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009576 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009577fi
9578
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009579 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009580
Martin v. Löwis130fb172001-07-19 11:00:41 +00009581 if test "$USE_THREAD_MODULE" != "#"
9582 then
9583 # If the above checks didn't disable threads, (at least) OSF1
9584 # needs this '-threads' argument during linking.
9585 case $ac_sys_system in
9586 OSF1) LDLAST=-threads;;
9587 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00009588 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009589fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009590
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009591if test "$posix_threads" = "yes"; then
9592 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009593
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009594$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009595
9596 fi
9597
9598 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
9599 case $ac_sys_system/$ac_sys_release in
Charles-François Natali4929eb92011-07-21 19:41:04 +02009600 SunOS/5.6)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009601$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009602
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009603 ;;
9604 SunOS/5.8)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009605$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009606
9607 ;;
Charles-François Natali4929eb92011-07-21 19:41:04 +02009608 AIX/*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009609$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimescba36bb2008-01-30 22:54:18 +00009610
9611 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009612 esac
9613
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009614 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
9615$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009616 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009617 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009618else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009619 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009620 ac_cv_pthread_system_supported=no
9621else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009622 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009623/* end confdefs.h. */
Stefan Krahae66ca62012-11-22 22:36:57 +01009624
9625 #include <stdio.h>
9626 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009627 void *foo(void *parm) {
9628 return NULL;
9629 }
9630 main() {
9631 pthread_attr_t attr;
9632 pthread_t id;
9633 if (pthread_attr_init(&attr)) exit(-1);
9634 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
9635 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
9636 exit(0);
9637 }
9638_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009639if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009640 ac_cv_pthread_system_supported=yes
9641else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009642 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009643fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009644rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9645 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009646fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009647
Martin v. Löwiseba40652007-08-30 20:10:57 +00009648
Guido van Rossum627b2d71993-12-24 10:39:16 +00009649fi
9650
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
9652$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009653 if test "$ac_cv_pthread_system_supported" = "yes"; then
9654
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009655$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009656
9657 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009658 for ac_func in pthread_sigmask
9659do :
9660 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Matthias Klose3cef2a92012-03-14 23:39:33 +01009661if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009662 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009663#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009664_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00009665 case $ac_sys_system in
9666 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009667
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009668$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00009669
9670 ;;
9671 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009672fi
9673done
9674
Christian Heimes0d604cf2013-08-21 13:26:05 +02009675 for ac_func in pthread_atfork
9676do :
9677 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
9678if test "x$ac_cv_func_pthread_atfork" = xyes; then :
9679 cat >>confdefs.h <<_ACEOF
9680#define HAVE_PTHREAD_ATFORK 1
9681_ACEOF
9682
9683fi
9684done
9685
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009686fi
9687
9688
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009689# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00009690
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
9692$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009693# Check whether --enable-ipv6 was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009694if test "${enable_ipv6+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009695 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009696 no)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9698$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009699 ipv6=no
9700 ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009701 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9702$as_echo "yes" >&6; }
9703 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009704
9705 ipv6=yes
9706 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009707 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009708else
Martin v. Löwis11437992002-04-12 09:54:03 +00009709
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009710 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009711/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009712 /* AF_INET6 available check */
9713#include <sys/types.h>
9714#include <sys/socket.h>
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009715int
9716main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009717{
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009718int domain = AF_INET6;
9719 ;
9720 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009721}
Martin v. Löwis11437992002-04-12 09:54:03 +00009722_ACEOF
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009723if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +00009724
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9726$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009727 ipv6=yes
Matthias Klosec511b472010-05-08 11:01:39 +00009728
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009729else
Matthias Klosec511b472010-05-08 11:01:39 +00009730
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9732$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009733 ipv6=no
Matthias Klosec511b472010-05-08 11:01:39 +00009734
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009735fi
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009736rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009737
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009738if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009739 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
9740$as_echo_n "checking if RFC2553 API is available... " >&6; }
9741 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009742/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00009743
9744 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009745#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009746int
9747main ()
9748{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009749struct sockaddr_in6 x;
Matthias Klosec511b472010-05-08 11:01:39 +00009750 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00009751 ;
9752 return 0;
9753}
Matthias Klosec511b472010-05-08 11:01:39 +00009754
Martin v. Löwis11437992002-04-12 09:54:03 +00009755_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009756if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +00009757
9758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009759$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00009760 ipv6=yes
9761
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009762else
Matthias Klosec511b472010-05-08 11:01:39 +00009763
9764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009765$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00009766 ipv6=no
9767
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009768fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009769rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009770fi
9771
9772if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009773 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009774
9775fi
9776
Martin v. Löwiseba40652007-08-30 20:10:57 +00009777fi
9778
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009779
9780ipv6type=unknown
9781ipv6lib=none
9782ipv6trylibc=no
9783
9784if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009785 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
9786$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00009787 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
9788 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009789 case $i in
9790 inria)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009791 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009792/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009793
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009794#include <netinet/in.h>
9795#ifdef IPV6_INRIA_VERSION
9796yes
9797#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009798_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009799if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009800 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009801 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009802fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009803rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009804
9805 ;;
9806 kame)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009807 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009808/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009809
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009810#include <netinet/in.h>
9811#ifdef __KAME__
9812yes
9813#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009814_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009815if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009816 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009817 ipv6type=$i;
9818 ipv6lib=inet6
9819 ipv6libdir=/usr/local/v6/lib
9820 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009821fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009822rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009823
9824 ;;
9825 linux-glibc)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009826 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009827/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009828
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009829#include <features.h>
9830#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
9831yes
9832#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009833_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009834if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009835 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009836 ipv6type=$i;
9837 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009838fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009839rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009840
9841 ;;
9842 linux-inet6)
9843 if test -d /usr/inet6; then
9844 ipv6type=$i
9845 ipv6lib=inet6
9846 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00009847 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009848 fi
9849 ;;
9850 solaris)
9851 if test -f /etc/netconfig; then
Antoine Pitrou31e85952011-01-03 18:57:14 +00009852 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009853 ipv6type=$i
9854 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009855 fi
9856 fi
9857 ;;
9858 toshiba)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009859 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009860/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009861
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009862#include <sys/param.h>
9863#ifdef _TOSHIBA_INET6
9864yes
9865#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009866_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009867if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009868 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009869 ipv6type=$i;
9870 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009871 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009872fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009873rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009874
9875 ;;
9876 v6d)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009877 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009878/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009879
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009880#include </usr/local/v6/include/sys/v6config.h>
9881#ifdef __V6D__
9882yes
9883#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009884_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009885if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009886 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009887 ipv6type=$i;
9888 ipv6lib=v6;
9889 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009890 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009891fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009892rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009893
9894 ;;
9895 zeta)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009896 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009897/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009898
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009899#include <sys/param.h>
9900#ifdef _ZETA_MINAMI_INET6
9901yes
9902#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009903_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009904if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009905 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009906 ipv6type=$i;
9907 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009908 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009909fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009910rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009911
9912 ;;
9913 esac
9914 if test "$ipv6type" != "unknown"; then
9915 break
9916 fi
9917 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
9919$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009920fi
9921
9922if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
9923 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
9924 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
9925 echo "using lib$ipv6lib"
9926 else
9927 if test $ipv6trylibc = "yes"; then
9928 echo "using libc"
9929 else
9930 echo 'Fatal: no $ipv6lib library found. cannot continue.'
9931 echo "You need to fetch lib$ipv6lib.a from appropriate"
9932 echo 'ipv6 kit and compile beforehand.'
9933 exit 1
9934 fi
9935 fi
9936fi
9937
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
9939$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
9940cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009941/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00009942
9943 #include <Carbon/Carbon.h>
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009944int
9945main ()
9946{
9947FSIORefNum fRef = 0
9948 ;
9949 return 0;
9950}
Mark Dickinson0712b562010-05-08 19:13:21 +00009951
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009952_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009953if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +00009954
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009955
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009956$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009957
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9959$as_echo "yes" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009960
Mark Dickinson0712b562010-05-08 19:13:21 +00009961else
9962
9963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9964$as_echo "no" >&6; }
9965
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009966fi
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009967rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9968
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009969# Check for --with-doc-strings
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009970{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
9971$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009972
Martin v. Löwiseba40652007-08-30 20:10:57 +00009973# Check whether --with-doc-strings was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009974if test "${with_doc_strings+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009975 withval=$with_doc_strings;
9976fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009977
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009978
9979if test -z "$with_doc_strings"
9980then with_doc_strings="yes"
9981fi
9982if test "$with_doc_strings" != "no"
9983then
9984
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009985$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009986
9987fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009988{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
9989$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009990
Neil Schemenauera35c6882001-02-27 04:45:05 +00009991# Check for Python-specific malloc support
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
9993$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009994
Martin v. Löwiseba40652007-08-30 20:10:57 +00009995# Check whether --with-tsc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009996if test "${with_tsc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009997 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009998if test "$withval" != no
9999then
10000
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010001$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010002
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10004$as_echo "yes" >&6; }
10005else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10006$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010007fi
10008else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10010$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010011fi
10012
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010013
10014# Check for Python-specific malloc support
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10016$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010017
Martin v. Löwiseba40652007-08-30 20:10:57 +000010018# Check whether --with-pymalloc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010019if test "${with_pymalloc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000010020 withval=$with_pymalloc;
10021fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010022
Neil Schemenauera35c6882001-02-27 04:45:05 +000010023
Neil Schemenauer16c22972002-03-22 15:34:49 +000010024if test -z "$with_pymalloc"
10025then with_pymalloc="yes"
10026fi
10027if test "$with_pymalloc" != "no"
10028then
Martin v. Löwis11437992002-04-12 09:54:03 +000010029
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010030$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000010031
10032fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010033{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
10034$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000010035
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010036# Check for Valgrind support
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
10038$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010039
10040# Check whether --with-valgrind was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010041if test "${with_valgrind+set}" = set; then :
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010042 withval=$with_valgrind;
10043else
10044 with_valgrind=no
10045fi
10046
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010047{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
10048$as_echo "$with_valgrind" >&6; }
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010049if test "$with_valgrind" != no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010050 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 +010010051if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010052
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010053$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010054
10055else
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010056 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010057
10058fi
10059
10060
10061fi
10062
Barry Warsawef82cd72000-06-30 16:21:01 +000010063# Check for --with-wctype-functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-wctype-functions" >&5
10065$as_echo_n "checking for --with-wctype-functions... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010066
Martin v. Löwiseba40652007-08-30 20:10:57 +000010067# Check whether --with-wctype-functions was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010068if test "${with_wctype_functions+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000010069 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000010070if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000010071then
10072
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010073$as_echo "#define WANT_WCTYPE_FUNCTIONS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010074
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10076$as_echo "yes" >&6; }
10077else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10078$as_echo "no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000010079fi
10080else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10082$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010083fi
10084
Barry Warsawef82cd72000-06-30 16:21:01 +000010085
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010086# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000010087
Guido van Rossum98935bf2001-09-05 19:13:16 +000010088DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000010089
Guido van Rossume97ee181999-12-20 21:27:22 +000010090# the dlopen() function means we might want to use dynload_shlib.o. some
10091# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000010092for ac_func in dlopen
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010093do :
10094 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010095if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010096 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010097#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010098_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000010099
Guido van Rossume97ee181999-12-20 21:27:22 +000010100fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010101done
Guido van Rossume97ee181999-12-20 21:27:22 +000010102
Michael W. Hudson54241132001-12-07 15:38:26 +000010103
Guido van Rossume97ee181999-12-20 21:27:22 +000010104# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
10105# loading of modules.
10106
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
10108$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010109if test -z "$DYNLOADFILE"
10110then
10111 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000010112 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
10113 if test "$ac_cv_func_dlopen" = yes
10114 then DYNLOADFILE="dynload_shlib.o"
10115 else DYNLOADFILE="dynload_aix.o"
10116 fi
10117 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000010118 BeOS*) DYNLOADFILE="dynload_beos.o";;
10119 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Anthony Baxter82201742006-04-09 15:07:40 +000010120 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
10121 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010122 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000010123 *)
10124 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
10125 # out any dynamic loading
10126 if test "$ac_cv_func_dlopen" = yes
10127 then DYNLOADFILE="dynload_shlib.o"
10128 else DYNLOADFILE="dynload_stub.o"
10129 fi
10130 ;;
10131 esac
10132fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010133{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
10134$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010135if test "$DYNLOADFILE" != "dynload_stub.o"
10136then
Martin v. Löwis11437992002-04-12 09:54:03 +000010137
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010138$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000010139
10140fi
10141
Neil Schemenauer4e425612001-06-19 15:44:15 +000010142# MACHDEP_OBJS can be set to platform-specific object files needed by Python
10143
Michael W. Hudson54241132001-12-07 15:38:26 +000010144
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
10146$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010147if test -z "$MACHDEP_OBJS"
10148then
Jack Jansene578a632001-08-15 01:27:14 +000010149 MACHDEP_OBJS=$extra_machdep_objs
10150else
10151 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000010152fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010153{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
10154$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010155
Guido van Rossum627b2d71993-12-24 10:39:16 +000010156# checks for library functions
Martin v. Löwisaef18b12008-03-24 13:31:16 +000010157for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
10158 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000010159 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis50ea4562009-11-27 13:56:01 +000010160 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Benjamin Petersond16e01c2014-02-04 10:20:26 -050010161 initgroups kill killpg lchmod lchown lstat mkfifo mknod mktime mmap \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000010162 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000010163 putenv readlink realpath \
Jesse Noller355b1262009-04-02 00:03:28 +000010164 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
10165 setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000010166 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Martin v. Löwis50ea4562009-11-27 13:56:01 +000010167 setlocale setregid setreuid setresuid setresgid \
10168 setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +000010169 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000010170 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Neal Norwitz05a45592006-03-20 06:30:08 +000010171 truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010172do :
10173 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10174ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010175if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010176 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010177#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010178_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010179
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010180fi
10181done
10182
Michael W. Hudson54241132001-12-07 15:38:26 +000010183
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010184# For some functions, having a definition is not sufficient, since
10185# we want to take their address.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
10187$as_echo_n "checking for chroot... " >&6; }
10188cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010189/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010190#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010191int
10192main ()
10193{
10194void *x=chroot
10195 ;
10196 return 0;
10197}
10198_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010199if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010200
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010201$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010202
Matthias Klosec511b472010-05-08 11:01:39 +000010203 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010204$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010205else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010206 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10207$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010208
10209fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010210rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
10212$as_echo_n "checking for link... " >&6; }
10213cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010214/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010215#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010216int
10217main ()
10218{
10219void *x=link
10220 ;
10221 return 0;
10222}
10223_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010224if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010225
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010226$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010227
Matthias Klosec511b472010-05-08 11:01:39 +000010228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010229$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010230else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10232$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010233
10234fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010235rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
10237$as_echo_n "checking for symlink... " >&6; }
10238cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010239/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010240#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010241int
10242main ()
10243{
10244void *x=symlink
10245 ;
10246 return 0;
10247}
10248_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010249if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010250
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010251$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010252
Matthias Klosec511b472010-05-08 11:01:39 +000010253 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010254$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010255else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010256 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10257$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010258
10259fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010260rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
10262$as_echo_n "checking for fchdir... " >&6; }
10263cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010264/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010265#include <unistd.h>
10266int
10267main ()
10268{
10269void *x=fchdir
10270 ;
10271 return 0;
10272}
10273_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010274if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010275
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010276$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010277
Matthias Klosec511b472010-05-08 11:01:39 +000010278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010279$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010280else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10282$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010283
10284fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010285rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010286{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
10287$as_echo_n "checking for fsync... " >&6; }
10288cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010289/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010290#include <unistd.h>
10291int
10292main ()
10293{
10294void *x=fsync
10295 ;
10296 return 0;
10297}
10298_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010299if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010300
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010301$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010302
Matthias Klosec511b472010-05-08 11:01:39 +000010303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010304$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010305else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10307$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010308
10309fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010310rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
10312$as_echo_n "checking for fdatasync... " >&6; }
10313cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010314/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010315#include <unistd.h>
10316int
10317main ()
10318{
10319void *x=fdatasync
10320 ;
10321 return 0;
10322}
10323_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010324if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010325
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010326$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010327
Matthias Klosec511b472010-05-08 11:01:39 +000010328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010329$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010330else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10332$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010333
10334fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010335rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
10337$as_echo_n "checking for epoll... " >&6; }
10338cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010339/* end confdefs.h. */
10340#include <sys/epoll.h>
10341int
10342main ()
10343{
10344void *x=epoll_create
10345 ;
10346 return 0;
10347}
10348_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010349if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010350
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010351$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010352
Matthias Klosec511b472010-05-08 11:01:39 +000010353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010354$as_echo "yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010355else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10357$as_echo "no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010358
10359fi
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010360rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
10362$as_echo_n "checking for kqueue... " >&6; }
10363cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010364/* end confdefs.h. */
10365
10366#include <sys/types.h>
10367#include <sys/event.h>
10368
10369int
10370main ()
10371{
10372int x=kqueue()
10373 ;
10374 return 0;
10375}
10376_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010377if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010378
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010379$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010380
Matthias Klosec511b472010-05-08 11:01:39 +000010381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010382$as_echo "yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010383else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10385$as_echo "no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010386
10387fi
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010388rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010389# On some systems (eg. FreeBSD 5), we would find a definition of the
10390# functions ctermid_r, setgroups in the library, but no prototype
10391# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
10392# address to avoid compiler warnings and potential miscompilations
10393# because of the missing prototypes.
10394
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
10396$as_echo_n "checking for ctermid_r... " >&6; }
10397cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010398/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010399
Martin v. Löwisd5843682002-11-21 20:41:28 +000010400#include <stdio.h>
10401
Martin v. Löwisd5843682002-11-21 20:41:28 +000010402int
10403main ()
10404{
10405void* p = ctermid_r
10406 ;
10407 return 0;
10408}
10409_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010410if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010411
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010412$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010413
Matthias Klosec511b472010-05-08 11:01:39 +000010414 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010415$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010416else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10418$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010419
10420fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010421rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10422
Antoine Pitroub170f172010-09-10 18:47:36 +000010423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
10424$as_echo_n "checking for flock declaration... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010425if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010426 $as_echo_n "(cached) " >&6
10427else
10428 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010429/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010430#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010431int
10432main ()
10433{
10434void* p = flock
Antoine Pitroub170f172010-09-10 18:47:36 +000010435
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010436 ;
10437 return 0;
10438}
10439_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010440if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010441 ac_cv_flock_decl=yes
10442else
10443 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010444
10445fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010446rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitrou85729812010-09-07 14:55:24 +000010447
Antoine Pitroub170f172010-09-10 18:47:36 +000010448fi
10449{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
10450$as_echo "$ac_cv_flock_decl" >&6; }
10451if test "x${ac_cv_flock_decl}" = xyes; then
10452 for ac_func in flock
10453do :
10454 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010455if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010456 cat >>confdefs.h <<_ACEOF
10457#define HAVE_FLOCK 1
Antoine Pitrou85729812010-09-07 14:55:24 +000010458_ACEOF
Antoine Pitroub170f172010-09-10 18:47:36 +000010459
Antoine Pitrou85729812010-09-07 14:55:24 +000010460else
Antoine Pitroub170f172010-09-10 18:47:36 +000010461 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitrou85729812010-09-07 14:55:24 +000010462$as_echo_n "checking for flock in -lbsd... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010463if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitrou85729812010-09-07 14:55:24 +000010464 $as_echo_n "(cached) " >&6
10465else
10466 ac_check_lib_save_LIBS=$LIBS
10467LIBS="-lbsd $LIBS"
10468cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10469/* end confdefs.h. */
10470
10471/* Override any GCC internal prototype to avoid an error.
10472 Use char because int might match the return type of a GCC
10473 builtin and then its argument prototype would still apply. */
10474#ifdef __cplusplus
10475extern "C"
10476#endif
10477char flock ();
10478int
10479main ()
10480{
10481return flock ();
10482 ;
10483 return 0;
10484}
10485_ACEOF
10486if ac_fn_c_try_link "$LINENO"; then :
10487 ac_cv_lib_bsd_flock=yes
10488else
10489 ac_cv_lib_bsd_flock=no
10490fi
10491rm -f core conftest.err conftest.$ac_objext \
10492 conftest$ac_exeext conftest.$ac_ext
10493LIBS=$ac_check_lib_save_LIBS
10494fi
10495{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
10496$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010497if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010498 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitrou85729812010-09-07 14:55:24 +000010499
10500
10501$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
10502
10503
10504fi
10505
10506
10507fi
Antoine Pitroub170f172010-09-10 18:47:36 +000010508done
10509
Antoine Pitrou85729812010-09-07 14:55:24 +000010510fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010511
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
10513$as_echo_n "checking for getpagesize... " >&6; }
10514cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010515/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010516
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010517#include <unistd.h>
10518
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010519int
10520main ()
10521{
10522void* p = getpagesize
10523 ;
10524 return 0;
10525}
10526_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010527if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010528
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010529$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010530
Matthias Klosec511b472010-05-08 11:01:39 +000010531 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010532$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010533else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10535$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010536
10537fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010538rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010539
Charles-François Natali93a11752011-11-27 13:01:35 +010010540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
10541$as_echo_n "checking for broken unsetenv... " >&6; }
10542cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10543/* end confdefs.h. */
10544
10545#include <stdlib.h>
10546
10547int
10548main ()
10549{
10550int res = unsetenv("DUMMY")
10551 ;
10552 return 0;
10553}
10554_ACEOF
10555if ac_fn_c_try_compile "$LINENO"; then :
10556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10557$as_echo "no" >&6; }
10558else
10559
10560$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
10561
10562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10563$as_echo "yes" >&6; }
10564
10565fi
10566rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10567
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010568for ac_prog in true
10569do
10570 # Extract the first word of "$ac_prog", so it can be a program name with args.
10571set dummy $ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10573$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010574if ${ac_cv_prog_TRUE+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010575 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010576else
10577 if test -n "$TRUE"; then
10578 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
10579else
10580as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10581for as_dir in $PATH
10582do
10583 IFS=$as_save_IFS
10584 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010585 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +010010586 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010587 ac_cv_prog_TRUE="$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010588 $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 +000010589 break 2
10590 fi
10591done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010592 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000010593IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010594
10595fi
10596fi
10597TRUE=$ac_cv_prog_TRUE
10598if test -n "$TRUE"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
10600$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010601else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10603$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010604fi
10605
Martin v. Löwiseba40652007-08-30 20:10:57 +000010606
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010607 test -n "$TRUE" && break
10608done
10609test -n "$TRUE" || TRUE="/bin/true"
10610
10611
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
10613$as_echo_n "checking for inet_aton in -lc... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010614if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010615 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010616else
10617 ac_check_lib_save_LIBS=$LIBS
10618LIBS="-lc $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010619cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010620/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010621
Martin v. Löwiseba40652007-08-30 20:10:57 +000010622/* Override any GCC internal prototype to avoid an error.
10623 Use char because int might match the return type of a GCC
10624 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010625#ifdef __cplusplus
10626extern "C"
10627#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010628char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010629int
10630main ()
10631{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010632return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010633 ;
10634 return 0;
10635}
10636_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010637if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010638 ac_cv_lib_c_inet_aton=yes
10639else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010640 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010641fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010642rm -f core conftest.err conftest.$ac_objext \
10643 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010644LIBS=$ac_check_lib_save_LIBS
10645fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010646{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
10647$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010648if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010649 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010650else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010651 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
10652$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010653if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010654 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010655else
10656 ac_check_lib_save_LIBS=$LIBS
10657LIBS="-lresolv $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010658cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010659/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010660
Martin v. Löwiseba40652007-08-30 20:10:57 +000010661/* Override any GCC internal prototype to avoid an error.
10662 Use char because int might match the return type of a GCC
10663 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010664#ifdef __cplusplus
10665extern "C"
10666#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010667char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010668int
10669main ()
10670{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010671return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010672 ;
10673 return 0;
10674}
10675_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010676if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010677 ac_cv_lib_resolv_inet_aton=yes
10678else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010679 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010680fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010681rm -f core conftest.err conftest.$ac_objext \
10682 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010683LIBS=$ac_check_lib_save_LIBS
10684fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010685{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
10686$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010687if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010688 cat >>confdefs.h <<_ACEOF
10689#define HAVE_LIBRESOLV 1
10690_ACEOF
10691
10692 LIBS="-lresolv $LIBS"
10693
10694fi
10695
10696
10697fi
10698
10699
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010700# On Tru64, chflags seems to be present, but calling it will
10701# exit Python
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
10703$as_echo_n "checking for chflags... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010704if ${ac_cv_have_chflags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010705 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010706else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010707 if test "$cross_compiling" = yes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010708 ac_cv_have_chflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010709else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010710 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010711/* end confdefs.h. */
Ned Deily43e10542011-06-27 23:41:53 -070010712
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010713#include <sys/stat.h>
10714#include <unistd.h>
10715int main(int argc, char*argv[])
10716{
10717 if(chflags(argv[0], 0) != 0)
10718 return 1;
10719 return 0;
10720}
Ned Deily43e10542011-06-27 23:41:53 -070010721
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010722_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010723if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010724 ac_cv_have_chflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010725else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010726 ac_cv_have_chflags=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010727fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010728rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10729 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000010730fi
10731
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010732
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010733fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010734{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
10735$as_echo "$ac_cv_have_chflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000010736if test "$ac_cv_have_chflags" = cross ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010737 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010738if test "x$ac_cv_func_chflags" = xyes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010739 ac_cv_have_chflags="yes"
10740else
10741 ac_cv_have_chflags="no"
10742fi
10743
10744fi
10745if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010746
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010747$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010748
10749fi
10750
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
10752$as_echo_n "checking for lchflags... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010753if ${ac_cv_have_lchflags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010754 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010755else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010756 if test "$cross_compiling" = yes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010757 ac_cv_have_lchflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010758else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010759 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010760/* end confdefs.h. */
Ned Deily43e10542011-06-27 23:41:53 -070010761
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010762#include <sys/stat.h>
10763#include <unistd.h>
10764int main(int argc, char*argv[])
10765{
10766 if(lchflags(argv[0], 0) != 0)
10767 return 1;
10768 return 0;
10769}
Ned Deily43e10542011-06-27 23:41:53 -070010770
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010771_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010772if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010773 ac_cv_have_lchflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010774else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010775 ac_cv_have_lchflags=no
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010776fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010777rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10778 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010779fi
10780
10781
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010782fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010783{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
10784$as_echo "$ac_cv_have_lchflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000010785if test "$ac_cv_have_lchflags" = cross ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010786 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010787if test "x$ac_cv_func_lchflags" = xyes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010788 ac_cv_have_lchflags="yes"
10789else
10790 ac_cv_have_lchflags="no"
10791fi
10792
10793fi
10794if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010795
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010796$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010797
10798fi
10799
Ronald Oussorenf8752642006-07-06 10:13:35 +000010800case $ac_sys_system/$ac_sys_release in
10801Darwin/*)
10802 _CUR_CFLAGS="${CFLAGS}"
10803 _CUR_LDFLAGS="${LDFLAGS}"
10804 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
10805 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
10806 ;;
10807esac
10808
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
10810$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010811if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010812 $as_echo_n "(cached) " >&6
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010813else
10814 ac_check_lib_save_LIBS=$LIBS
10815LIBS="-lz $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010816cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010817/* end confdefs.h. */
10818
Martin v. Löwiseba40652007-08-30 20:10:57 +000010819/* Override any GCC internal prototype to avoid an error.
10820 Use char because int might match the return type of a GCC
10821 builtin and then its argument prototype would still apply. */
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010822#ifdef __cplusplus
10823extern "C"
10824#endif
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010825char inflateCopy ();
10826int
10827main ()
10828{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010829return inflateCopy ();
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010830 ;
10831 return 0;
10832}
10833_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010834if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010835 ac_cv_lib_z_inflateCopy=yes
10836else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010837 ac_cv_lib_z_inflateCopy=no
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010838fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010839rm -f core conftest.err conftest.$ac_objext \
10840 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010841LIBS=$ac_check_lib_save_LIBS
10842fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010843{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
10844$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010845if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010846
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010847$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010848
10849fi
10850
10851
Ronald Oussorenf8752642006-07-06 10:13:35 +000010852case $ac_sys_system/$ac_sys_release in
10853Darwin/*)
10854 CFLAGS="${_CUR_CFLAGS}"
10855 LDFLAGS="${_CUR_LDFLAGS}"
10856 ;;
10857esac
10858
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
10860$as_echo_n "checking for hstrerror... " >&6; }
10861cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010862/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010863
Martin v. Löwise9416172003-05-03 10:12:45 +000010864#include <netdb.h>
10865
Martin v. Löwise9416172003-05-03 10:12:45 +000010866int
10867main ()
10868{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010869void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010870 ;
10871 return 0;
10872}
10873_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010874if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010875
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010876$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010877
Matthias Klosec511b472010-05-08 11:01:39 +000010878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010879$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010880else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10882$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010883
10884fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010885rm -f core conftest.err conftest.$ac_objext \
10886 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010887
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
10889$as_echo_n "checking for inet_aton... " >&6; }
10890cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010891/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010892
Martin v. Löwis86d66262006-02-17 08:40:11 +000010893#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010894#include <sys/socket.h>
10895#include <netinet/in.h>
10896#include <arpa/inet.h>
10897
Martin v. Löwise9416172003-05-03 10:12:45 +000010898int
10899main ()
10900{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010901void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010902 ;
10903 return 0;
10904}
10905_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010906if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010907
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010908$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010909
Matthias Klosec511b472010-05-08 11:01:39 +000010910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010911$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010912else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10914$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010915
10916fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010917rm -f core conftest.err conftest.$ac_objext \
10918 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010919
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
10921$as_echo_n "checking for inet_pton... " >&6; }
10922cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010923/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010924
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010925#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010926#include <sys/socket.h>
10927#include <netinet/in.h>
10928#include <arpa/inet.h>
10929
Martin v. Löwise9416172003-05-03 10:12:45 +000010930int
10931main ()
10932{
10933void* p = inet_pton
10934 ;
10935 return 0;
10936}
10937_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010938if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010939
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010940$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010941
Matthias Klosec511b472010-05-08 11:01:39 +000010942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010943$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010944else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010945 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10946$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010947
10948fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010949rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000010950
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010951# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
10953$as_echo_n "checking for setgroups... " >&6; }
10954cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010955/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010956
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010957#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010958#ifdef HAVE_GRP_H
10959#include <grp.h>
10960#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000010961
Martin v. Löwisd5843682002-11-21 20:41:28 +000010962int
10963main ()
10964{
10965void* p = setgroups
10966 ;
10967 return 0;
10968}
10969_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010970if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010971
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010972$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010973
Matthias Klosec511b472010-05-08 11:01:39 +000010974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010975$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010976else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10978$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010979
10980fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010981rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010982
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010983# check for openpty and forkpty
10984
10985for ac_func in openpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010986do :
10987 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010988if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010989 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010990#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010991_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010992
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010993else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010994 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
10995$as_echo_n "checking for openpty in -lutil... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010996if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010997 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010998else
Martin v. Löwis11437992002-04-12 09:54:03 +000010999 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011000LIBS="-lutil $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011001cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011002/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011003
Martin v. Löwiseba40652007-08-30 20:10:57 +000011004/* Override any GCC internal prototype to avoid an error.
11005 Use char because int might match the return type of a GCC
11006 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011007#ifdef __cplusplus
11008extern "C"
11009#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011010char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011011int
11012main ()
11013{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011014return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011015 ;
11016 return 0;
11017}
11018_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011019if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011020 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011021else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011022 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011023fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011024rm -f core conftest.err conftest.$ac_objext \
11025 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011026LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011027fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011028{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
11029$as_echo "$ac_cv_lib_util_openpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011030if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011031 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011032 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011033else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011034 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
11035$as_echo_n "checking for openpty in -lbsd... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011036if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011037 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011038else
11039 ac_check_lib_save_LIBS=$LIBS
11040LIBS="-lbsd $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011041cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011042/* end confdefs.h. */
11043
Martin v. Löwiseba40652007-08-30 20:10:57 +000011044/* Override any GCC internal prototype to avoid an error.
11045 Use char because int might match the return type of a GCC
11046 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011047#ifdef __cplusplus
11048extern "C"
11049#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011050char openpty ();
11051int
11052main ()
11053{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011054return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011055 ;
11056 return 0;
11057}
11058_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011059if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011060 ac_cv_lib_bsd_openpty=yes
11061else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011062 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011063fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011064rm -f core conftest.err conftest.$ac_objext \
11065 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011066LIBS=$ac_check_lib_save_LIBS
11067fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011068{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
11069$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011070if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011071 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011072 LIBS="$LIBS -lbsd"
11073fi
11074
11075
11076fi
11077
Fred Drake8cef4cf2000-06-28 16:40:38 +000011078
11079fi
11080done
11081
11082for ac_func in forkpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011083do :
11084 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011085if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011086 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011087#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011088_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011089
Fred Drake8cef4cf2000-06-28 16:40:38 +000011090else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011091 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
11092$as_echo_n "checking for forkpty in -lutil... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011093if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011094 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011095else
Martin v. Löwis11437992002-04-12 09:54:03 +000011096 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011097LIBS="-lutil $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011098cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011099/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011100
Martin v. Löwiseba40652007-08-30 20:10:57 +000011101/* Override any GCC internal prototype to avoid an error.
11102 Use char because int might match the return type of a GCC
11103 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011104#ifdef __cplusplus
11105extern "C"
11106#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011107char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011108int
11109main ()
11110{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011111return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011112 ;
11113 return 0;
11114}
11115_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011116if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011117 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011118else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011119 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011120fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011121rm -f core conftest.err conftest.$ac_objext \
11122 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011123LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011124fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011125{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
11126$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011127if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011128 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011129 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011130else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011131 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
11132$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011133if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011134 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011135else
11136 ac_check_lib_save_LIBS=$LIBS
11137LIBS="-lbsd $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011138cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011139/* end confdefs.h. */
11140
Martin v. Löwiseba40652007-08-30 20:10:57 +000011141/* Override any GCC internal prototype to avoid an error.
11142 Use char because int might match the return type of a GCC
11143 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011144#ifdef __cplusplus
11145extern "C"
11146#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011147char forkpty ();
11148int
11149main ()
11150{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011151return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011152 ;
11153 return 0;
11154}
11155_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011156if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011157 ac_cv_lib_bsd_forkpty=yes
11158else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011159 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011160fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011161rm -f core conftest.err conftest.$ac_objext \
11162 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011163LIBS=$ac_check_lib_save_LIBS
11164fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011165{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
11166$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011167if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011168 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011169 LIBS="$LIBS -lbsd"
11170fi
11171
11172
11173fi
11174
Fred Drake8cef4cf2000-06-28 16:40:38 +000011175
11176fi
11177done
11178
Jack Jansendd19cf82001-12-06 22:36:17 +000011179
Brett Cannonaa5778d2008-03-18 04:09:00 +000011180# Stuff for expat.
Brett Cannonaa5778d2008-03-18 04:09:00 +000011181for ac_func in memmove
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011182do :
11183 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011184if test "x$ac_cv_func_memmove" = xyes; then :
Brett Cannonaa5778d2008-03-18 04:09:00 +000011185 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011186#define HAVE_MEMMOVE 1
Brett Cannonaa5778d2008-03-18 04:09:00 +000011187_ACEOF
11188
11189fi
11190done
11191
11192
Michael W. Hudson54241132001-12-07 15:38:26 +000011193# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000011194for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011195do :
11196 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11197ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011198if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011199 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011200#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011201_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000011202
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011203fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000011204done
11205
Michael W. Hudson54241132001-12-07 15:38:26 +000011206
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011207ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011208if test "x$ac_cv_func_dup2" = xyes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011209 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000011210
Martin v. Löwis1142de32002-03-29 16:28:31 +000011211else
Martin v. Löwiseba40652007-08-30 20:10:57 +000011212 case " $LIBOBJS " in
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011213 *" dup2.$ac_objext "* ) ;;
11214 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Martin v. Löwiseba40652007-08-30 20:10:57 +000011215 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011216esac
11217
Martin v. Löwis1142de32002-03-29 16:28:31 +000011218fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011219
11220ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011221if test "x$ac_cv_func_getcwd" = xyes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011222 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
11223
11224else
11225 case " $LIBOBJS " in
11226 *" getcwd.$ac_objext "* ) ;;
11227 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
11228 ;;
11229esac
11230
11231fi
11232
11233ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011234if test "x$ac_cv_func_strdup" = xyes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011235 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
11236
11237else
11238 case " $LIBOBJS " in
11239 *" strdup.$ac_objext "* ) ;;
11240 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
11241 ;;
11242esac
11243
11244fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000011245
11246
11247for ac_func in getpgrp
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011248do :
11249 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011250if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011251 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011252#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011253_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011254 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011255/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011256#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011257int
11258main ()
11259{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011260getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011261 ;
11262 return 0;
11263}
11264_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011265if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011266
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011267$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011268
Guido van Rossum627b2d71993-12-24 10:39:16 +000011269fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011270rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011271
Guido van Rossum627b2d71993-12-24 10:39:16 +000011272fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011273done
Guido van Rossum627b2d71993-12-24 10:39:16 +000011274
Jack Jansen150753c2003-03-29 22:07:47 +000011275for ac_func in setpgrp
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011276do :
11277 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011278if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000011279 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011280#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000011281_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011282 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011283/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000011284#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000011285int
11286main ()
11287{
11288setpgrp(0,0);
11289 ;
11290 return 0;
11291}
11292_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011293if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011294
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011295$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011296
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011297fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011298rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000011299
11300fi
11301done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011302
Thomas Wouters3a584202000-08-05 23:28:51 +000011303for ac_func in gettimeofday
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011304do :
11305 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011306if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011307 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011308#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011309_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011310 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011311/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011312#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011313int
11314main ()
11315{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011316gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011317 ;
11318 return 0;
11319}
11320_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011321if ac_fn_c_try_compile "$LINENO"; then :
11322
Guido van Rossum627b2d71993-12-24 10:39:16 +000011323else
Skip Montanaro6dead952003-09-25 14:50:04 +000011324
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011325$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011326
Martin v. Löwis11437992002-04-12 09:54:03 +000011327
Guido van Rossum627b2d71993-12-24 10:39:16 +000011328fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011329rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011330
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011331fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011332done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011333
Michael W. Hudson54241132001-12-07 15:38:26 +000011334
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
11336$as_echo_n "checking for major... " >&6; }
11337cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011338/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011339
Neal Norwitz6eb37f02003-02-23 23:28:15 +000011340#if defined(MAJOR_IN_MKDEV)
11341#include <sys/mkdev.h>
11342#elif defined(MAJOR_IN_SYSMACROS)
11343#include <sys/sysmacros.h>
11344#else
11345#include <sys/types.h>
11346#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011347
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011348int
11349main ()
11350{
11351
11352 makedev(major(0),minor(0));
11353
11354 ;
11355 return 0;
11356}
11357_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011358if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011359
11360
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011361$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011362
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11364$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011365
11366else
Skip Montanaro6dead952003-09-25 14:50:04 +000011367
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11369$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011370
11371fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011372rm -f core conftest.err conftest.$ac_objext \
11373 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011374
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011375# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000011376# for [no]getaddrinfo in netdb.h.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
11378$as_echo_n "checking for getaddrinfo... " >&6; }
11379cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011380/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011381
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011382#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011383#include <sys/socket.h>
11384#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011385#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011386
Martin v. Löwis11437992002-04-12 09:54:03 +000011387int
11388main ()
11389{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011390getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000011391 ;
11392 return 0;
11393}
11394_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011395if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011396 have_getaddrinfo=yes
11397else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011398 have_getaddrinfo=no
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011399fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011400rm -f core conftest.err conftest.$ac_objext \
11401 conftest$ac_exeext conftest.$ac_ext
11402{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
11403$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011404if test $have_getaddrinfo = yes
11405then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011406 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
11407$as_echo_n "checking getaddrinfo bug... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011408 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011409 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011410else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011411 if test "$cross_compiling" = yes; then :
doko@python.orgd65e2ba2013-01-31 23:52:03 +010011412
11413if test "${enable_ipv6+set}" = set; then
11414 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
11415else
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011416 ac_cv_buggy_getaddrinfo=yes
doko@python.orgd65e2ba2013-01-31 23:52:03 +010011417fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011418else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011419 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011420/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011421
Stefan Krah0afe4e42012-11-22 23:56:51 +010011422#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011423#include <sys/types.h>
11424#include <netdb.h>
11425#include <string.h>
11426#include <sys/socket.h>
11427#include <netinet/in.h>
11428
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011429int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011430{
11431 int passive, gaierr, inet4 = 0, inet6 = 0;
11432 struct addrinfo hints, *ai, *aitop;
11433 char straddr[INET6_ADDRSTRLEN], strport[16];
11434
11435 for (passive = 0; passive <= 1; passive++) {
11436 memset(&hints, 0, sizeof(hints));
11437 hints.ai_family = AF_UNSPEC;
11438 hints.ai_flags = passive ? AI_PASSIVE : 0;
11439 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000011440 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011441 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
11442 (void)gai_strerror(gaierr);
11443 goto bad;
11444 }
11445 for (ai = aitop; ai; ai = ai->ai_next) {
11446 if (ai->ai_addr == NULL ||
11447 ai->ai_addrlen == 0 ||
11448 getnameinfo(ai->ai_addr, ai->ai_addrlen,
11449 straddr, sizeof(straddr), strport, sizeof(strport),
11450 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
11451 goto bad;
11452 }
11453 switch (ai->ai_family) {
11454 case AF_INET:
11455 if (strcmp(strport, "54321") != 0) {
11456 goto bad;
11457 }
11458 if (passive) {
11459 if (strcmp(straddr, "0.0.0.0") != 0) {
11460 goto bad;
11461 }
11462 } else {
11463 if (strcmp(straddr, "127.0.0.1") != 0) {
11464 goto bad;
11465 }
11466 }
11467 inet4++;
11468 break;
11469 case AF_INET6:
11470 if (strcmp(strport, "54321") != 0) {
11471 goto bad;
11472 }
11473 if (passive) {
11474 if (strcmp(straddr, "::") != 0) {
11475 goto bad;
11476 }
11477 } else {
11478 if (strcmp(straddr, "::1") != 0) {
11479 goto bad;
11480 }
11481 }
11482 inet6++;
11483 break;
11484 case AF_UNSPEC:
11485 goto bad;
11486 break;
11487 default:
11488 /* another family support? */
11489 break;
11490 }
11491 }
11492 }
11493
11494 if (!(inet4 == 0 || inet4 == 2))
11495 goto bad;
11496 if (!(inet6 == 0 || inet6 == 2))
11497 goto bad;
11498
11499 if (aitop)
11500 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011501 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011502
11503 bad:
11504 if (aitop)
11505 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011506 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011507}
11508
Martin v. Löwis11437992002-04-12 09:54:03 +000011509_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011510if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011511 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011512else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011513 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011514fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011515rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11516 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011517fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011518
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011519fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011520
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011521fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011522
Benjamin Peterson75fed812010-11-01 01:47:19 +000011523{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
11524$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
11525
Mark Dickinson0ef0b912009-12-31 21:11:48 +000011526if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011527then
11528 if test $ipv6 = yes
11529 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011530 echo 'Fatal: You must get working getaddrinfo() function.'
11531 echo ' or you can specify "--disable-ipv6"'.
11532 exit 1
11533 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011534else
Martin v. Löwis11437992002-04-12 09:54:03 +000011535
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011536$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011537
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011538fi
Benjamin Peterson75fed812010-11-01 01:47:19 +000011539
Jack Jansen9a66b6d2001-08-08 13:56:14 +000011540for ac_func in getnameinfo
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011541do :
11542 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011543if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011544 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011545#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011546_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011547
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011548fi
11549done
11550
Michael W. Hudson54241132001-12-07 15:38:26 +000011551
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011552# checks for structures
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011553{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
11554$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011555if ${ac_cv_header_time+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011556 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011557else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011558 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011559/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011560#include <sys/types.h>
11561#include <sys/time.h>
11562#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011563
Martin v. Löwis11437992002-04-12 09:54:03 +000011564int
11565main ()
11566{
11567if ((struct tm *) 0)
11568return 0;
11569 ;
11570 return 0;
11571}
11572_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011573if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011574 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011575else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011576 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011577fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011578rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011579fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011580{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
11581$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011582if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011583
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011584$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011585
11586fi
11587
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
11589$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011590if ${ac_cv_struct_tm+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011591 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011592else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011593 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011594/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011595#include <sys/types.h>
11596#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011597
Martin v. Löwis11437992002-04-12 09:54:03 +000011598int
11599main ()
11600{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011601struct tm tm;
11602 int *p = &tm.tm_sec;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011603 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000011604 ;
11605 return 0;
11606}
11607_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011608if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011609 ac_cv_struct_tm=time.h
11610else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011611 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011612fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011613rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011614fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011615{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
11616$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011617if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011618
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011619$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011620
11621fi
11622
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011623ac_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 +000011624#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000011625
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011626"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011627if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011628
11629cat >>confdefs.h <<_ACEOF
11630#define HAVE_STRUCT_TM_TM_ZONE 1
11631_ACEOF
11632
11633
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011634fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011635
Martin v. Löwis11437992002-04-12 09:54:03 +000011636if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
11637
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011638$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011639
11640else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011641 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
11642"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011643if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011644 ac_have_decl=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000011645else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011646 ac_have_decl=0
Martin v. Löwiseba40652007-08-30 20:10:57 +000011647fi
11648
Martin v. Löwiseba40652007-08-30 20:10:57 +000011649cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011650#define HAVE_DECL_TZNAME $ac_have_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +000011651_ACEOF
11652
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011653 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
11654$as_echo_n "checking for tzname... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011655if ${ac_cv_var_tzname+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011656 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000011657else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011658 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011659/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011660#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000011661#if !HAVE_DECL_TZNAME
11662extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000011663#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011664
Martin v. Löwis11437992002-04-12 09:54:03 +000011665int
11666main ()
11667{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011668return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000011669 ;
11670 return 0;
11671}
11672_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011673if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011674 ac_cv_var_tzname=yes
11675else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011676 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011677fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011678rm -f core conftest.err conftest.$ac_objext \
11679 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000011680fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011681{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
11682$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011683 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011684
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011685$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011686
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011687 fi
11688fi
11689
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011690ac_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 +010011691if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011692
11693cat >>confdefs.h <<_ACEOF
11694#define HAVE_STRUCT_STAT_ST_RDEV 1
11695_ACEOF
11696
11697
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011698fi
11699
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011700ac_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 +010011701if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011702
Martin v. Löwis11437992002-04-12 09:54:03 +000011703cat >>confdefs.h <<_ACEOF
11704#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
11705_ACEOF
11706
11707
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011708fi
11709
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011710ac_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 +010011711if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000011712
11713cat >>confdefs.h <<_ACEOF
11714#define HAVE_STRUCT_STAT_ST_FLAGS 1
11715_ACEOF
11716
11717
11718fi
11719
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011720ac_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 +010011721if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011722
11723cat >>confdefs.h <<_ACEOF
11724#define HAVE_STRUCT_STAT_ST_GEN 1
11725_ACEOF
11726
11727
11728fi
11729
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011730ac_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 +010011731if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011732
11733cat >>confdefs.h <<_ACEOF
11734#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
11735_ACEOF
11736
11737
11738fi
11739
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011740ac_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 +010011741if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011742
Martin v. Löwis11437992002-04-12 09:54:03 +000011743cat >>confdefs.h <<_ACEOF
11744#define HAVE_STRUCT_STAT_ST_BLOCKS 1
11745_ACEOF
11746
11747
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011748$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011749
11750else
Martin v. Löwiseba40652007-08-30 20:10:57 +000011751 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000011752 *" fileblocks.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011753 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
11754 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011755esac
11756
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011757fi
11758
Michael W. Hudson54241132001-12-07 15:38:26 +000011759
Martin v. Löwis11437992002-04-12 09:54:03 +000011760
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
11762$as_echo_n "checking for time.h that defines altzone... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011763if ${ac_cv_header_time_altzone+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011764 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011765else
Matthias Klosec511b472010-05-08 11:01:39 +000011766
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011767 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011768/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011769#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011770int
11771main ()
11772{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011773return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000011774 ;
11775 return 0;
11776}
11777_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011778if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011779 ac_cv_header_time_altzone=yes
11780else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011781 ac_cv_header_time_altzone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011782fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011783rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosec511b472010-05-08 11:01:39 +000011784
Martin v. Löwiseba40652007-08-30 20:10:57 +000011785fi
11786
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011787{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
11788$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011789if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011790
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011791$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011792
11793fi
11794
Guido van Rossumda88dad1995-01-26 00:46:29 +000011795was_it_defined=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
11797$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
11798cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011799/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011800
11801#include <sys/types.h>
11802#include <sys/select.h>
11803#include <sys/time.h>
11804
Martin v. Löwis11437992002-04-12 09:54:03 +000011805int
11806main ()
11807{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011808;
Martin v. Löwis11437992002-04-12 09:54:03 +000011809 ;
11810 return 0;
11811}
11812_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011813if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011814
11815
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011816$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011817
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011818 was_it_defined=yes
11819
Martin v. Löwiseba40652007-08-30 20:10:57 +000011820fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011821rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011822{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
11823$as_echo "$was_it_defined" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011824
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
11826$as_echo_n "checking for addrinfo... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011827if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011828 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011829else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011830 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011831/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +000011832#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011833int
11834main ()
11835{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011836struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000011837 ;
11838 return 0;
11839}
11840_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011841if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011842 ac_cv_struct_addrinfo=yes
11843else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011844 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011845fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011846rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11847fi
11848
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011849{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
11850$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011851if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011852
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011853$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011854
11855fi
11856
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
11858$as_echo_n "checking for sockaddr_storage... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011859if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011860 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011861else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011862 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011863/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011864
11865# include <sys/types.h>
11866# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011867int
11868main ()
11869{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011870struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000011871 ;
11872 return 0;
11873}
11874_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011875if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011876 ac_cv_struct_sockaddr_storage=yes
11877else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011878 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011879fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011880rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11881fi
11882
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011883{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
11884$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011885if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011886
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011887$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011888
11889fi
11890
Guido van Rossum627b2d71993-12-24 10:39:16 +000011891# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000011892
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
11894$as_echo_n "checking whether char is unsigned... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011895if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011896 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000011897else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011898 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011899/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011900$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000011901int
11902main ()
11903{
11904static int test_array [1 - 2 * !(((char) -1) < 0)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +010011905test_array [0] = 0;
11906return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000011907
11908 ;
11909 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000011910}
Martin v. Löwis11437992002-04-12 09:54:03 +000011911_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011912if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000011913 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011914else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011915 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011916fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011917rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011918fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011919{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
11920$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011921if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011922 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011923
11924fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000011925
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11927$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011928if ${ac_cv_c_const+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011929 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011930else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011931 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011932/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011933
Martin v. Löwis11437992002-04-12 09:54:03 +000011934int
11935main ()
11936{
Charles-François Natalibe2b9072013-01-08 19:47:00 +010011937
Martin v. Löwis11437992002-04-12 09:54:03 +000011938#ifndef __cplusplus
Charles-François Natalibe2b9072013-01-08 19:47:00 +010011939 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011940 typedef int charset[2];
Charles-François Natalibe2b9072013-01-08 19:47:00 +010011941 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000011942 /* SunOS 4.1.1 cc rejects this. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000011943 char const *const *pcpcc;
11944 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011945 /* NEC SVR4.0.2 mips cc rejects this. */
11946 struct point {int x, y;};
11947 static struct point const zero = {0,0};
11948 /* AIX XL C 1.02.0.0 rejects this.
11949 It does not let you subtract one const X* pointer from another in
11950 an arm of an if-expression whose if-part is not a constant
11951 expression */
11952 const char *g = "string";
Martin v. Löwiseba40652007-08-30 20:10:57 +000011953 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011954 /* HPUX 7.0 cc rejects these. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000011955 ++pcpcc;
11956 ppc = (char**) pcpcc;
11957 pcpcc = (char const *const *) ppc;
Charles-François Natalibe2b9072013-01-08 19:47:00 +010011958 { /* SCO 3.2v4 cc rejects this sort of thing. */
11959 char tx;
11960 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000011961 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011962
Martin v. Löwis11437992002-04-12 09:54:03 +000011963 *t++ = 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011964 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011965 }
11966 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11967 int x[] = {25, 17};
11968 const int *foo = &x[0];
11969 ++foo;
11970 }
11971 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11972 typedef const int *iptr;
11973 iptr p = 0;
11974 ++p;
11975 }
Charles-François Natalibe2b9072013-01-08 19:47:00 +010011976 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000011977 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Charles-François Natalibe2b9072013-01-08 19:47:00 +010011978 struct s { int j; const int *ap[3]; } bx;
11979 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000011980 }
11981 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11982 const int foo = 10;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011983 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011984 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011985 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000011986#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000011987
Martin v. Löwis11437992002-04-12 09:54:03 +000011988 ;
11989 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011990}
Martin v. Löwis11437992002-04-12 09:54:03 +000011991_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011992if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011993 ac_cv_c_const=yes
11994else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011995 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011996fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011997rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011998fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011999{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12000$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012001if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012002
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012003$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012004
12005fi
12006
Michael W. Hudson54241132001-12-07 15:38:26 +000012007
Guido van Rossumda88dad1995-01-26 00:46:29 +000012008works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
12010$as_echo_n "checking for working volatile... " >&6; }
12011cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012012/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012013
Martin v. Löwis11437992002-04-12 09:54:03 +000012014int
12015main ()
12016{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012017volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012018 ;
12019 return 0;
12020}
12021_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012022if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012023 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012024else
Skip Montanaro6dead952003-09-25 14:50:04 +000012025
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012026$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012027
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012028
Guido van Rossum627b2d71993-12-24 10:39:16 +000012029fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012030rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012031{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12032$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012033
Guido van Rossumda88dad1995-01-26 00:46:29 +000012034works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
12036$as_echo_n "checking for working signed char... " >&6; }
12037cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012038/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012039
Martin v. Löwis11437992002-04-12 09:54:03 +000012040int
12041main ()
12042{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012043signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000012044 ;
12045 return 0;
12046}
12047_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012048if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012049 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012050else
Skip Montanaro6dead952003-09-25 14:50:04 +000012051
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012052$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000012053
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012054
Guido van Rossum7f43da71994-08-01 12:15:30 +000012055fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012056rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012057{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12058$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012059
Guido van Rossumda88dad1995-01-26 00:46:29 +000012060have_prototypes=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
12062$as_echo_n "checking for prototypes... " >&6; }
12063cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012064/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012065int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012066int
12067main ()
12068{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012069return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000012070 ;
12071 return 0;
12072}
12073_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012074if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012075
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012076$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012077
Matthias Klosec511b472010-05-08 11:01:39 +000012078 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012079fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012080rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012081{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
12082$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012083
Guido van Rossumda88dad1995-01-26 00:46:29 +000012084works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
12086$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
12087cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012088/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012089
12090#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000012091int foo(int x, ...) {
12092 va_list va;
12093 va_start(va, x);
12094 va_arg(va, int);
12095 va_arg(va, char *);
12096 va_arg(va, double);
12097 return 0;
12098}
Guido van Rossum7f43da71994-08-01 12:15:30 +000012099
Martin v. Löwis11437992002-04-12 09:54:03 +000012100int
12101main ()
12102{
Guido van Rossum90eea071996-08-30 20:58:57 +000012103return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000012104 ;
12105 return 0;
12106}
12107_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012108if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012109
12110
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012111$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012112
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012113 works=yes
12114
Guido van Rossum627b2d71993-12-24 10:39:16 +000012115fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012116rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012117{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12118$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012119
Martin v. Löwisd6320502004-08-12 13:45:08 +000012120# check for socketpair
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
12122$as_echo_n "checking for socketpair... " >&6; }
12123cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012124/* end confdefs.h. */
12125
12126#include <sys/types.h>
12127#include <sys/socket.h>
12128
12129int
12130main ()
12131{
12132void *x=socketpair
12133 ;
12134 return 0;
12135}
12136_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012137if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000012138
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012139$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000012140
Matthias Klosec511b472010-05-08 11:01:39 +000012141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012142$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012143else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12145$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012146
12147fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012148rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012149
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012150# check if sockaddr has sa_len member
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012151{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
12152$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
12153cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012154/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012155#include <sys/types.h>
12156#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012157int
12158main ()
12159{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012160struct sockaddr x;
12161x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012162 ;
12163 return 0;
12164}
12165_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012166if ac_fn_c_try_compile "$LINENO"; then :
12167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12168$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012169
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012170$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012171
12172else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012173 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12174$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000012175
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012176fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012177rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012178
Guido van Rossumda88dad1995-01-26 00:46:29 +000012179va_list_is_array=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
12181$as_echo_n "checking whether va_list is an array... " >&6; }
12182cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012183/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012184
12185#ifdef HAVE_STDARG_PROTOTYPES
12186#include <stdarg.h>
12187#else
12188#include <varargs.h>
12189#endif
12190
Martin v. Löwis11437992002-04-12 09:54:03 +000012191int
12192main ()
12193{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012194va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000012195 ;
12196 return 0;
12197}
12198_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012199if ac_fn_c_try_compile "$LINENO"; then :
12200
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012201else
Skip Montanaro6dead952003-09-25 14:50:04 +000012202
Martin v. Löwis11437992002-04-12 09:54:03 +000012203
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012204$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012205
Guido van Rossumda88dad1995-01-26 00:46:29 +000012206 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012207
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012208fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012209rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012210{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
12211$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012212
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012213# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000012214
12215
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012216ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012217if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012218
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012219 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000012220
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012221 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
12222$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012223 OLD_CFLAGS=$CFLAGS
12224 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012225 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012226/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012227
12228# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012229
Martin v. Löwis11437992002-04-12 09:54:03 +000012230int
12231main ()
12232{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012233
12234 char *name;
12235 struct hostent *he, *res;
12236 char buffer[2048];
12237 int buflen = 2048;
12238 int h_errnop;
12239
12240 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012241
12242 ;
12243 return 0;
12244}
12245_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012246if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012247
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012248 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012249
Martin v. Löwis11437992002-04-12 09:54:03 +000012250
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012251$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012252
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012253 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12254$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012255
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012256else
Skip Montanaro6dead952003-09-25 14:50:04 +000012257
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012258 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12259$as_echo "no" >&6; }
12260 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
12261$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
12262 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012263/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012264
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012265# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012266
Martin v. Löwis11437992002-04-12 09:54:03 +000012267int
12268main ()
12269{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012270
12271 char *name;
12272 struct hostent *he;
Matthias Klosec511b472010-05-08 11:01:39 +000012273 char buffer[2048];
12274 int buflen = 2048;
12275 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012276
Matthias Klosec511b472010-05-08 11:01:39 +000012277 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012278
12279 ;
12280 return 0;
12281}
12282_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012283if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012284
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012285 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012286
Martin v. Löwis11437992002-04-12 09:54:03 +000012287
Matthias Klosec511b472010-05-08 11:01:39 +000012288$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012289
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012290 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12291$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012292
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012293else
Skip Montanaro6dead952003-09-25 14:50:04 +000012294
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12296$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000012297 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
12298$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
12299 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12300/* end confdefs.h. */
12301
12302# include <netdb.h>
12303
12304int
12305main ()
12306{
12307
12308 char *name;
12309 struct hostent *he;
12310 struct hostent_data data;
12311
12312 (void) gethostbyname_r(name, he, &data);
12313
12314 ;
12315 return 0;
12316}
12317_ACEOF
12318if ac_fn_c_try_compile "$LINENO"; then :
12319
12320 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
12321
12322
12323$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
12324
12325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12326$as_echo "yes" >&6; }
12327
12328else
12329
12330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12331$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012332
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012333fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012334rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012335
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012336fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012337rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012338
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012339fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012340rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012341 CFLAGS=$OLD_CFLAGS
12342
12343else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012344
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012345 for ac_func in gethostbyname
12346do :
12347 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012348if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012349 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012350#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012351_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012352
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012353fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012354done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012355
Michael W. Hudson54241132001-12-07 15:38:26 +000012356
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012357fi
12358
Michael W. Hudson54241132001-12-07 15:38:26 +000012359
12360
12361
12362
12363
12364
Guido van Rossum627b2d71993-12-24 10:39:16 +000012365# checks for system services
12366# (none yet)
12367
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012368# Linux requires this for correct f.p. operations
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012369ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012370if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012371
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012372else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012373 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
12374$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012375if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012376 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012377else
Martin v. Löwis11437992002-04-12 09:54:03 +000012378 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012379LIBS="-lieee $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012380cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012381/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012382
Martin v. Löwiseba40652007-08-30 20:10:57 +000012383/* Override any GCC internal prototype to avoid an error.
12384 Use char because int might match the return type of a GCC
12385 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012386#ifdef __cplusplus
12387extern "C"
12388#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012389char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012390int
12391main ()
12392{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012393return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012394 ;
12395 return 0;
12396}
12397_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012398if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012399 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012400else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012401 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012402fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012403rm -f core conftest.err conftest.$ac_objext \
12404 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012405LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012406fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012407{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
12408$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012409if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012410 cat >>confdefs.h <<_ACEOF
12411#define HAVE_LIBIEEE 1
12412_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012413
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012414 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012415
Guido van Rossum627b2d71993-12-24 10:39:16 +000012416fi
12417
Michael W. Hudson54241132001-12-07 15:38:26 +000012418
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012419fi
12420
Michael W. Hudson54241132001-12-07 15:38:26 +000012421
Guido van Rossum7f253911997-05-09 02:42:48 +000012422# Check for --with-fpectl
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
12424$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012425
Martin v. Löwiseba40652007-08-30 20:10:57 +000012426# Check whether --with-fpectl was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012427if test "${with_fpectl+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000012428 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000012429if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000012430then
12431
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012432$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012433
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12435$as_echo "yes" >&6; }
12436else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12437$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012438fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000012439else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012440 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12441$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012442fi
12443
Guido van Rossum7f253911997-05-09 02:42:48 +000012444
Guido van Rossum7f43da71994-08-01 12:15:30 +000012445# check for --with-libm=...
12446
Guido van Rossum563e7081996-09-10 18:20:48 +000012447case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000012448Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012449BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000012450*) LIBM=-lm
12451esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
12453$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012454
Martin v. Löwiseba40652007-08-30 20:10:57 +000012455# Check whether --with-libm was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012456if test "${with_libm+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000012457 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000012458if test "$withval" = no
12459then LIBM=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
12461$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012462elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012463then LIBM=$withval
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
12465$as_echo "set LIBM=\"$withval\"" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012466else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012467fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012468else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012469 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
12470$as_echo "default LIBM=\"$LIBM\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012471fi
12472
Guido van Rossum7f43da71994-08-01 12:15:30 +000012473
12474# check for --with-libc=...
12475
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012476{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
12477$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012478
Martin v. Löwiseba40652007-08-30 20:10:57 +000012479# Check whether --with-libc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012480if test "${with_libc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000012481 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000012482if test "$withval" = no
12483then LIBC=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
12485$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012486elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012487then LIBC=$withval
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
12489$as_echo "set LIBC=\"$withval\"" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012490else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012491fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012492else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
12494$as_echo "default LIBC=\"$LIBC\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012495fi
12496
Guido van Rossum7f43da71994-08-01 12:15:30 +000012497
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012498# **************************************************
12499# * Check for various properties of floating point *
12500# **************************************************
Mark Dickinson265d7382008-04-21 22:32:24 +000012501
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012502{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
12503$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012504if ${ac_cv_little_endian_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012505 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012506else
12507
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012508if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012509 ac_cv_little_endian_double=no
12510else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012511 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012512/* end confdefs.h. */
12513
12514#include <string.h>
12515int main() {
12516 double x = 9006104071832581.0;
12517 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
12518 return 0;
12519 else
12520 return 1;
12521}
12522
12523_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012524if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012525 ac_cv_little_endian_double=yes
12526else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012527 ac_cv_little_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012528fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012529rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12530 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012531fi
12532
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012533fi
12534
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012535{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
12536$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012537if test "$ac_cv_little_endian_double" = yes
12538then
12539
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012540$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012541
12542fi
12543
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
12545$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012546if ${ac_cv_big_endian_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012547 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012548else
12549
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012550if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012551 ac_cv_big_endian_double=no
12552else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012553 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012554/* end confdefs.h. */
12555
12556#include <string.h>
12557int main() {
12558 double x = 9006104071832581.0;
12559 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
12560 return 0;
12561 else
12562 return 1;
12563}
12564
12565_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012566if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012567 ac_cv_big_endian_double=yes
12568else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012569 ac_cv_big_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012570fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012571rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12572 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012573fi
12574
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012575fi
12576
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012577{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
12578$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012579if test "$ac_cv_big_endian_double" = yes
12580then
12581
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012582$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012583
12584fi
12585
12586# Some ARM platforms use a mixed-endian representation for doubles.
12587# While Python doesn't currently have full support for these platforms
12588# (see e.g., issue 1762561), we can at least make sure that float <-> string
12589# conversions work.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
12591$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012592if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012593 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012594else
12595
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012596if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012597 ac_cv_mixed_endian_double=no
12598else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012599 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012600/* end confdefs.h. */
12601
12602#include <string.h>
12603int main() {
12604 double x = 9006104071832581.0;
12605 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
12606 return 0;
12607 else
12608 return 1;
12609}
12610
12611_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012612if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012613 ac_cv_mixed_endian_double=yes
12614else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012615 ac_cv_mixed_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012616fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012617rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12618 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012619fi
12620
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012621fi
12622
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012623{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
12624$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012625if test "$ac_cv_mixed_endian_double" = yes
12626then
12627
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012628$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012629
12630fi
12631
12632# The short float repr introduced in Python 3.1 requires the
12633# correctly-rounded string <-> double conversion functions from
12634# Python/dtoa.c, which in turn require that the FPU uses 53-bit
12635# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsona548dee2009-11-15 13:12:43 +000012636# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012637# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsona548dee2009-11-15 13:12:43 +000012638
12639# This inline assembler syntax may also work for suncc and icc,
12640# so we try it on all platforms.
12641
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
12643$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
12644cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012645/* end confdefs.h. */
12646
12647int
12648main ()
12649{
12650
Mark Dickinsona548dee2009-11-15 13:12:43 +000012651 unsigned short cw;
12652 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
12653 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012654
12655 ;
12656 return 0;
12657}
12658_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012659if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012660 have_gcc_asm_for_x87=yes
12661else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012662 have_gcc_asm_for_x87=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012663fi
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012664rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012665{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
12666$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsona548dee2009-11-15 13:12:43 +000012667if test "$have_gcc_asm_for_x87" = yes
12668then
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012669
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012670$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012671
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012672fi
Mark Dickinson7a3d8642008-04-22 00:54:27 +000012673
Mark Dickinson04b27232009-01-04 12:29:36 +000012674# Detect whether system arithmetic is subject to x87-style double
12675# rounding issues. The result of this test has little meaning on non
12676# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
12677# mode is round-to-nearest and double rounding issues are present, and
12678# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
12680$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinson99abd142009-10-24 13:44:16 +000012681# $BASECFLAGS may affect the result
12682ac_save_cc="$CC"
12683CC="$CC $BASECFLAGS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012684if test "$cross_compiling" = yes; then :
Mark Dickinson04b27232009-01-04 12:29:36 +000012685 ac_cv_x87_double_rounding=no
12686else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012687 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson04b27232009-01-04 12:29:36 +000012688/* end confdefs.h. */
12689
12690#include <stdlib.h>
12691#include <math.h>
12692int main() {
12693 volatile double x, y, z;
12694 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
12695 x = 0.99999999999999989; /* 1-2**-53 */
12696 y = 1./x;
12697 if (y != 1.)
12698 exit(0);
12699 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
12700 x = 1e16;
12701 y = 2.99999;
12702 z = x + y;
12703 if (z != 1e16+4.)
12704 exit(0);
12705 /* both tests show evidence of double rounding */
12706 exit(1);
12707}
12708
12709_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012710if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson04b27232009-01-04 12:29:36 +000012711 ac_cv_x87_double_rounding=no
12712else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012713 ac_cv_x87_double_rounding=yes
Mark Dickinson04b27232009-01-04 12:29:36 +000012714fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012715rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12716 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson04b27232009-01-04 12:29:36 +000012717fi
12718
Mark Dickinson99abd142009-10-24 13:44:16 +000012719CC="$ac_save_cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012720{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
12721$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson04b27232009-01-04 12:29:36 +000012722if test "$ac_cv_x87_double_rounding" = yes
12723then
12724
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012725$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson04b27232009-01-04 12:29:36 +000012726
12727fi
12728
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012729# ************************************
12730# * Check for mathematical functions *
12731# ************************************
12732
12733LIBS_SAVE=$LIBS
12734LIBS="$LIBS $LIBM"
12735
Mark Dickinson265d7382008-04-21 22:32:24 +000012736# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
12737# -0. on some architectures.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
12739$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012740if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012741 $as_echo_n "(cached) " >&6
Mark Dickinson265d7382008-04-21 22:32:24 +000012742else
12743
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012744if test "$cross_compiling" = yes; then :
Mark Dickinson265d7382008-04-21 22:32:24 +000012745 ac_cv_tanh_preserves_zero_sign=no
12746else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012747 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson265d7382008-04-21 22:32:24 +000012748/* end confdefs.h. */
12749
12750#include <math.h>
Mark Dickinson7a3d8642008-04-22 00:54:27 +000012751#include <stdlib.h>
Mark Dickinson265d7382008-04-21 22:32:24 +000012752int main() {
12753 /* return 0 if either negative zeros don't exist
12754 on this platform or if negative zeros exist
12755 and tanh(-0.) == -0. */
12756 if (atan2(0., -1.) == atan2(-0., -1.) ||
12757 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
12758 else exit(1);
12759}
12760
12761_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012762if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson265d7382008-04-21 22:32:24 +000012763 ac_cv_tanh_preserves_zero_sign=yes
12764else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012765 ac_cv_tanh_preserves_zero_sign=no
Mark Dickinson265d7382008-04-21 22:32:24 +000012766fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012767rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12768 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson265d7382008-04-21 22:32:24 +000012769fi
12770
Mark Dickinson265d7382008-04-21 22:32:24 +000012771fi
12772
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012773{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
12774$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Mark Dickinson265d7382008-04-21 22:32:24 +000012775if test "$ac_cv_tanh_preserves_zero_sign" = yes
12776then
12777
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012778$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Mark Dickinson265d7382008-04-21 22:32:24 +000012779
12780fi
12781
Mark Dickinson65898e02009-09-05 10:27:00 +000012782for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012783do :
12784 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12785ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012786if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinson65898e02009-09-05 10:27:00 +000012787 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012788#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Mark Dickinson65898e02009-09-05 10:27:00 +000012789_ACEOF
12790
12791fi
12792done
12793
Mark Dickinson65898e02009-09-05 10:27:00 +000012794for ac_func in hypot lgamma log1p round tgamma
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012795do :
12796 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12797ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012798if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Christian Heimes0a8143f2007-12-18 23:22:54 +000012799 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012800#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes0a8143f2007-12-18 23:22:54 +000012801_ACEOF
12802
12803fi
12804done
12805
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012806ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
12807"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012808if test "x$ac_cv_have_decl_isinf" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012809 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012810else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012811 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012812fi
12813
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012814cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012815#define HAVE_DECL_ISINF $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012816_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012817ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
12818"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012819if test "x$ac_cv_have_decl_isnan" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012820 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012821else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012822 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012823fi
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012824
12825cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012826#define HAVE_DECL_ISNAN $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012827_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012828ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
12829"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012830if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012831 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012832else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012833 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012834fi
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012835
12836cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012837#define HAVE_DECL_ISFINITE $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012838_ACEOF
12839
12840
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000012841LIBS=$LIBS_SAVE
12842
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012843# For multiprocessing module, check that sem_open
12844# actually works. For FreeBSD versions <= 7.2,
12845# the kernel module that provides POSIX semaphores
12846# isn't loaded by default, so an attempt to call
12847# sem_open results in a 'Signal 12' error.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
12849$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012850if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012851 $as_echo_n "(cached) " >&6
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012852else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012853 if test "$cross_compiling" = yes; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012854 ac_cv_posix_semaphores_enabled=yes
12855else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012856 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012857/* end confdefs.h. */
12858
12859#include <unistd.h>
12860#include <fcntl.h>
12861#include <stdio.h>
12862#include <semaphore.h>
12863#include <sys/stat.h>
12864
12865int main(void) {
12866 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
12867 if (a == SEM_FAILED) {
12868 perror("sem_open");
12869 return 1;
12870 }
12871 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000012872 sem_unlink("/autoconf");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012873 return 0;
12874}
12875
12876_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012877if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012878 ac_cv_posix_semaphores_enabled=yes
12879else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012880 ac_cv_posix_semaphores_enabled=no
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012881fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012882rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12883 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012884fi
12885
12886
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012887fi
12888
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012889{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
12890$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012891if test $ac_cv_posix_semaphores_enabled = no
12892then
12893
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012894$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012895
12896fi
12897
12898# Multiprocessing check for broken sem_getvalue
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
12900$as_echo_n "checking for broken sem_getvalue... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012901if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012902 $as_echo_n "(cached) " >&6
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012903else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012904 if test "$cross_compiling" = yes; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012905 ac_cv_broken_sem_getvalue=yes
12906else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012907 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012908/* end confdefs.h. */
12909
12910#include <unistd.h>
12911#include <fcntl.h>
12912#include <stdio.h>
12913#include <semaphore.h>
12914#include <sys/stat.h>
12915
12916int main(void){
Mark Dickinson59dc89e2009-12-13 21:06:06 +000012917 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012918 int count;
12919 int res;
12920 if(a==SEM_FAILED){
12921 perror("sem_open");
12922 return 1;
12923
12924 }
12925 res = sem_getvalue(a, &count);
12926 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000012927 sem_unlink("/autocftw");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012928 return res==-1 ? 1 : 0;
12929}
12930
12931_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012932if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012933 ac_cv_broken_sem_getvalue=no
12934else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012935 ac_cv_broken_sem_getvalue=yes
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012936fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012937rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12938 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012939fi
12940
12941
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012942fi
12943
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012944{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
12945$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012946if test $ac_cv_broken_sem_getvalue = yes
12947then
12948
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012949$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012950
12951fi
12952
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012953# determine what size digit to use for Python's longs
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
12955$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012956# Check whether --enable-big-digits was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012957if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012958 enableval=$enable_big_digits; case $enable_big_digits in
12959yes)
12960 enable_big_digits=30 ;;
12961no)
12962 enable_big_digits=15 ;;
1296315|30)
12964 ;;
12965*)
Matthias Klose3cef2a92012-03-14 23:39:33 +010012966 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 +000012967esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012968{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
12969$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012970
12971cat >>confdefs.h <<_ACEOF
12972#define PYLONG_BITS_IN_DIGIT $enable_big_digits
12973_ACEOF
12974
12975
12976else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
12978$as_echo "no value specified" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012979fi
12980
12981
Guido van Rossumef2255b2000-03-10 22:30:29 +000012982# check for wchar.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012983ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012984if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012985
12986
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012987$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012988
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012989 wchar_h="yes"
12990
Guido van Rossumef2255b2000-03-10 22:30:29 +000012991else
Martin v. Löwis11437992002-04-12 09:54:03 +000012992 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000012993
12994fi
12995
Michael W. Hudson54241132001-12-07 15:38:26 +000012996
Martin v. Löwis11437992002-04-12 09:54:03 +000012997
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012998# determine wchar_t size
12999if test "$wchar_h" = yes
13000then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013001 # The cast to long int works around a bug in the HP C Compiler
Martin v. Löwiseba40652007-08-30 20:10:57 +000013002# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13003# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13004# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
13006$as_echo_n "checking size of wchar_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013007if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013008 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013009else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013010 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
13011"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013012
Martin v. Löwis11437992002-04-12 09:54:03 +000013013else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013014 if test "$ac_cv_type_wchar_t" = yes; then
13015 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13016$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013017as_fn_error 77 "cannot compute sizeof (wchar_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +010013018See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013019 else
13020 ac_cv_sizeof_wchar_t=0
13021 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013022fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013023
Martin v. Löwis11437992002-04-12 09:54:03 +000013024fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013025{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
13026$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013027
13028
13029
Martin v. Löwis11437992002-04-12 09:54:03 +000013030cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013031#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013032_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013033
Michael W. Hudson54241132001-12-07 15:38:26 +000013034
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013035fi
13036
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
13038$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013039have_ucs4_tcl=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013040cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013041/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013042
13043#include <tcl.h>
13044#if TCL_UTF_MAX != 6
13045# error "NOT UCS4_TCL"
13046#endif
13047int
13048main ()
13049{
13050
13051 ;
13052 return 0;
13053}
13054_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013055if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013056
13057
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013058$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013059
13060 have_ucs4_tcl=yes
13061
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013062fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013063rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013064{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
13065$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013066
Skip Montanaro6dead952003-09-25 14:50:04 +000013067# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013068if test "$wchar_h" = yes
13069then
13070 # check whether wchar_t is signed or not
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013071 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
13072$as_echo_n "checking whether wchar_t is signed... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013073 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013074 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013075else
13076
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013077 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013078 ac_cv_wchar_t_signed=yes
13079else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013080 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013081/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013082
13083 #include <wchar.h>
13084 int main()
13085 {
Martin v. Löwis44fe0e42006-04-11 07:15:30 +000013086 /* Success: exit code 0 */
13087 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013088 }
13089
13090_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013091if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013092 ac_cv_wchar_t_signed=yes
13093else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013094 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013095fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013096rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13097 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013098fi
13099
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013100fi
13101
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
13103$as_echo "$ac_cv_wchar_t_signed" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013104fi
13105
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what type to use for unicode" >&5
13107$as_echo_n "checking what type to use for unicode... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013108# Check whether --enable-unicode was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013109if test "${enable_unicode+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000013110 enableval=$enable_unicode;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013111else
13112 enable_unicode=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +000013113fi
13114
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013115
13116if test $enable_unicode = yes
13117then
Martin v. Löwisfd917792001-06-27 20:22:04 +000013118 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013119 case "$have_ucs4_tcl" in
13120 yes) enable_unicode="ucs4"
13121 ;;
13122 *) enable_unicode="ucs2"
13123 ;;
13124 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013125fi
13126
Martin v. Löwis0036cba2002-04-12 09:58:45 +000013127
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013128case "$enable_unicode" in
13129ucs2) unicode_size="2"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013130 $as_echo "#define Py_UNICODE_SIZE 2" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013131
13132 ;;
13133ucs4) unicode_size="4"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013134 $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013135
13136 ;;
Martin v. Löwised11a5d2012-05-20 10:42:17 +020013137no) ;; # To allow --disable-unicode
Matthias Klose3cef2a92012-03-14 23:39:33 +010013138*) 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 +000013139esac
13140
Michael W. Hudson54241132001-12-07 15:38:26 +000013141
Martin v. Löwis11437992002-04-12 09:54:03 +000013142
13143
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013144if test "$enable_unicode" = "no"
13145then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000013146 UNICODE_OBJS=""
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not used" >&5
13148$as_echo "not used" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013149else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000013150 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000013151
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013152$as_echo "#define Py_USING_UNICODE 1" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013153
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013154
13155 # wchar_t is only usable if it maps to an unsigned type
13156 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000013157 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013158 then
13159 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013160
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013161$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013162
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013163 $as_echo "#define PY_UNICODE_TYPE wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013164
13165 elif test "$ac_cv_sizeof_short" = "$unicode_size"
13166 then
13167 PY_UNICODE_TYPE="unsigned short"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013168 $as_echo "#define PY_UNICODE_TYPE unsigned short" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013169
13170 elif test "$ac_cv_sizeof_long" = "$unicode_size"
13171 then
13172 PY_UNICODE_TYPE="unsigned long"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013173 $as_echo "#define PY_UNICODE_TYPE unsigned long" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013174
13175 else
13176 PY_UNICODE_TYPE="no type found"
13177 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013178 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PY_UNICODE_TYPE" >&5
13179$as_echo "$PY_UNICODE_TYPE" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013180fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000013181
13182# check for endianness
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013183 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13184$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013185if ${ac_cv_c_bigendian+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013186 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000013187else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013188 ac_cv_c_bigendian=unknown
13189 # See if we're dealing with a universal compiler.
13190 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13191/* end confdefs.h. */
13192#ifndef __APPLE_CC__
13193 not a universal capable compiler
13194 #endif
13195 typedef int dummy;
13196
Skip Montanaro6dead952003-09-25 14:50:04 +000013197_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013198if ac_fn_c_try_compile "$LINENO"; then :
13199
13200 # Check for potential -arch flags. It is not universal unless
13201 # there are at least two -arch flags with different values.
13202 ac_arch=
13203 ac_prev=
13204 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13205 if test -n "$ac_prev"; then
13206 case $ac_word in
13207 i?86 | x86_64 | ppc | ppc64)
13208 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13209 ac_arch=$ac_word
13210 else
13211 ac_cv_c_bigendian=universal
13212 break
13213 fi
13214 ;;
13215 esac
13216 ac_prev=
13217 elif test "x$ac_word" = "x-arch"; then
13218 ac_prev=arch
13219 fi
13220 done
13221fi
13222rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13223 if test $ac_cv_c_bigendian = unknown; then
13224 # See if sys/param.h defines the BYTE_ORDER macro.
13225 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013226/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013227#include <sys/types.h>
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013228 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013229
Martin v. Löwis11437992002-04-12 09:54:03 +000013230int
13231main ()
13232{
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013233#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13234 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13235 && LITTLE_ENDIAN)
13236 bogus endian macros
13237 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013238
13239 ;
13240 return 0;
13241}
13242_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013243if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013244 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013245 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013246/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013247#include <sys/types.h>
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013248 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013249
Martin v. Löwis11437992002-04-12 09:54:03 +000013250int
13251main ()
13252{
Guido van Rossumef2255b2000-03-10 22:30:29 +000013253#if BYTE_ORDER != BIG_ENDIAN
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013254 not big endian
13255 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013256
13257 ;
13258 return 0;
13259}
13260_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013261if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013262 ac_cv_c_bigendian=yes
13263else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013264 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000013265fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013266rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013267fi
13268rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13269 fi
13270 if test $ac_cv_c_bigendian = unknown; then
13271 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13272 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013273/* end confdefs.h. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013274#include <limits.h>
13275
Martin v. Löwis11437992002-04-12 09:54:03 +000013276int
13277main ()
13278{
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013279#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13280 bogus endian macros
13281 #endif
13282
Martin v. Löwis11437992002-04-12 09:54:03 +000013283 ;
13284 return 0;
13285}
13286_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013287if ac_fn_c_try_compile "$LINENO"; then :
13288 # It does; now see whether it defined to _BIG_ENDIAN or not.
13289 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13290/* end confdefs.h. */
13291#include <limits.h>
13292
13293int
13294main ()
13295{
13296#ifndef _BIG_ENDIAN
13297 not big endian
13298 #endif
13299
13300 ;
13301 return 0;
13302}
13303_ACEOF
13304if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013305 ac_cv_c_bigendian=yes
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000013306else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013307 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013308fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013309rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13310fi
13311rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13312 fi
13313 if test $ac_cv_c_bigendian = unknown; then
13314 # Compile a test program.
13315 if test "$cross_compiling" = yes; then :
13316 # Try to guess by grepping values from an object file.
13317 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13318/* end confdefs.h. */
13319short int ascii_mm[] =
13320 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13321 short int ascii_ii[] =
13322 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13323 int use_ascii (int i) {
13324 return ascii_mm[i] + ascii_ii[i];
13325 }
13326 short int ebcdic_ii[] =
13327 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13328 short int ebcdic_mm[] =
13329 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13330 int use_ebcdic (int i) {
13331 return ebcdic_mm[i] + ebcdic_ii[i];
13332 }
13333 extern int foo;
Martin v. Löwiseba40652007-08-30 20:10:57 +000013334
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013335int
13336main ()
13337{
13338return use_ascii (foo) == use_ebcdic (foo);
13339 ;
13340 return 0;
13341}
13342_ACEOF
13343if ac_fn_c_try_compile "$LINENO"; then :
13344 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
13345 ac_cv_c_bigendian=yes
13346 fi
13347 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
13348 if test "$ac_cv_c_bigendian" = unknown; then
13349 ac_cv_c_bigendian=no
13350 else
13351 # finding both strings is unlikely to happen, but who knows?
13352 ac_cv_c_bigendian=unknown
13353 fi
13354 fi
13355fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013356rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013357else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013358 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013359/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000013360$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013361int
13362main ()
13363{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013364
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013365 /* Are we little or big endian? From Harbison&Steele. */
13366 union
13367 {
13368 long int l;
13369 char c[sizeof (long int)];
13370 } u;
13371 u.l = 1;
13372 return u.c[sizeof (long int) - 1] == 1;
Martin v. Löwiseba40652007-08-30 20:10:57 +000013373
13374 ;
13375 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000013376}
Martin v. Löwis11437992002-04-12 09:54:03 +000013377_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013378if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013379 ac_cv_c_bigendian=no
13380else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013381 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000013382fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013383rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13384 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000013385fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013386
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013387 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013388fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013389{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
13390$as_echo "$ac_cv_c_bigendian" >&6; }
13391 case $ac_cv_c_bigendian in #(
13392 yes)
13393 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
13394;; #(
13395 no)
13396 ;; #(
13397 universal)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013398
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013399$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000013400
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013401 ;; #(
13402 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013403 as_fn_error $? "unknown endianness
Matthias Klose3cef2a92012-03-14 23:39:33 +010013404 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013405 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000013406
Michael W. Hudson54241132001-12-07 15:38:26 +000013407
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013408# Check whether right shifting a negative integer extends the sign bit
13409# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
13411$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013412if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013413 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000013414else
Martin v. Löwis11437992002-04-12 09:54:03 +000013415
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013416if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013417 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013418else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013419 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013420/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013421
13422int main()
13423{
Vladimir Marangozova6180282000-07-12 05:05:06 +000013424 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013425}
13426
Martin v. Löwis11437992002-04-12 09:54:03 +000013427_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013428if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000013429 ac_cv_rshift_extends_sign=yes
13430else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013431 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000013432fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013433rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13434 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000013435fi
13436
Martin v. Löwiseba40652007-08-30 20:10:57 +000013437fi
13438
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013439{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
13440$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000013441if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013442then
Martin v. Löwis11437992002-04-12 09:54:03 +000013443
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013444$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013445
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013446fi
13447
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013448# check for getc_unlocked and related locking functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
13450$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013451if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013452 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013453else
Martin v. Löwis11437992002-04-12 09:54:03 +000013454
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013455cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013456/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013457#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013458int
13459main ()
13460{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013461
13462 FILE *f = fopen("/dev/null", "r");
13463 flockfile(f);
13464 getc_unlocked(f);
13465 funlockfile(f);
13466
Martin v. Löwis11437992002-04-12 09:54:03 +000013467 ;
13468 return 0;
13469}
13470_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013471if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013472 ac_cv_have_getc_unlocked=yes
13473else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013474 ac_cv_have_getc_unlocked=no
13475fi
13476rm -f core conftest.err conftest.$ac_objext \
13477 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013478fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013479
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013480{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
13481$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013482if test "$ac_cv_have_getc_unlocked" = yes
13483then
Martin v. Löwis11437992002-04-12 09:54:03 +000013484
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013485$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013486
13487fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013488
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013489# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000013490# save the value of LIBS so we don't actually link Python with readline
13491LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013492
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013493# On some systems we need to link readline to a termcap compatible
13494# library. NOTE: Keep the precedence of listed libraries synchronised
13495# with setup.py.
13496py_cv_lib_readline=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
13498$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013499for py_libtermcap in "" ncursesw ncurses curses termcap; do
13500 if test -z "$py_libtermcap"; then
13501 READLINE_LIBS="-lreadline"
13502 else
13503 READLINE_LIBS="-lreadline -l$py_libtermcap"
13504 fi
13505 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013506 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013507/* end confdefs.h. */
13508
Martin v. Löwiseba40652007-08-30 20:10:57 +000013509/* Override any GCC internal prototype to avoid an error.
13510 Use char because int might match the return type of a GCC
13511 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013512#ifdef __cplusplus
13513extern "C"
13514#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013515char readline ();
13516int
13517main ()
13518{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013519return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013520 ;
13521 return 0;
13522}
13523_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013524if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013525 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013526fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013527rm -f core conftest.err conftest.$ac_objext \
13528 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013529 if test $py_cv_lib_readline = yes; then
13530 break
13531 fi
13532done
13533# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
13534#AC_SUBST([READLINE_LIBS])
Gregory P. Smithe080cdf2008-09-07 19:19:04 +000013535if test $py_cv_lib_readline = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
13537$as_echo "none" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013538else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013539 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
13540$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013541
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013542$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013543
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013544fi
13545
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013546# check for readline 2.1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
13548$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013549if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013550 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013551else
13552 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013553LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013554cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013555/* end confdefs.h. */
13556
Martin v. Löwiseba40652007-08-30 20:10:57 +000013557/* Override any GCC internal prototype to avoid an error.
13558 Use char because int might match the return type of a GCC
13559 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013560#ifdef __cplusplus
13561extern "C"
13562#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013563char rl_callback_handler_install ();
13564int
13565main ()
13566{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013567return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013568 ;
13569 return 0;
13570}
13571_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013572if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013573 ac_cv_lib_readline_rl_callback_handler_install=yes
13574else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013575 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013576fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013577rm -f core conftest.err conftest.$ac_objext \
13578 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013579LIBS=$ac_check_lib_save_LIBS
13580fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013581{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
13582$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013583if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013584
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013585$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013586
13587fi
13588
13589
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013590# check for readline 2.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013591cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013592/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013593#include <readline/readline.h>
13594_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013595if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013596 have_readline=yes
13597else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013598 have_readline=no
Matthias Klosec511b472010-05-08 11:01:39 +000013599
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013600fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013601rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013602if test $have_readline = yes
13603then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013604 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013605/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013606#include <readline/readline.h>
13607
13608_ACEOF
13609if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013610 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013611
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013612$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013613
13614fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000013615rm -f conftest*
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000013616
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013617 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000013618/* end confdefs.h. */
13619#include <readline/readline.h>
13620
13621_ACEOF
13622if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013623 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000013624
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013625$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000013626
13627fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000013628rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013629
13630fi
13631
Martin v. Löwis0daad592001-09-30 21:09:59 +000013632# check for readline 4.0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
13634$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013635if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013636 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000013637else
Martin v. Löwis11437992002-04-12 09:54:03 +000013638 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013639LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013640cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013641/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013642
Martin v. Löwiseba40652007-08-30 20:10:57 +000013643/* Override any GCC internal prototype to avoid an error.
13644 Use char because int might match the return type of a GCC
13645 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013646#ifdef __cplusplus
13647extern "C"
13648#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013649char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013650int
13651main ()
13652{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013653return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013654 ;
13655 return 0;
13656}
13657_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013658if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013659 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000013660else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013661 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000013662fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013663rm -f core conftest.err conftest.$ac_objext \
13664 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013665LIBS=$ac_check_lib_save_LIBS
13666fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013667{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
13668$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013669if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013670
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013671$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000013672
Martin v. Löwis0daad592001-09-30 21:09:59 +000013673fi
13674
Michael W. Hudson54241132001-12-07 15:38:26 +000013675
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013676# also in 4.0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
13678$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013679if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013680 $as_echo_n "(cached) " >&6
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013681else
13682 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013683LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013684cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013685/* end confdefs.h. */
13686
13687/* Override any GCC internal prototype to avoid an error.
13688 Use char because int might match the return type of a GCC
13689 builtin and then its argument prototype would still apply. */
13690#ifdef __cplusplus
13691extern "C"
13692#endif
13693char rl_completion_display_matches_hook ();
13694int
13695main ()
13696{
13697return rl_completion_display_matches_hook ();
13698 ;
13699 return 0;
13700}
13701_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013702if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013703 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
13704else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013705 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013706fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013707rm -f core conftest.err conftest.$ac_objext \
13708 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013709LIBS=$ac_check_lib_save_LIBS
13710fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013711{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
13712$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013713if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013714
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013715$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013716
13717fi
13718
13719
Martin v. Löwis0daad592001-09-30 21:09:59 +000013720# check for readline 4.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
13722$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013723if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013724 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000013725else
Martin v. Löwis11437992002-04-12 09:54:03 +000013726 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013727LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013728cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013729/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013730
Martin v. Löwiseba40652007-08-30 20:10:57 +000013731/* Override any GCC internal prototype to avoid an error.
13732 Use char because int might match the return type of a GCC
13733 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013734#ifdef __cplusplus
13735extern "C"
13736#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013737char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013738int
13739main ()
13740{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013741return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013742 ;
13743 return 0;
13744}
13745_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013746if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013747 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000013748else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013749 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000013750fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013751rm -f core conftest.err conftest.$ac_objext \
13752 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013753LIBS=$ac_check_lib_save_LIBS
13754fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013755{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
13756$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013757if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013758
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013759$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000013760
Guido van Rossum353ae582001-07-10 16:45:32 +000013761fi
13762
Jack Jansendd19cf82001-12-06 22:36:17 +000013763
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013764# also in readline 4.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013765cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013766/* end confdefs.h. */
13767#include <readline/readline.h>
13768_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013769if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013770 have_readline=yes
13771else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013772 have_readline=no
Matthias Klosec511b472010-05-08 11:01:39 +000013773
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013774fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013775rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013776if test $have_readline = yes
13777then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013778 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013779/* end confdefs.h. */
13780#include <readline/readline.h>
13781
13782_ACEOF
13783if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013784 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013785
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013786$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013787
13788fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000013789rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013790
13791fi
13792
Martin v. Löwis82bca632006-02-10 20:49:30 +000013793# End of readline checks: restore LIBS
13794LIBS=$LIBS_no_readline
13795
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
13797$as_echo_n "checking for broken nice()... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013798if ${ac_cv_broken_nice+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013799 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013800else
Martin v. Löwis11437992002-04-12 09:54:03 +000013801
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013802if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013803 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013804else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013805 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013806/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013807
13808int main()
13809{
13810 int val1 = nice(1);
13811 if (val1 != -1 && val1 == nice(2))
13812 exit(0);
13813 exit(1);
13814}
13815
Martin v. Löwis11437992002-04-12 09:54:03 +000013816_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013817if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013818 ac_cv_broken_nice=yes
13819else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013820 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013821fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013822rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13823 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013824fi
13825
Martin v. Löwiseba40652007-08-30 20:10:57 +000013826fi
13827
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013828{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
13829$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013830if test "$ac_cv_broken_nice" = yes
13831then
Martin v. Löwis11437992002-04-12 09:54:03 +000013832
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013833$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013834
13835fi
13836
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
13838$as_echo_n "checking for broken poll()... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013839if ${ac_cv_broken_poll+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013840 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013841else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013842 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013843 ac_cv_broken_poll=no
13844else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013845 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013846/* end confdefs.h. */
13847
13848#include <poll.h>
13849
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013850int main()
13851{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013852 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013853 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013854
13855 close (42);
13856
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013857 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013858 if (poll_test < 0)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013859 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013860 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013861 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013862 else
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013863 return 1;
13864}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013865
13866_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013867if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013868 ac_cv_broken_poll=yes
13869else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013870 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013871fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013872rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13873 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013874fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013875
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013876fi
13877
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013878{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
13879$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013880if test "$ac_cv_broken_poll" = yes
13881then
13882
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013883$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013884
13885fi
13886
Brett Cannon43802422005-02-10 20:48:03 +000013887# 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 +000013888# (which is not required by ISO C or UNIX spec) and/or if we support
13889# tzname[]
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013890ac_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 +000013891#include <$ac_cv_struct_tm>
13892
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013893"
Matthias Klose3cef2a92012-03-14 23:39:33 +010013894if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000013895
13896cat >>confdefs.h <<_ACEOF
13897#define HAVE_STRUCT_TM_TM_ZONE 1
13898_ACEOF
13899
13900
13901fi
13902
13903if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13904
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013905$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013906
13907else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013908 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13909"
Matthias Klose3cef2a92012-03-14 23:39:33 +010013910if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013911 ac_have_decl=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000013912else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013913 ac_have_decl=0
Martin v. Löwiseba40652007-08-30 20:10:57 +000013914fi
13915
Martin v. Löwiseba40652007-08-30 20:10:57 +000013916cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013917#define HAVE_DECL_TZNAME $ac_have_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +000013918_ACEOF
13919
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013920 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13921$as_echo_n "checking for tzname... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013922if ${ac_cv_var_tzname+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013923 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000013924else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013925 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013926/* end confdefs.h. */
13927#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000013928#if !HAVE_DECL_TZNAME
13929extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000013930#endif
13931
13932int
13933main ()
13934{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013935return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000013936 ;
13937 return 0;
13938}
13939_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013940if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000013941 ac_cv_var_tzname=yes
13942else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013943 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000013944fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013945rm -f core conftest.err conftest.$ac_objext \
13946 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013947fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013948{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13949$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000013950 if test $ac_cv_var_tzname = yes; then
13951
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013952$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013953
13954 fi
13955fi
13956
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013957
Martin v. Löwis1d459062005-03-14 21:23:33 +000013958# check tzset(3) exists and works like we expect it to
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013959{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
13960$as_echo_n "checking for working tzset()... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013961if ${ac_cv_working_tzset+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013962 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013963else
13964
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013965if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013966 ac_cv_working_tzset=no
13967else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013968 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013969/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013970
13971#include <stdlib.h>
13972#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000013973#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000013974
13975#if HAVE_TZNAME
13976extern char *tzname[];
13977#endif
13978
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013979int main()
13980{
Brett Cannon18367812003-09-19 00:59:16 +000013981 /* Note that we need to ensure that not only does tzset(3)
13982 do 'something' with localtime, but it works as documented
13983 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000013984 This includes making sure that tzname is set properly if
13985 tm->tm_zone does not exist since it is the alternative way
13986 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000013987
13988 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000013989 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000013990 */
13991
Martin v. Löwis1d459062005-03-14 21:23:33 +000013992 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000013993 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
13994
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013995 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013996 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013997 if (localtime(&groundhogday)->tm_hour != 0)
13998 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013999#if HAVE_TZNAME
14000 /* For UTC, tzname[1] is sometimes "", sometimes " " */
14001 if (strcmp(tzname[0], "UTC") ||
14002 (tzname[1][0] != 0 && tzname[1][0] != ' '))
14003 exit(1);
14004#endif
Brett Cannon18367812003-09-19 00:59:16 +000014005
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014006 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014007 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014008 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014009 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014010#if HAVE_TZNAME
14011 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
14012 exit(1);
14013#endif
Brett Cannon18367812003-09-19 00:59:16 +000014014
14015 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
14016 tzset();
14017 if (localtime(&groundhogday)->tm_hour != 11)
14018 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014019#if HAVE_TZNAME
14020 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
14021 exit(1);
14022#endif
14023
14024#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000014025 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
14026 exit(1);
14027 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
14028 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014029#endif
Brett Cannon18367812003-09-19 00:59:16 +000014030
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014031 exit(0);
14032}
14033
14034_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014035if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014036 ac_cv_working_tzset=yes
14037else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014038 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014039fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014040rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14041 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014042fi
14043
Martin v. Löwiseba40652007-08-30 20:10:57 +000014044fi
14045
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014046{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
14047$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014048if test "$ac_cv_working_tzset" = yes
14049then
14050
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014051$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014052
14053fi
14054
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014055# Look for subsecond timestamps in struct stat
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
14057$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014058if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014059 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014060else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014061 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014062/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014063#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014064int
14065main ()
14066{
14067
14068struct stat st;
14069st.st_mtim.tv_nsec = 1;
14070
14071 ;
14072 return 0;
14073}
14074_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014075if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000014076 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014077else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014078 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014079fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014080rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14081fi
14082
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014083{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
14084$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014085if test "$ac_cv_stat_tv_nsec" = yes
14086then
14087
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014088$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014089
14090fi
14091
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014092# Look for BSD style subsecond timestamps in struct stat
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
14094$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014095if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014096 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014097else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014098 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014099/* end confdefs.h. */
14100#include <sys/stat.h>
14101int
14102main ()
14103{
14104
14105struct stat st;
14106st.st_mtimespec.tv_nsec = 1;
14107
14108 ;
14109 return 0;
14110}
14111_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014112if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014113 ac_cv_stat_tv_nsec2=yes
14114else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014115 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014116fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014117rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14118fi
14119
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014120{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
14121$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014122if test "$ac_cv_stat_tv_nsec2" = yes
14123then
14124
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014125$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014126
14127fi
14128
doko@ubuntu.comf27ec3e2014-04-17 20:11:19 +020014129# first curses configure check
14130ac_save_cppflags="$CPPFLAGS"
14131CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
14132
14133for ac_header in curses.h ncurses.h
14134do :
14135 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14136ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
14137if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
14138 cat >>confdefs.h <<_ACEOF
14139#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14140_ACEOF
14141
14142fi
14143
14144done
14145
14146
14147# On Solaris, term.h requires curses.h
14148for ac_header in term.h
14149do :
14150 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
14151#ifdef HAVE_CURSES_H
14152#include <curses.h>
14153#endif
14154
14155"
14156if test "x$ac_cv_header_term_h" = xyes; then :
14157 cat >>confdefs.h <<_ACEOF
14158#define HAVE_TERM_H 1
14159_ACEOF
14160
14161fi
14162
14163done
14164
14165
Jack Jansen666b1e72001-10-31 12:11:48 +000014166# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
14168$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014169if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014170 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014171else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014172 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014173/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014174#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014175int
14176main ()
14177{
Jack Jansen666b1e72001-10-31 12:11:48 +000014178
14179 int rtn;
14180 rtn = mvwdelch(0,0,0);
14181
Martin v. Löwis11437992002-04-12 09:54:03 +000014182 ;
14183 return 0;
14184}
14185_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014186if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014187 ac_cv_mvwdelch_is_expression=yes
14188else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014189 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014190fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014191rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14192fi
14193
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014194{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
14195$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000014196
14197if test "$ac_cv_mvwdelch_is_expression" = yes
14198then
Martin v. Löwis11437992002-04-12 09:54:03 +000014199
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014200$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014201
14202fi
14203
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
14205$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014206if ${ac_cv_window_has_flags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014207 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014208else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014209 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014210/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014211#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014212int
14213main ()
14214{
Jack Jansen666b1e72001-10-31 12:11:48 +000014215
14216 WINDOW *w;
14217 w->_flags = 0;
14218
Martin v. Löwis11437992002-04-12 09:54:03 +000014219 ;
14220 return 0;
14221}
14222_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014223if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014224 ac_cv_window_has_flags=yes
14225else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014226 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014227fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014228rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14229fi
14230
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014231{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
14232$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000014233
Jack Jansen666b1e72001-10-31 12:11:48 +000014234
14235if test "$ac_cv_window_has_flags" = yes
14236then
Martin v. Löwis11437992002-04-12 09:54:03 +000014237
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014238$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014239
14240fi
14241
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
14243$as_echo_n "checking for is_term_resized... " >&6; }
14244cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000014245/* end confdefs.h. */
14246#include <curses.h>
14247int
14248main ()
14249{
14250void *x=is_term_resized
14251 ;
14252 return 0;
14253}
14254_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014255if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000014256
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014257$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000014258
Matthias Klosec511b472010-05-08 11:01:39 +000014259 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014260$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014261else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014262 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14263$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014264
14265fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014266rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14267
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
14269$as_echo_n "checking for resize_term... " >&6; }
14270cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000014271/* end confdefs.h. */
14272#include <curses.h>
14273int
14274main ()
14275{
14276void *x=resize_term
14277 ;
14278 return 0;
14279}
14280_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014281if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000014282
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014283$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000014284
Matthias Klosec511b472010-05-08 11:01:39 +000014285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014286$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014287else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014288 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14289$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014290
14291fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014292rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14293
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
14295$as_echo_n "checking for resizeterm... " >&6; }
14296cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000014297/* end confdefs.h. */
14298#include <curses.h>
14299int
14300main ()
14301{
14302void *x=resizeterm
14303 ;
14304 return 0;
14305}
14306_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014307if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000014308
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014309$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000014310
Matthias Klosec511b472010-05-08 11:01:39 +000014311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014312$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014313else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14315$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014316
14317fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014318rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.comf27ec3e2014-04-17 20:11:19 +020014319# last curses configure check
14320CPPFLAGS=$ac_save_cppflags
Martin v. Löwiseba40652007-08-30 20:10:57 +000014321
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
14323$as_echo "$as_me: checking for device files" >&6;}
14324
14325if test "x$cross_compiling" = xyes; then
14326 if test "${ac_cv_file__dev_ptmx+set}" != set; then
14327 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14328$as_echo_n "checking for /dev/ptmx... " >&6; }
14329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14330$as_echo "not set" >&6; }
14331 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14332 fi
14333 if test "${ac_cv_file__dev_ptc+set}" != set; then
14334 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14335$as_echo_n "checking for /dev/ptc... " >&6; }
14336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14337$as_echo "not set" >&6; }
14338 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14339 fi
14340fi
14341
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14343$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014344if ${ac_cv_file__dev_ptmx+:} false; then :
14345 $as_echo_n "(cached) " >&6
14346else
14347 test "$cross_compiling" = yes &&
14348 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14349if test -r "/dev/ptmx"; then
14350 ac_cv_file__dev_ptmx=yes
14351else
14352 ac_cv_file__dev_ptmx=no
14353fi
14354fi
14355{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
14356$as_echo "$ac_cv_file__dev_ptmx" >&6; }
14357if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Martin v. Löwisfefbc202006-10-17 18:59:23 +000014358
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014359fi
14360
14361if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014362
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014363$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014364
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014365fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14367$as_echo_n "checking for /dev/ptc... " >&6; }
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014368if ${ac_cv_file__dev_ptc+:} false; then :
14369 $as_echo_n "(cached) " >&6
14370else
14371 test "$cross_compiling" = yes &&
14372 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14373if test -r "/dev/ptc"; then
14374 ac_cv_file__dev_ptc=yes
14375else
14376 ac_cv_file__dev_ptc=no
14377fi
14378fi
14379{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
14380$as_echo "$ac_cv_file__dev_ptc" >&6; }
14381if test "x$ac_cv_file__dev_ptc" = xyes; then :
Martin v. Löwisfefbc202006-10-17 18:59:23 +000014382
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014383fi
14384
14385if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000014386
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014387$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000014388
Neal Norwitz865400f2003-03-21 01:42:58 +000014389fi
14390
Mark Dickinson82864d12009-11-15 16:18:58 +000014391if test "$have_long_long" = yes
14392then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014393 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
14394$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014395 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014396 $as_echo_n "(cached) " >&6
Mark Dickinson82864d12009-11-15 16:18:58 +000014397else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014398 if test "$cross_compiling" = yes; then :
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014399 ac_cv_have_long_long_format="cross -- assuming no"
14400 if test x$GCC = xyes; then
14401 save_CFLAGS=$CFLAGS
14402 CFLAGS="$CFLAGS -Werror -Wformat"
14403 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14404/* end confdefs.h. */
14405
14406 #include <stdio.h>
14407 #include <stddef.h>
14408
14409int
14410main ()
14411{
14412
14413 char *buffer;
14414 sprintf(buffer, "%lld", (long long)123);
14415 sprintf(buffer, "%lld", (long long)-123);
14416 sprintf(buffer, "%llu", (unsigned long long)123);
14417
14418 ;
14419 return 0;
14420}
14421_ACEOF
14422if ac_fn_c_try_compile "$LINENO"; then :
14423 ac_cv_have_long_long_format=yes
14424
14425fi
14426rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14427 CFLAGS=$save_CFLAGS
14428 fi
Mark Dickinson82864d12009-11-15 16:18:58 +000014429else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014430 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson82864d12009-11-15 16:18:58 +000014431/* end confdefs.h. */
14432
14433 #include <stdio.h>
14434 #include <stddef.h>
14435 #include <string.h>
14436
14437 #ifdef HAVE_SYS_TYPES_H
14438 #include <sys/types.h>
14439 #endif
14440
14441 int main()
14442 {
14443 char buffer[256];
14444
14445 if (sprintf(buffer, "%lld", (long long)123) < 0)
14446 return 1;
14447 if (strcmp(buffer, "123"))
14448 return 1;
14449
14450 if (sprintf(buffer, "%lld", (long long)-123) < 0)
14451 return 1;
14452 if (strcmp(buffer, "-123"))
14453 return 1;
14454
14455 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
14456 return 1;
14457 if (strcmp(buffer, "123"))
14458 return 1;
14459
14460 return 0;
14461 }
14462
14463_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014464if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson82864d12009-11-15 16:18:58 +000014465 ac_cv_have_long_long_format=yes
14466else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014467 ac_cv_have_long_long_format=no
Mark Dickinson82864d12009-11-15 16:18:58 +000014468fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014469rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14470 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson82864d12009-11-15 16:18:58 +000014471fi
14472
14473
Mark Dickinson82864d12009-11-15 16:18:58 +000014474fi
14475
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
14477$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson82864d12009-11-15 16:18:58 +000014478fi
14479
Mark Dickinson5ce84742009-12-31 20:48:04 +000014480if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson82864d12009-11-15 16:18:58 +000014481then
14482
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014483$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson82864d12009-11-15 16:18:58 +000014484
14485fi
14486
Ronald Oussoren315cd0c2009-11-19 16:25:21 +000014487if test $ac_sys_system = Darwin
14488then
14489 LIBS="$LIBS -framework CoreFoundation"
14490fi
14491
Mark Dickinson82864d12009-11-15 16:18:58 +000014492
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
14494$as_echo_n "checking for %zd printf() format support... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014495if ${ac_cv_have_size_t_format+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014496 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014497else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014498 if test "$cross_compiling" = yes; then :
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000014499 ac_cv_have_size_t_format="cross -- assuming yes"
14500
Brett Cannon09d12362006-05-11 05:11:33 +000014501else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014502 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon09d12362006-05-11 05:11:33 +000014503/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014504
Brett Cannon09d12362006-05-11 05:11:33 +000014505#include <stdio.h>
14506#include <stddef.h>
14507#include <string.h>
14508
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000014509#ifdef HAVE_SYS_TYPES_H
14510#include <sys/types.h>
14511#endif
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000014512
14513#ifdef HAVE_SSIZE_T
14514typedef ssize_t Py_ssize_t;
14515#elif SIZEOF_VOID_P == SIZEOF_LONG
14516typedef long Py_ssize_t;
14517#else
14518typedef int Py_ssize_t;
14519#endif
Brett Cannon09d12362006-05-11 05:11:33 +000014520
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000014521int main()
14522{
14523 char buffer[256];
14524
Brett Cannon09d12362006-05-11 05:11:33 +000014525 if(sprintf(buffer, "%zd", (size_t)123) < 0)
14526 return 1;
14527
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000014528 if (strcmp(buffer, "123"))
14529 return 1;
14530
14531 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
14532 return 1;
14533
14534 if (strcmp(buffer, "-123"))
Brett Cannon09d12362006-05-11 05:11:33 +000014535 return 1;
14536
14537 return 0;
14538}
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014539
Brett Cannon09d12362006-05-11 05:11:33 +000014540_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014541if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014542 ac_cv_have_size_t_format=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014543else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014544 ac_cv_have_size_t_format=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014545fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014546rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14547 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000014548fi
14549
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014550fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014551{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
14552$as_echo "$ac_cv_have_size_t_format" >&6; }
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000014553if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014554
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014555$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014556
14557fi
14558
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014559ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000014560#ifdef HAVE_SYS_TYPES_H
14561#include <sys/types.h>
14562#endif
14563#ifdef HAVE_SYS_SOCKET_H
14564#include <sys/socket.h>
14565#endif
14566
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014567"
Matthias Klose3cef2a92012-03-14 23:39:33 +010014568if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000014569
Martin v. Löwis11437992002-04-12 09:54:03 +000014570else
Guido van Rossum95713eb2000-05-18 20:53:31 +000014571
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014572$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000014573
14574fi
14575
Michael W. Hudson54241132001-12-07 15:38:26 +000014576
Benjamin Peterson7497e912010-10-16 00:53:39 +000014577case $ac_sys_system in
14578AIX*)
14579
14580$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
14581 ;;
14582esac
14583
14584
Michael W. Hudson54241132001-12-07 15:38:26 +000014585
14586
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000014587for h in `(cd $srcdir;echo Python/thread_*.h)`
14588do
14589 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
14590done
14591
Michael W. Hudson54241132001-12-07 15:38:26 +000014592
Neal Norwitzd24499d2005-12-18 21:36:39 +000014593SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
14595$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014596for dir in $SRCDIRS; do
14597 if test ! -d $dir; then
14598 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000014599 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014600done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014601{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
14602$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000014603
Guido van Rossum627b2d71993-12-24 10:39:16 +000014604# generate output files
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000014605ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000014606
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000014607ac_config_files="$ac_config_files Modules/ld_so_aix"
14608
Martin v. Löwis11437992002-04-12 09:54:03 +000014609cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014610# This file is a shell script that caches the results of configure
14611# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000014612# scripts and configure runs, see configure's option --config-cache.
14613# It is not useful on other systems. If it contains results you don't
14614# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014615#
Martin v. Löwis11437992002-04-12 09:54:03 +000014616# config.status only pays attention to the cache file if you give it
14617# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014618#
Skip Montanaro6dead952003-09-25 14:50:04 +000014619# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000014620# loading this file, other *unset* `ac_cv_foo' will be assigned the
14621# following values.
14622
14623_ACEOF
14624
Guido van Rossumf78abae1997-01-21 22:02:36 +000014625# The following way of writing the cache mishandles newlines in values,
14626# but we know of no workaround that is simple, portable, and efficient.
Martin v. Löwiseba40652007-08-30 20:10:57 +000014627# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014628# Ultrix sh set writes to stderr and can't be redirected directly,
14629# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwiseba40652007-08-30 20:10:57 +000014630(
14631 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
14632 eval ac_val=\$$ac_var
14633 case $ac_val in #(
14634 *${as_nl}*)
14635 case $ac_var in #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014636 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
14637$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014638 esac
14639 case $ac_var in #(
14640 _ | IFS | as_nl) ;; #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014641 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
14642 *) { eval $ac_var=; unset $ac_var;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014643 esac ;;
14644 esac
14645 done
14646
Martin v. Löwis11437992002-04-12 09:54:03 +000014647 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +000014648 case $as_nl`(ac_space=' '; set) 2>&1` in #(
14649 *${as_nl}ac_space=\ *)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014650 # `set' does not quote correctly, so add quotes: double-quote
14651 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000014652 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014653 "s/'/'\\\\''/g;
14654 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Martin v. Löwiseba40652007-08-30 20:10:57 +000014655 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000014656 *)
14657 # `set' quotes correctly as required by POSIX, so do not add quotes.
Martin v. Löwiseba40652007-08-30 20:10:57 +000014658 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000014659 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014660 esac |
14661 sort
14662) |
Martin v. Löwis11437992002-04-12 09:54:03 +000014663 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000014664 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000014665 t clear
Martin v. Löwiseba40652007-08-30 20:10:57 +000014666 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000014667 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
14668 t end
Martin v. Löwiseba40652007-08-30 20:10:57 +000014669 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
14670 :end' >>confcache
14671if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
14672 if test -w "$cache_file"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +010014673 if test "x$cache_file" != "x/dev/null"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014674 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
14675$as_echo "$as_me: updating cache $cache_file" >&6;}
Matthias Klose3cef2a92012-03-14 23:39:33 +010014676 if test ! -f "$cache_file" || test -h "$cache_file"; then
14677 cat confcache >"$cache_file"
14678 else
14679 case $cache_file in #(
14680 */* | ?:*)
14681 mv -f confcache "$cache_file"$$ &&
14682 mv -f "$cache_file"$$ "$cache_file" ;; #(
14683 *)
14684 mv -f confcache "$cache_file" ;;
14685 esac
14686 fi
14687 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014688 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014689 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
14690$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014691 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014692fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014693rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000014694
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014695test "x$prefix" = xNONE && prefix=$ac_default_prefix
14696# Let make expand exec_prefix.
14697test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000014698
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014699DEFS=-DHAVE_CONFIG_H
14700
Skip Montanaro6dead952003-09-25 14:50:04 +000014701ac_libobjs=
14702ac_ltlibobjs=
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014703U=
Skip Montanaro6dead952003-09-25 14:50:04 +000014704for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
14705 # 1. Remove the extension, and $U if already installed.
Martin v. Löwiseba40652007-08-30 20:10:57 +000014706 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014707 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Martin v. Löwiseba40652007-08-30 20:10:57 +000014708 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
14709 # will be set to the directory where LIBOBJS objects are built.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014710 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
14711 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000014712done
14713LIBOBJS=$ac_libobjs
14714
14715LTLIBOBJS=$ac_ltlibobjs
14716
14717
Martin v. Löwis11437992002-04-12 09:54:03 +000014718
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014719
Matthias Klose3cef2a92012-03-14 23:39:33 +010014720: "${CONFIG_STATUS=./config.status}"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014721ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000014722ac_clean_files_save=$ac_clean_files
14723ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014724{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
14725$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
14726as_write_fail=0
14727cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014728#! $SHELL
14729# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000014730# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014731# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000014732# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000014733
Martin v. Löwis11437992002-04-12 09:54:03 +000014734debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000014735ac_cs_recheck=false
14736ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000014737
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014738SHELL=\${CONFIG_SHELL-$SHELL}
14739export SHELL
14740_ASEOF
14741cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
14742## -------------------- ##
14743## M4sh Initialization. ##
14744## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000014745
Martin v. Löwiseba40652007-08-30 20:10:57 +000014746# Be more Bourne compatible
14747DUALCASE=1; export DUALCASE # for MKS sh
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014748if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014749 emulate sh
14750 NULLCMD=:
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014751 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000014752 # is contrary to our usage. Disable this feature.
14753 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000014754 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000014755else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014756 case `(set -o) 2>/dev/null` in #(
14757 *posix*) :
14758 set -o posix ;; #(
14759 *) :
14760 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014761esac
Martin v. Löwis11437992002-04-12 09:54:03 +000014762fi
Michael W. Hudson54241132001-12-07 15:38:26 +000014763
Skip Montanaro6dead952003-09-25 14:50:04 +000014764
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014765as_nl='
14766'
14767export as_nl
14768# Printing a long string crashes Solaris 7 /usr/bin/printf.
14769as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
14770as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
14771as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
14772# Prefer a ksh shell builtin over an external printf program on Solaris,
14773# but without wasting forks for bash or zsh.
14774if test -z "$BASH_VERSION$ZSH_VERSION" \
14775 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
14776 as_echo='print -r --'
14777 as_echo_n='print -rn --'
14778elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
14779 as_echo='printf %s\n'
14780 as_echo_n='printf %s'
14781else
14782 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
14783 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
14784 as_echo_n='/usr/ucb/echo -n'
14785 else
14786 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
14787 as_echo_n_body='eval
14788 arg=$1;
14789 case $arg in #(
14790 *"$as_nl"*)
14791 expr "X$arg" : "X\\(.*\\)$as_nl";
14792 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
14793 esac;
14794 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
14795 '
14796 export as_echo_n_body
14797 as_echo_n='sh -c $as_echo_n_body as_echo'
14798 fi
14799 export as_echo_body
14800 as_echo='sh -c $as_echo_body as_echo'
14801fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014802
14803# The user is always right.
14804if test "${PATH_SEPARATOR+set}" != set; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014805 PATH_SEPARATOR=:
14806 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
14807 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
14808 PATH_SEPARATOR=';'
14809 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000014810fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014811
Martin v. Löwiseba40652007-08-30 20:10:57 +000014812
14813# IFS
14814# We need space, tab and new line, in precisely that order. Quoting is
14815# there to prevent editors from complaining about space-tab.
14816# (If _AS_PATH_WALK were called with IFS unset, it would disable word
14817# splitting by setting IFS to empty value.)
Martin v. Löwiseba40652007-08-30 20:10:57 +000014818IFS=" "" $as_nl"
14819
14820# Find who we are. Look in the path if we contain no directory separator.
Matthias Klose3cef2a92012-03-14 23:39:33 +010014821as_myself=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014822case $0 in #((
Martin v. Löwiseba40652007-08-30 20:10:57 +000014823 *[\\/]* ) as_myself=$0 ;;
14824 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000014825for as_dir in $PATH
14826do
14827 IFS=$as_save_IFS
14828 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014829 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
14830 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000014831IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000014832
Martin v. Löwiseba40652007-08-30 20:10:57 +000014833 ;;
14834esac
14835# We did not find ourselves, most probably we were run as `sh COMMAND'
14836# in which case we are not to be found in the path.
14837if test "x$as_myself" = x; then
14838 as_myself=$0
14839fi
14840if test ! -f "$as_myself"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014841 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
14842 exit 1
Martin v. Löwiseba40652007-08-30 20:10:57 +000014843fi
14844
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014845# Unset variables that we do not need and which cause bugs (e.g. in
14846# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
14847# suppresses any "Segmentation fault" message there. '((' could
14848# trigger a bug in pdksh 5.2.14.
14849for as_var in BASH_ENV ENV MAIL MAILPATH
14850do eval test x\${$as_var+set} = xset \
14851 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Martin v. Löwiseba40652007-08-30 20:10:57 +000014852done
14853PS1='$ '
14854PS2='> '
14855PS4='+ '
14856
14857# NLS nuisances.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014858LC_ALL=C
14859export LC_ALL
14860LANGUAGE=C
14861export LANGUAGE
Martin v. Löwiseba40652007-08-30 20:10:57 +000014862
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014863# CDPATH.
14864(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
14865
14866
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014867# as_fn_error STATUS ERROR [LINENO LOG_FD]
14868# ----------------------------------------
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014869# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
14870# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014871# script with STATUS, using 1 if that was 0.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014872as_fn_error ()
14873{
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014874 as_status=$1; test $as_status -eq 0 && as_status=1
14875 if test "$4"; then
14876 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
14877 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014878 fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014879 $as_echo "$as_me: error: $2" >&2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014880 as_fn_exit $as_status
14881} # as_fn_error
14882
14883
14884# as_fn_set_status STATUS
14885# -----------------------
14886# Set $? to STATUS, without forking.
14887as_fn_set_status ()
14888{
14889 return $1
14890} # as_fn_set_status
14891
14892# as_fn_exit STATUS
14893# -----------------
14894# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
14895as_fn_exit ()
14896{
14897 set +e
14898 as_fn_set_status $1
14899 exit $1
14900} # as_fn_exit
14901
14902# as_fn_unset VAR
14903# ---------------
14904# Portably unset VAR.
14905as_fn_unset ()
14906{
14907 { eval $1=; unset $1;}
14908}
14909as_unset=as_fn_unset
14910# as_fn_append VAR VALUE
14911# ----------------------
14912# Append the text in VALUE to the end of the definition contained in VAR. Take
14913# advantage of any shell optimizations that allow amortized linear growth over
14914# repeated appends, instead of the typical quadratic growth present in naive
14915# implementations.
14916if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
14917 eval 'as_fn_append ()
14918 {
14919 eval $1+=\$2
14920 }'
14921else
14922 as_fn_append ()
14923 {
14924 eval $1=\$$1\$2
14925 }
14926fi # as_fn_append
14927
14928# as_fn_arith ARG...
14929# ------------------
14930# Perform arithmetic evaluation on the ARGs, and store the result in the
14931# global $as_val. Take advantage of shells that can avoid forks. The arguments
14932# must be portable across $(()) and expr.
14933if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
14934 eval 'as_fn_arith ()
14935 {
14936 as_val=$(( $* ))
14937 }'
14938else
14939 as_fn_arith ()
14940 {
14941 as_val=`expr "$@" || test $? -eq 1`
14942 }
14943fi # as_fn_arith
14944
14945
Martin v. Löwiseba40652007-08-30 20:10:57 +000014946if expr a : '\(a\)' >/dev/null 2>&1 &&
14947 test "X`expr 00001 : '.*\(...\)'`" = X001; then
14948 as_expr=expr
14949else
14950 as_expr=false
14951fi
14952
14953if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
14954 as_basename=basename
14955else
14956 as_basename=false
14957fi
14958
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014959if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
14960 as_dirname=dirname
14961else
14962 as_dirname=false
14963fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014964
Martin v. Löwiseba40652007-08-30 20:10:57 +000014965as_me=`$as_basename -- "$0" ||
14966$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
14967 X"$0" : 'X\(//\)$' \| \
14968 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014969$as_echo X/"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000014970 sed '/^.*\/\([^/][^/]*\)\/*$/{
14971 s//\1/
14972 q
14973 }
14974 /^X\/\(\/\/\)$/{
14975 s//\1/
14976 q
14977 }
14978 /^X\/\(\/\).*/{
14979 s//\1/
14980 q
14981 }
14982 s/.*/./; q'`
14983
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014984# Avoid depending upon Character Ranges.
14985as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14986as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14987as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14988as_cr_digits='0123456789'
14989as_cr_alnum=$as_cr_Letters$as_cr_digits
Martin v. Löwiseba40652007-08-30 20:10:57 +000014990
14991ECHO_C= ECHO_N= ECHO_T=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014992case `echo -n x` in #(((((
Martin v. Löwiseba40652007-08-30 20:10:57 +000014993-n*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014994 case `echo 'xy\c'` in
Martin v. Löwiseba40652007-08-30 20:10:57 +000014995 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014996 xy) ECHO_C='\c';;
14997 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
14998 ECHO_T=' ';;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014999 esac;;
15000*)
15001 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000015002esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015003
Martin v. Löwis11437992002-04-12 09:54:03 +000015004rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +000015005if test -d conf$$.dir; then
15006 rm -f conf$$.dir/conf$$.file
15007else
15008 rm -f conf$$.dir
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015009 mkdir conf$$.dir 2>/dev/null
Martin v. Löwiseba40652007-08-30 20:10:57 +000015010fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015011if (echo >conf$$.file) 2>/dev/null; then
15012 if ln -s conf$$.file conf$$ 2>/dev/null; then
15013 as_ln_s='ln -s'
15014 # ... but there are two gotchas:
15015 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
15016 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015017 # In both cases, we have to default to `cp -pR'.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015018 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015019 as_ln_s='cp -pR'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015020 elif ln conf$$.file conf$$ 2>/dev/null; then
15021 as_ln_s=ln
15022 else
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015023 as_ln_s='cp -pR'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015024 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015025else
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015026 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000015027fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015028rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
15029rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000015030
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015031
15032# as_fn_mkdir_p
15033# -------------
15034# Create "$as_dir" as a directory, including parents if necessary.
15035as_fn_mkdir_p ()
15036{
15037
15038 case $as_dir in #(
15039 -*) as_dir=./$as_dir;;
15040 esac
15041 test -d "$as_dir" || eval $as_mkdir_p || {
15042 as_dirs=
15043 while :; do
15044 case $as_dir in #(
15045 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
15046 *) as_qdir=$as_dir;;
15047 esac
15048 as_dirs="'$as_qdir' $as_dirs"
15049 as_dir=`$as_dirname -- "$as_dir" ||
15050$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15051 X"$as_dir" : 'X\(//\)[^/]' \| \
15052 X"$as_dir" : 'X\(//\)$' \| \
15053 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
15054$as_echo X"$as_dir" |
15055 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15056 s//\1/
15057 q
15058 }
15059 /^X\(\/\/\)[^/].*/{
15060 s//\1/
15061 q
15062 }
15063 /^X\(\/\/\)$/{
15064 s//\1/
15065 q
15066 }
15067 /^X\(\/\).*/{
15068 s//\1/
15069 q
15070 }
15071 s/.*/./; q'`
15072 test -d "$as_dir" && break
15073 done
15074 test -z "$as_dirs" || eval "mkdir $as_dirs"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015075 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015076
15077
15078} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000015079if mkdir -p . 2>/dev/null; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015080 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000015081else
Skip Montanarof0d5f792004-08-15 14:08:23 +000015082 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000015083 as_mkdir_p=false
15084fi
15085
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015086
15087# as_fn_executable_p FILE
15088# -----------------------
15089# Test if FILE is an executable regular file.
15090as_fn_executable_p ()
15091{
15092 test -f "$1" && test -x "$1"
15093} # as_fn_executable_p
15094as_test_x='test -x'
15095as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000015096
15097# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015098as_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 +000015099
15100# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015101as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015102
15103
Martin v. Löwis11437992002-04-12 09:54:03 +000015104exec 6>&1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015105## ----------------------------------- ##
15106## Main body of $CONFIG_STATUS script. ##
15107## ----------------------------------- ##
15108_ASEOF
15109test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015110
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015111cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15112# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000015113# report actual input values of CONFIG_FILES etc. instead of their
Martin v. Löwiseba40652007-08-30 20:10:57 +000015114# values after options handling.
15115ac_log="
Martin v. Löwis174440b2008-10-03 08:59:41 +000015116This file was extended by python $as_me 2.7, which was
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015117generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000015118
15119 CONFIG_FILES = $CONFIG_FILES
15120 CONFIG_HEADERS = $CONFIG_HEADERS
15121 CONFIG_LINKS = $CONFIG_LINKS
15122 CONFIG_COMMANDS = $CONFIG_COMMANDS
15123 $ $0 $@
15124
Martin v. Löwiseba40652007-08-30 20:10:57 +000015125on `(hostname || uname -n) 2>/dev/null | sed 1q`
15126"
15127
Martin v. Löwis11437992002-04-12 09:54:03 +000015128_ACEOF
15129
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015130case $ac_config_files in *"
15131"*) set x $ac_config_files; shift; ac_config_files=$*;;
15132esac
15133
15134case $ac_config_headers in *"
15135"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
15136esac
15137
15138
15139cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015140# Files that config.status was made for.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015141config_files="$ac_config_files"
15142config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000015143
Martin v. Löwiseba40652007-08-30 20:10:57 +000015144_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015145
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015146cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015147ac_cs_usage="\
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015148\`$as_me' instantiates files and other configuration actions
15149from templates according to the current configuration. Unless the files
15150and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000015151
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015152Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000015153
15154 -h, --help print this help, then exit
Martin v. Löwiseba40652007-08-30 20:10:57 +000015155 -V, --version print version number and configuration settings, then exit
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015156 --config print configuration, then exit
15157 -q, --quiet, --silent
15158 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000015159 -d, --debug don't remove temporary files
15160 --recheck update $as_me by reconfiguring in the same conditions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015161 --file=FILE[:TEMPLATE]
15162 instantiate the configuration file FILE
15163 --header=FILE[:TEMPLATE]
15164 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000015165
15166Configuration files:
15167$config_files
15168
15169Configuration headers:
15170$config_headers
15171
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015172Report bugs to <http://bugs.python.org/>."
Skip Montanaro89e975f2007-08-22 19:05:21 +000015173
Martin v. Löwiseba40652007-08-30 20:10:57 +000015174_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015175cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15176ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000015177ac_cs_version="\\
Martin v. Löwis174440b2008-10-03 08:59:41 +000015178python config.status 2.7
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015179configured by $0, generated by GNU Autoconf 2.69,
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015180 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000015181
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015182Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000015183This config.status script is free software; the Free Software Foundation
15184gives unlimited permission to copy, distribute and modify it."
Martin v. Löwiseba40652007-08-30 20:10:57 +000015185
15186ac_pwd='$ac_pwd'
15187srcdir='$srcdir'
15188INSTALL='$INSTALL'
Trent Nelsonf6407a12012-08-30 14:56:13 +000015189MKDIR_P='$MKDIR_P'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015190test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000015191_ACEOF
15192
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015193cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15194# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000015195ac_need_defaults=:
15196while test $# != 0
15197do
15198 case $1 in
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015199 --*=?*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000015200 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15201 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000015202 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000015203 ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015204 --*=)
15205 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15206 ac_optarg=
15207 ac_shift=:
15208 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015209 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000015210 ac_option=$1
15211 ac_optarg=$2
15212 ac_shift=shift
15213 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015214 esac
15215
Skip Montanaro6dead952003-09-25 14:50:04 +000015216 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000015217 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000015218 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15219 ac_cs_recheck=: ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015220 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015221 $as_echo "$ac_cs_version"; exit ;;
15222 --config | --confi | --conf | --con | --co | --c )
15223 $as_echo "$ac_cs_config"; exit ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015224 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000015225 debug=: ;;
15226 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000015227 $ac_shift
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015228 case $ac_optarg in
15229 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015230 '') as_fn_error $? "missing file argument" ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015231 esac
15232 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015233 ac_need_defaults=false;;
15234 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000015235 $ac_shift
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015236 case $ac_optarg in
15237 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15238 esac
15239 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015240 ac_need_defaults=false;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015241 --he | --h)
15242 # Conflict between --help and --header
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015243 as_fn_error $? "ambiguous option: \`$1'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015244Try \`$0 --help' for more information.";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015245 --help | --hel | -h )
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015246 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000015247 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
15248 | -silent | --silent | --silen | --sile | --sil | --si | --s)
15249 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015250
15251 # This is an error.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015252 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015253Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015254
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015255 *) as_fn_append ac_config_targets " $1"
Martin v. Löwiseba40652007-08-30 20:10:57 +000015256 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015257
15258 esac
15259 shift
15260done
15261
Skip Montanaro6dead952003-09-25 14:50:04 +000015262ac_configure_extra_args=
15263
15264if $ac_cs_silent; then
15265 exec 6>/dev/null
15266 ac_configure_extra_args="$ac_configure_extra_args --silent"
15267fi
15268
15269_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015270cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000015271if \$ac_cs_recheck; then
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015272 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015273 shift
15274 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
15275 CONFIG_SHELL='$SHELL'
Martin v. Löwiseba40652007-08-30 20:10:57 +000015276 export CONFIG_SHELL
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015277 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000015278fi
15279
Martin v. Löwis11437992002-04-12 09:54:03 +000015280_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015281cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015282exec 5>>config.log
15283{
15284 echo
15285 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
15286## Running $as_me. ##
15287_ASBOX
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015288 $as_echo "$ac_log"
Martin v. Löwiseba40652007-08-30 20:10:57 +000015289} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015290
Martin v. Löwiseba40652007-08-30 20:10:57 +000015291_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015292cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015293_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015294
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015295cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015296
15297# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000015298for ac_config_target in $ac_config_targets
15299do
Martin v. Löwiseba40652007-08-30 20:10:57 +000015300 case $ac_config_target in
15301 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
15302 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
15303 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
15304 "Mac/IDLE/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/IDLE/Makefile" ;;
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000015305 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
15306 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015307 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
15308 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000015309 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000015310 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015311
Matthias Klose3cef2a92012-03-14 23:39:33 +010015312 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015313 esac
15314done
15315
Martin v. Löwiseba40652007-08-30 20:10:57 +000015316
Martin v. Löwis11437992002-04-12 09:54:03 +000015317# If the user did not use the arguments to specify the items to instantiate,
15318# then the envvar interface is used. Set only those that are not.
15319# We use the long form for the default assignment because of an extremely
15320# bizarre bug on SunOS 4.1.3.
15321if $ac_need_defaults; then
15322 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15323 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
15324fi
15325
Skip Montanaro6dead952003-09-25 14:50:04 +000015326# Have a temporary directory for convenience. Make it in the build tree
Martin v. Löwiseba40652007-08-30 20:10:57 +000015327# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000015328# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015329# Hook for its removal unless debugging.
15330# Note that there is a small window in which the directory will not be cleaned:
15331# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000015332$debug ||
15333{
Matthias Klose3cef2a92012-03-14 23:39:33 +010015334 tmp= ac_tmp=
Martin v. Löwiseba40652007-08-30 20:10:57 +000015335 trap 'exit_status=$?
Matthias Klose3cef2a92012-03-14 23:39:33 +010015336 : "${ac_tmp:=$tmp}"
15337 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +000015338' 0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015339 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000015340}
Martin v. Löwis11437992002-04-12 09:54:03 +000015341# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000015342
Martin v. Löwis11437992002-04-12 09:54:03 +000015343{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015344 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Matthias Klose3cef2a92012-03-14 23:39:33 +010015345 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000015346} ||
15347{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015348 tmp=./conf$$-$RANDOM
15349 (umask 077 && mkdir "$tmp")
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015350} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Matthias Klose3cef2a92012-03-14 23:39:33 +010015351ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000015352
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015353# Set up the scripts for CONFIG_FILES section.
15354# No need to generate them if there are no CONFIG_FILES.
15355# This happens for instance with `./config.status config.h'.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015356if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015357
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015358
15359ac_cr=`echo X | tr X '\015'`
15360# On cygwin, bash can eat \r inside `` if the user requested igncr.
15361# But we know of no other shell where ac_cr would be empty at this
15362# point, so we can use a bashism as a fallback.
15363if test "x$ac_cr" = x; then
15364 eval ac_cr=\$\'\\r\'
15365fi
15366ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
15367if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015368 ac_cs_awk_cr='\\r'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015369else
15370 ac_cs_awk_cr=$ac_cr
15371fi
15372
Matthias Klose3cef2a92012-03-14 23:39:33 +010015373echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000015374_ACEOF
15375
Martin v. Löwiseba40652007-08-30 20:10:57 +000015376
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015377{
15378 echo "cat >conf$$subs.awk <<_ACEOF" &&
15379 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
15380 echo "_ACEOF"
15381} >conf$$subs.sh ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015382 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15383ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015384ac_delim='%!_!# '
15385for ac_last_try in false false false false false :; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015386 . ./conf$$subs.sh ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015387 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015388
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015389 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
15390 if test $ac_delim_n = $ac_delim_num; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015391 break
15392 elif $ac_last_try; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015393 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015394 else
15395 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000015396 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015397done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015398rm -f conf$$subs.sh
Martin v. Löwiseba40652007-08-30 20:10:57 +000015399
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015400cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Matthias Klose3cef2a92012-03-14 23:39:33 +010015401cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000015402_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015403sed -n '
15404h
15405s/^/S["/; s/!.*/"]=/
15406p
15407g
15408s/^[^!]*!//
15409:repl
15410t repl
15411s/'"$ac_delim"'$//
15412t delim
15413:nl
15414h
15415s/\(.\{148\}\)..*/\1/
15416t more1
15417s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
15418p
15419n
15420b repl
15421:more1
15422s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15423p
15424g
15425s/.\{148\}//
15426t nl
15427:delim
15428h
15429s/\(.\{148\}\)..*/\1/
15430t more2
15431s/["\\]/\\&/g; s/^/"/; s/$/"/
15432p
15433b
15434:more2
15435s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15436p
15437g
15438s/.\{148\}//
15439t delim
15440' <conf$$subs.awk | sed '
15441/^[^""]/{
15442 N
15443 s/\n//
15444}
15445' >>$CONFIG_STATUS || ac_write_fail=1
15446rm -f conf$$subs.awk
15447cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15448_ACAWK
Matthias Klose3cef2a92012-03-14 23:39:33 +010015449cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015450 for (key in S) S_is_set[key] = 1
15451 FS = ""
15452
15453}
15454{
15455 line = $ 0
15456 nfields = split(line, field, "@")
15457 substed = 0
15458 len = length(field[1])
15459 for (i = 2; i < nfields; i++) {
15460 key = field[i]
15461 keylen = length(key)
15462 if (S_is_set[key]) {
15463 value = S[key]
15464 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
15465 len += length(value) + length(field[++i])
15466 substed = 1
15467 } else
15468 len += 1 + keylen
15469 }
15470
15471 print line
15472}
15473
15474_ACAWK
Martin v. Löwiseba40652007-08-30 20:10:57 +000015475_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015476cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15477if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
15478 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
15479else
15480 cat
Matthias Klose3cef2a92012-03-14 23:39:33 +010015481fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015482 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015483_ACEOF
15484
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015485# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
15486# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Martin v. Löwiseba40652007-08-30 20:10:57 +000015487# trailing colons and then remove the whole line if VPATH becomes empty
15488# (actually we leave an empty line to preserve line numbers).
15489if test "x$srcdir" = x.; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015490 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
15491h
15492s///
15493s/^/:/
15494s/[ ]*$/:/
15495s/:\$(srcdir):/:/g
15496s/:\${srcdir}:/:/g
15497s/:@srcdir@:/:/g
15498s/^:*//
Martin v. Löwiseba40652007-08-30 20:10:57 +000015499s/:*$//
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015500x
15501s/\(=[ ]*\).*/\1/
15502G
15503s/\n//
Martin v. Löwiseba40652007-08-30 20:10:57 +000015504s/^[^=]*=[ ]*$//
15505}'
15506fi
15507
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015508cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015509fi # test -n "$CONFIG_FILES"
15510
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015511# Set up the scripts for CONFIG_HEADERS section.
15512# No need to generate them if there are no CONFIG_HEADERS.
15513# This happens for instance with `./config.status Makefile'.
15514if test -n "$CONFIG_HEADERS"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +010015515cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015516BEGIN {
15517_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000015518
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015519# Transform confdefs.h into an awk script `defines.awk', embedded as
15520# here-document in config.status, that substitutes the proper values into
15521# config.h.in to produce config.h.
15522
15523# Create a delimiter string that does not exist in confdefs.h, to ease
15524# handling of long lines.
15525ac_delim='%!_!# '
15526for ac_last_try in false false :; do
Matthias Klose3cef2a92012-03-14 23:39:33 +010015527 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
15528 if test -z "$ac_tt"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015529 break
15530 elif $ac_last_try; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015531 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015532 else
15533 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
15534 fi
15535done
15536
15537# For the awk script, D is an array of macro values keyed by name,
15538# likewise P contains macro parameters if any. Preserve backslash
15539# newline sequences.
15540
15541ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
15542sed -n '
15543s/.\{148\}/&'"$ac_delim"'/g
15544t rset
15545:rset
15546s/^[ ]*#[ ]*define[ ][ ]*/ /
15547t def
15548d
15549:def
15550s/\\$//
15551t bsnl
15552s/["\\]/\\&/g
15553s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
15554D["\1"]=" \3"/p
15555s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
15556d
15557:bsnl
15558s/["\\]/\\&/g
15559s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
15560D["\1"]=" \3\\\\\\n"\\/p
15561t cont
15562s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
15563t cont
15564d
15565:cont
15566n
15567s/.\{148\}/&'"$ac_delim"'/g
15568t clear
15569:clear
15570s/\\$//
15571t bsnlc
15572s/["\\]/\\&/g; s/^/"/; s/$/"/p
15573d
15574:bsnlc
15575s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
15576b cont
15577' <confdefs.h | sed '
15578s/'"$ac_delim"'/"\\\
15579"/g' >>$CONFIG_STATUS || ac_write_fail=1
15580
15581cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15582 for (key in D) D_is_set[key] = 1
15583 FS = ""
15584}
15585/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
15586 line = \$ 0
15587 split(line, arg, " ")
15588 if (arg[1] == "#") {
15589 defundef = arg[2]
15590 mac1 = arg[3]
15591 } else {
15592 defundef = substr(arg[1], 2)
15593 mac1 = arg[2]
15594 }
15595 split(mac1, mac2, "(") #)
15596 macro = mac2[1]
15597 prefix = substr(line, 1, index(line, defundef) - 1)
15598 if (D_is_set[macro]) {
15599 # Preserve the white space surrounding the "#".
15600 print prefix "define", macro P[macro] D[macro]
15601 next
15602 } else {
15603 # Replace #undef with comments. This is necessary, for example,
15604 # in the case of _POSIX_SOURCE, which is predefined and required
15605 # on some systems where configure will not decide to define it.
15606 if (defundef == "undef") {
15607 print "/*", prefix defundef, macro, "*/"
15608 next
15609 }
15610 }
15611}
15612{ print }
15613_ACAWK
15614_ACEOF
15615cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015616 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015617fi # test -n "$CONFIG_HEADERS"
15618
15619
15620eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
15621shift
15622for ac_tag
Martin v. Löwiseba40652007-08-30 20:10:57 +000015623do
15624 case $ac_tag in
15625 :[FHLC]) ac_mode=$ac_tag; continue;;
15626 esac
15627 case $ac_mode$ac_tag in
15628 :[FHL]*:*);;
Matthias Klose3cef2a92012-03-14 23:39:33 +010015629 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015630 :[FH]-) ac_tag=-:-;;
15631 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
15632 esac
15633 ac_save_IFS=$IFS
15634 IFS=:
15635 set x $ac_tag
15636 IFS=$ac_save_IFS
15637 shift
15638 ac_file=$1
15639 shift
15640
15641 case $ac_mode in
15642 :L) ac_source=$1;;
15643 :[FH])
15644 ac_file_inputs=
15645 for ac_f
15646 do
15647 case $ac_f in
Matthias Klose3cef2a92012-03-14 23:39:33 +010015648 -) ac_f="$ac_tmp/stdin";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015649 *) # Look for the file first in the build tree, then in the source tree
15650 # (if the path is not absolute). The absolute path cannot be DOS-style,
15651 # because $ac_f cannot contain `:'.
15652 test -f "$ac_f" ||
15653 case $ac_f in
15654 [\\/$]*) false;;
15655 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
15656 esac ||
Matthias Klose3cef2a92012-03-14 23:39:33 +010015657 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015658 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015659 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
15660 as_fn_append ac_file_inputs " '$ac_f'"
Martin v. Löwiseba40652007-08-30 20:10:57 +000015661 done
15662
15663 # Let's still pretend it is `configure' which instantiates (i.e., don't
15664 # use $as_me), people would be surprised to read:
15665 # /* config.h. Generated by config.status. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015666 configure_input='Generated from '`
15667 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
15668 `' by configure.'
Martin v. Löwiseba40652007-08-30 20:10:57 +000015669 if test x"$ac_file" != x-; then
15670 configure_input="$ac_file. $configure_input"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015671 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
15672$as_echo "$as_me: creating $ac_file" >&6;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000015673 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015674 # Neutralize special characters interpreted by sed in replacement strings.
15675 case $configure_input in #(
15676 *\&* | *\|* | *\\* )
15677 ac_sed_conf_input=`$as_echo "$configure_input" |
15678 sed 's/[\\\\&|]/\\\\&/g'`;; #(
15679 *) ac_sed_conf_input=$configure_input;;
15680 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000015681
15682 case $ac_tag in
Matthias Klose3cef2a92012-03-14 23:39:33 +010015683 *:-:* | *:-) cat >"$ac_tmp/stdin" \
15684 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015685 esac
15686 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015687 esac
15688
Martin v. Löwiseba40652007-08-30 20:10:57 +000015689 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000015690$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015691 X"$ac_file" : 'X\(//\)[^/]' \| \
15692 X"$ac_file" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000015693 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015694$as_echo X"$ac_file" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000015695 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15696 s//\1/
15697 q
15698 }
15699 /^X\(\/\/\)[^/].*/{
15700 s//\1/
15701 q
15702 }
15703 /^X\(\/\/\)$/{
15704 s//\1/
15705 q
15706 }
15707 /^X\(\/\).*/{
15708 s//\1/
15709 q
15710 }
15711 s/.*/./; q'`
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015712 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000015713 ac_builddir=.
15714
Martin v. Löwiseba40652007-08-30 20:10:57 +000015715case "$ac_dir" in
15716.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
15717*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015718 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015719 # A ".." for each directory in $ac_dir_suffix.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015720 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015721 case $ac_top_builddir_sub in
15722 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
15723 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
15724 esac ;;
15725esac
15726ac_abs_top_builddir=$ac_pwd
15727ac_abs_builddir=$ac_pwd$ac_dir_suffix
15728# for backward compatibility:
15729ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000015730
15731case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +000015732 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000015733 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015734 ac_top_srcdir=$ac_top_builddir_sub
15735 ac_abs_top_srcdir=$ac_pwd ;;
15736 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000015737 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015738 ac_top_srcdir=$srcdir
15739 ac_abs_top_srcdir=$srcdir ;;
15740 *) # Relative name.
15741 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
15742 ac_top_srcdir=$ac_top_build_prefix$srcdir
15743 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015744esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000015745ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000015746
Martin v. Löwis11437992002-04-12 09:54:03 +000015747
Martin v. Löwiseba40652007-08-30 20:10:57 +000015748 case $ac_mode in
15749 :F)
15750 #
15751 # CONFIG_FILE
15752 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015753
15754 case $INSTALL in
15755 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015756 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015757 esac
Trent Nelsonf6407a12012-08-30 14:56:13 +000015758 ac_MKDIR_P=$MKDIR_P
15759 case $MKDIR_P in
15760 [\\/$]* | ?:[\\/]* ) ;;
15761 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
15762 esac
Brett Cannon19fab762007-06-02 03:02:29 +000015763_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000015764
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015765cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015766# If the template does not know about datarootdir, expand it.
15767# FIXME: This hack should be removed a few years after 2.60.
15768ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015769ac_sed_dataroot='
15770/datarootdir/ {
Martin v. Löwiseba40652007-08-30 20:10:57 +000015771 p
15772 q
15773}
15774/@datadir@/p
15775/@docdir@/p
15776/@infodir@/p
15777/@localedir@/p
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015778/@mandir@/p'
15779case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Martin v. Löwiseba40652007-08-30 20:10:57 +000015780*datarootdir*) ac_datarootdir_seen=yes;;
15781*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015782 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
15783$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000015784_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015785cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015786 ac_datarootdir_hack='
15787 s&@datadir@&$datadir&g
15788 s&@docdir@&$docdir&g
15789 s&@infodir@&$infodir&g
15790 s&@localedir@&$localedir&g
15791 s&@mandir@&$mandir&g
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015792 s&\\\${datarootdir}&$datarootdir&g' ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015793esac
15794_ACEOF
15795
15796# Neutralize VPATH when `$srcdir' = `.'.
15797# Shell code in configure.ac might set extrasub.
15798# FIXME: do we really want to maintain this feature?
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015799cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15800ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000015801$extrasub
15802_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015803cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015804:t
15805/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015806s|@configure_input@|$ac_sed_conf_input|;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000015807s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015808s&@top_build_prefix@&$ac_top_build_prefix&;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000015809s&@srcdir@&$ac_srcdir&;t t
15810s&@abs_srcdir@&$ac_abs_srcdir&;t t
15811s&@top_srcdir@&$ac_top_srcdir&;t t
15812s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
15813s&@builddir@&$ac_builddir&;t t
15814s&@abs_builddir@&$ac_abs_builddir&;t t
15815s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
15816s&@INSTALL@&$ac_INSTALL&;t t
Trent Nelsonf6407a12012-08-30 14:56:13 +000015817s&@MKDIR_P@&$ac_MKDIR_P&;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000015818$ac_datarootdir_hack
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015819"
Matthias Klose3cef2a92012-03-14 23:39:33 +010015820eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
15821 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015822
Martin v. Löwiseba40652007-08-30 20:10:57 +000015823test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Matthias Klose3cef2a92012-03-14 23:39:33 +010015824 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
15825 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
15826 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015827 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015828which seems to be undefined. Please make sure it is defined" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015829$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015830which seems to be undefined. Please make sure it is defined" >&2;}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015831
Matthias Klose3cef2a92012-03-14 23:39:33 +010015832 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000015833 case $ac_file in
Matthias Klose3cef2a92012-03-14 23:39:33 +010015834 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
15835 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015836 esac \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015837 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015838 ;;
15839 :H)
15840 #
15841 # CONFIG_HEADER
15842 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015843 if test x"$ac_file" != x-; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015844 {
15845 $as_echo "/* $configure_input */" \
Matthias Klose3cef2a92012-03-14 23:39:33 +010015846 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
15847 } >"$ac_tmp/config.h" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015848 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Matthias Klose3cef2a92012-03-14 23:39:33 +010015849 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015850 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
15851$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015852 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015853 rm -f "$ac_file"
Matthias Klose3cef2a92012-03-14 23:39:33 +010015854 mv "$ac_tmp/config.h" "$ac_file" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015855 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015856 fi
15857 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015858 $as_echo "/* $configure_input */" \
Matthias Klose3cef2a92012-03-14 23:39:33 +010015859 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015860 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015861 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015862 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015863
Martin v. Löwiseba40652007-08-30 20:10:57 +000015864
15865 esac
15866
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000015867
15868 case $ac_file$ac_mode in
15869 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
15870
15871 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000015872done # for ac_tag
15873
Guido van Rossum627b2d71993-12-24 10:39:16 +000015874
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015875as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000015876_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015877ac_clean_files=$ac_clean_files_save
15878
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015879test $ac_write_fail = 0 ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015880 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015881
Martin v. Löwis11437992002-04-12 09:54:03 +000015882
15883# configure is writing to config.log, and then calls config.status.
15884# config.status does its own redirection, appending to config.log.
15885# Unfortunately, on DOS this fails, as config.log is still kept open
15886# by configure, so config.status won't be able to write to it; its
15887# output is simply discarded. So we exec the FD to /dev/null,
15888# effectively closing config.log, so it can be properly (re)opened and
15889# appended to by config.status. When coming back to configure, we
15890# need to make the FD available again.
15891if test "$no_create" != yes; then
15892 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000015893 ac_config_status_args=
15894 test "$silent" = yes &&
15895 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000015896 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000015897 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000015898 exec 5>>config.log
15899 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
15900 # would make configure fail if this is the last instruction.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015901 $ac_cs_success || as_fn_exit 1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015902fi
15903if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
15904 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
15905$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015906fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000015907
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015908
Martin v. Löwisf7afe952006-04-14 15:16:15 +000015909echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015910if test ! -f Modules/Setup
15911then
15912 cp $srcdir/Modules/Setup.dist Modules/Setup
15913fi
15914
Martin v. Löwisf7afe952006-04-14 15:16:15 +000015915echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015916if test ! -f Modules/Setup.local
15917then
15918 echo "# Edit this file for local setup changes" >Modules/Setup.local
15919fi
15920
15921echo "creating Makefile"
15922$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
15923 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000015924 Modules/Setup.local Modules/Setup
Skip Montanaro89e975f2007-08-22 19:05:21 +000015925
15926case $ac_sys_system in
15927BeOS)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015928 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000015929
15930 Support for BeOS is deprecated as of Python 2.6.
15931 See PEP 11 for the gory details.
15932 " >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015933$as_echo "$as_me: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000015934
15935 Support for BeOS is deprecated as of Python 2.6.
15936 See PEP 11 for the gory details.
15937 " >&2;}
15938 ;;
15939*) ;;
15940esac
15941
Neil Schemenauerc761fc82001-02-19 04:50:49 +000015942mv config.c Modules