blob: 09e65ebf9000ac60a2a1ee232f7289b69d7ee3ff [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Matthias Klose3cef2a92012-03-14 23:39:33 +01002# From configure.ac Revision.
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004# Generated by GNU Autoconf 2.69 for python 2.7.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Georg Brandl464432d2009-05-20 18:24:08 +00006# Report bugs to <http://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00007#
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008#
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010#
11#
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012# This configure script is free software; the Free Software Foundation
13# gives unlimited permission to copy, distribute and modify it.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014## -------------------- ##
15## M4sh Initialization. ##
16## -------------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +000017
Martin v. Löwiseba40652007-08-30 20:10:57 +000018# Be more Bourne compatible
19DUALCASE=1; export DUALCASE # for MKS sh
Matthias Klosea0bea5d2010-05-08 10:00:28 +000020if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000021 emulate sh
22 NULLCMD=:
Matthias Klosea0bea5d2010-05-08 10:00:28 +000023 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000024 # is contrary to our usage. Disable this feature.
25 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000026 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000027else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000028 case `(set -o) 2>/dev/null` in #(
29 *posix*) :
30 set -o posix ;; #(
31 *) :
32 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000033esac
Martin v. Löwis11437992002-04-12 09:54:03 +000034fi
35
Skip Montanaro6dead952003-09-25 14:50:04 +000036
Matthias Klosea0bea5d2010-05-08 10:00:28 +000037as_nl='
38'
39export as_nl
40# Printing a long string crashes Solaris 7 /usr/bin/printf.
41as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
42as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
43as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
44# Prefer a ksh shell builtin over an external printf program on Solaris,
45# but without wasting forks for bash or zsh.
46if test -z "$BASH_VERSION$ZSH_VERSION" \
47 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
48 as_echo='print -r --'
49 as_echo_n='print -rn --'
50elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
51 as_echo='printf %s\n'
52 as_echo_n='printf %s'
53else
54 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
55 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
56 as_echo_n='/usr/ucb/echo -n'
57 else
58 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
59 as_echo_n_body='eval
60 arg=$1;
61 case $arg in #(
62 *"$as_nl"*)
63 expr "X$arg" : "X\\(.*\\)$as_nl";
64 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
65 esac;
66 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
67 '
68 export as_echo_n_body
69 as_echo_n='sh -c $as_echo_n_body as_echo'
70 fi
71 export as_echo_body
72 as_echo='sh -c $as_echo_body as_echo'
73fi
Martin v. Löwis11437992002-04-12 09:54:03 +000074
75# The user is always right.
76if test "${PATH_SEPARATOR+set}" != set; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000077 PATH_SEPARATOR=:
78 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
79 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
80 PATH_SEPARATOR=';'
81 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000082fi
Martin v. Löwis11437992002-04-12 09:54:03 +000083
Martin v. Löwiseba40652007-08-30 20:10:57 +000084
85# IFS
86# We need space, tab and new line, in precisely that order. Quoting is
87# there to prevent editors from complaining about space-tab.
88# (If _AS_PATH_WALK were called with IFS unset, it would disable word
89# splitting by setting IFS to empty value.)
Martin v. Löwiseba40652007-08-30 20:10:57 +000090IFS=" "" $as_nl"
91
92# Find who we are. Look in the path if we contain no directory separator.
Matthias Klose3cef2a92012-03-14 23:39:33 +010093as_myself=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000094case $0 in #((
Martin v. Löwiseba40652007-08-30 20:10:57 +000095 *[\\/]* ) as_myself=$0 ;;
96 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000097for as_dir in $PATH
98do
99 IFS=$as_save_IFS
100 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000101 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
102 done
Martin v. Löwiseba40652007-08-30 20:10:57 +0000103IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +0000104
Martin v. Löwiseba40652007-08-30 20:10:57 +0000105 ;;
106esac
107# We did not find ourselves, most probably we were run as `sh COMMAND'
108# in which case we are not to be found in the path.
109if test "x$as_myself" = x; then
110 as_myself=$0
111fi
112if test ! -f "$as_myself"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000113 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
114 exit 1
Martin v. Löwiseba40652007-08-30 20:10:57 +0000115fi
116
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000117# Unset variables that we do not need and which cause bugs (e.g. in
118# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
119# suppresses any "Segmentation fault" message there. '((' could
120# trigger a bug in pdksh 5.2.14.
121for as_var in BASH_ENV ENV MAIL MAILPATH
122do eval test x\${$as_var+set} = xset \
123 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Martin v. Löwiseba40652007-08-30 20:10:57 +0000124done
125PS1='$ '
126PS2='> '
127PS4='+ '
128
129# NLS nuisances.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000130LC_ALL=C
131export LC_ALL
132LANGUAGE=C
133export LANGUAGE
Martin v. Löwiseba40652007-08-30 20:10:57 +0000134
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000135# CDPATH.
136(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
137
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100138# Use a proper internal environment variable to ensure we don't fall
139 # into an infinite loop, continuously re-executing ourselves.
140 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
141 _as_can_reexec=no; export _as_can_reexec;
142 # We cannot yet assume a decent shell, so we have to provide a
143# neutralization value for shells without unset; and this also
144# works around shells that cannot unset nonexistent variables.
145# Preserve -v and -x to the replacement shell.
146BASH_ENV=/dev/null
147ENV=/dev/null
148(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
149case $- in # ((((
150 *v*x* | *x*v* ) as_opts=-vx ;;
151 *v* ) as_opts=-v ;;
152 *x* ) as_opts=-x ;;
153 * ) as_opts= ;;
154esac
155exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
156# Admittedly, this is quite paranoid, since all the known shells bail
157# out after a failed `exec'.
158$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
159as_fn_exit 255
160 fi
161 # We don't want this to propagate to other subprocesses.
162 { _as_can_reexec=; unset _as_can_reexec;}
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000163if test "x$CONFIG_SHELL" = x; then
164 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
165 emulate sh
166 NULLCMD=:
167 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
168 # is contrary to our usage. Disable this feature.
169 alias -g '\${1+\"\$@\"}'='\"\$@\"'
170 setopt NO_GLOB_SUBST
171else
172 case \`(set -o) 2>/dev/null\` in #(
173 *posix*) :
174 set -o posix ;; #(
175 *) :
176 ;;
177esac
178fi
179"
180 as_required="as_fn_return () { (exit \$1); }
181as_fn_success () { as_fn_return 0; }
182as_fn_failure () { as_fn_return 1; }
183as_fn_ret_success () { return 0; }
184as_fn_ret_failure () { return 1; }
185
186exitcode=0
187as_fn_success || { exitcode=1; echo as_fn_success failed.; }
188as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
189as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
190as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
191if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
192
193else
194 exitcode=1; echo positional parameters were not saved.
195fi
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100196test x\$exitcode = x0 || exit 1
197test -x / || exit 1"
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000198 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
199 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
200 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
201 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
202test \$(( 1 + 1 )) = 2 || exit 1"
203 if (eval "$as_required") 2>/dev/null; then :
204 as_have_required=yes
205else
206 as_have_required=no
207fi
208 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
209
210else
211 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
212as_found=false
213for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
214do
215 IFS=$as_save_IFS
216 test -z "$as_dir" && as_dir=.
217 as_found=:
218 case $as_dir in #(
219 /*)
220 for as_base in sh bash ksh sh5; do
221 # Try only shells that exist, to save several forks.
222 as_shell=$as_dir/$as_base
223 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
224 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
225 CONFIG_SHELL=$as_shell as_have_required=yes
226 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
227 break 2
228fi
229fi
230 done;;
231 esac
232 as_found=false
233done
234$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
235 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
236 CONFIG_SHELL=$SHELL as_have_required=yes
237fi; }
238IFS=$as_save_IFS
239
240
241 if test "x$CONFIG_SHELL" != x; then :
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100242 export CONFIG_SHELL
243 # We cannot yet assume a decent shell, so we have to provide a
244# neutralization value for shells without unset; and this also
245# works around shells that cannot unset nonexistent variables.
246# Preserve -v and -x to the replacement shell.
247BASH_ENV=/dev/null
248ENV=/dev/null
249(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
250case $- in # ((((
251 *v*x* | *x*v* ) as_opts=-vx ;;
252 *v* ) as_opts=-v ;;
253 *x* ) as_opts=-x ;;
254 * ) as_opts= ;;
255esac
256exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
257# Admittedly, this is quite paranoid, since all the known shells bail
258# out after a failed `exec'.
259$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
260exit 255
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000261fi
262
263 if test x$as_have_required = xno; then :
264 $as_echo "$0: This script requires a shell more modern than all"
265 $as_echo "$0: the shells that I found on your system."
266 if test x${ZSH_VERSION+set} = xset ; then
267 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
268 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
269 else
270 $as_echo "$0: Please tell bug-autoconf@gnu.org and
271$0: http://bugs.python.org/ about your system, including
272$0: any error possibly output before this message. Then
273$0: install a modern shell, or manually run the script
274$0: under such a shell if you do have one."
275 fi
276 exit 1
277fi
278fi
279fi
280SHELL=${CONFIG_SHELL-/bin/sh}
281export SHELL
282# Unset more variables known to interfere with behavior of common tools.
283CLICOLOR_FORCE= GREP_OPTIONS=
284unset CLICOLOR_FORCE GREP_OPTIONS
285
286## --------------------- ##
287## M4sh Shell Functions. ##
288## --------------------- ##
289# as_fn_unset VAR
290# ---------------
291# Portably unset VAR.
292as_fn_unset ()
293{
294 { eval $1=; unset $1;}
295}
296as_unset=as_fn_unset
297
298# as_fn_set_status STATUS
299# -----------------------
300# Set $? to STATUS, without forking.
301as_fn_set_status ()
302{
303 return $1
304} # as_fn_set_status
305
306# as_fn_exit STATUS
307# -----------------
308# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
309as_fn_exit ()
310{
311 set +e
312 as_fn_set_status $1
313 exit $1
314} # as_fn_exit
315
316# as_fn_mkdir_p
317# -------------
318# Create "$as_dir" as a directory, including parents if necessary.
319as_fn_mkdir_p ()
320{
321
322 case $as_dir in #(
323 -*) as_dir=./$as_dir;;
324 esac
325 test -d "$as_dir" || eval $as_mkdir_p || {
326 as_dirs=
327 while :; do
328 case $as_dir in #(
329 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
330 *) as_qdir=$as_dir;;
331 esac
332 as_dirs="'$as_qdir' $as_dirs"
333 as_dir=`$as_dirname -- "$as_dir" ||
334$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
335 X"$as_dir" : 'X\(//\)[^/]' \| \
336 X"$as_dir" : 'X\(//\)$' \| \
337 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
338$as_echo X"$as_dir" |
339 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
340 s//\1/
341 q
342 }
343 /^X\(\/\/\)[^/].*/{
344 s//\1/
345 q
346 }
347 /^X\(\/\/\)$/{
348 s//\1/
349 q
350 }
351 /^X\(\/\).*/{
352 s//\1/
353 q
354 }
355 s/.*/./; q'`
356 test -d "$as_dir" && break
357 done
358 test -z "$as_dirs" || eval "mkdir $as_dirs"
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000359 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000360
361
362} # as_fn_mkdir_p
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100363
364# as_fn_executable_p FILE
365# -----------------------
366# Test if FILE is an executable regular file.
367as_fn_executable_p ()
368{
369 test -f "$1" && test -x "$1"
370} # as_fn_executable_p
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000371# as_fn_append VAR VALUE
372# ----------------------
373# Append the text in VALUE to the end of the definition contained in VAR. Take
374# advantage of any shell optimizations that allow amortized linear growth over
375# repeated appends, instead of the typical quadratic growth present in naive
376# implementations.
377if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
378 eval 'as_fn_append ()
379 {
380 eval $1+=\$2
381 }'
382else
383 as_fn_append ()
384 {
385 eval $1=\$$1\$2
386 }
387fi # as_fn_append
388
389# as_fn_arith ARG...
390# ------------------
391# Perform arithmetic evaluation on the ARGs, and store the result in the
392# global $as_val. Take advantage of shells that can avoid forks. The arguments
393# must be portable across $(()) and expr.
394if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
395 eval 'as_fn_arith ()
396 {
397 as_val=$(( $* ))
398 }'
399else
400 as_fn_arith ()
401 {
402 as_val=`expr "$@" || test $? -eq 1`
403 }
404fi # as_fn_arith
405
406
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000407# as_fn_error STATUS ERROR [LINENO LOG_FD]
408# ----------------------------------------
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000409# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
410# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000411# script with STATUS, using 1 if that was 0.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000412as_fn_error ()
413{
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000414 as_status=$1; test $as_status -eq 0 && as_status=1
415 if test "$4"; then
416 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
417 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000418 fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000419 $as_echo "$as_me: error: $2" >&2
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000420 as_fn_exit $as_status
421} # as_fn_error
422
Martin v. Löwiseba40652007-08-30 20:10:57 +0000423if expr a : '\(a\)' >/dev/null 2>&1 &&
424 test "X`expr 00001 : '.*\(...\)'`" = X001; then
425 as_expr=expr
426else
427 as_expr=false
428fi
429
430if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
431 as_basename=basename
432else
433 as_basename=false
434fi
435
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000436if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
437 as_dirname=dirname
438else
439 as_dirname=false
440fi
Martin v. Löwiseba40652007-08-30 20:10:57 +0000441
Martin v. Löwiseba40652007-08-30 20:10:57 +0000442as_me=`$as_basename -- "$0" ||
443$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
444 X"$0" : 'X\(//\)$' \| \
445 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000446$as_echo X/"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +0000447 sed '/^.*\/\([^/][^/]*\)\/*$/{
448 s//\1/
449 q
450 }
451 /^X\/\(\/\/\)$/{
452 s//\1/
453 q
454 }
455 /^X\/\(\/\).*/{
456 s//\1/
457 q
458 }
459 s/.*/./; q'`
460
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000461# Avoid depending upon Character Ranges.
462as_cr_letters='abcdefghijklmnopqrstuvwxyz'
463as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
464as_cr_Letters=$as_cr_letters$as_cr_LETTERS
465as_cr_digits='0123456789'
466as_cr_alnum=$as_cr_Letters$as_cr_digits
Martin v. Löwiseba40652007-08-30 20:10:57 +0000467
468
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000469 as_lineno_1=$LINENO as_lineno_1a=$LINENO
470 as_lineno_2=$LINENO as_lineno_2a=$LINENO
471 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
472 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
473 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
Martin v. Löwiseba40652007-08-30 20:10:57 +0000474 sed -n '
475 p
476 /[$]LINENO/=
477 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000478 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +0000479 s/[$]LINENO.*/&-/
480 t lineno
481 b
482 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000483 N
Martin v. Löwiseba40652007-08-30 20:10:57 +0000484 :loop
485 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000486 t loop
Martin v. Löwiseba40652007-08-30 20:10:57 +0000487 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000488 ' >$as_me.lineno &&
Martin v. Löwiseba40652007-08-30 20:10:57 +0000489 chmod +x "$as_me.lineno" ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000490 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
Martin v. Löwis11437992002-04-12 09:54:03 +0000491
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100492 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
493 # already done that, so ensure we don't try to do so again and fall
494 # in an infinite loop. This has already happened in practice.
495 _as_can_reexec=no; export _as_can_reexec
Martin v. Löwis11437992002-04-12 09:54:03 +0000496 # Don't try to exec as it changes $[0], causing all sort of problems
497 # (the dirname of $[0] is not the place where we might find the
Martin v. Löwiseba40652007-08-30 20:10:57 +0000498 # original and so on. Autoconf is especially sensitive to this).
499 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000500 # Exit status is that of the last command.
501 exit
502}
503
Martin v. Löwiseba40652007-08-30 20:10:57 +0000504ECHO_C= ECHO_N= ECHO_T=
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000505case `echo -n x` in #(((((
Martin v. Löwiseba40652007-08-30 20:10:57 +0000506-n*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000507 case `echo 'xy\c'` in
Martin v. Löwiseba40652007-08-30 20:10:57 +0000508 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000509 xy) ECHO_C='\c';;
510 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
511 ECHO_T=' ';;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000512 esac;;
513*)
514 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000515esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000516
Martin v. Löwis11437992002-04-12 09:54:03 +0000517rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +0000518if test -d conf$$.dir; then
519 rm -f conf$$.dir/conf$$.file
520else
521 rm -f conf$$.dir
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000522 mkdir conf$$.dir 2>/dev/null
Martin v. Löwiseba40652007-08-30 20:10:57 +0000523fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000524if (echo >conf$$.file) 2>/dev/null; then
525 if ln -s conf$$.file conf$$ 2>/dev/null; then
526 as_ln_s='ln -s'
527 # ... but there are two gotchas:
528 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
529 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100530 # In both cases, we have to default to `cp -pR'.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000531 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100532 as_ln_s='cp -pR'
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000533 elif ln conf$$.file conf$$ 2>/dev/null; then
534 as_ln_s=ln
535 else
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100536 as_ln_s='cp -pR'
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000537 fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000538else
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100539 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +0000540fi
Martin v. Löwiseba40652007-08-30 20:10:57 +0000541rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
542rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000543
Skip Montanaro6dead952003-09-25 14:50:04 +0000544if mkdir -p . 2>/dev/null; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000545 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +0000546else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000547 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000548 as_mkdir_p=false
549fi
550
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100551as_test_x='test -x'
552as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +0000553
554# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000555as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000556
557# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000558as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000559
560
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000561test -n "$DJDIR" || exec 7<&0 </dev/null
562exec 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000563
564# Name of the host.
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000565# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
Martin v. Löwis11437992002-04-12 09:54:03 +0000566# so uname gets run too.
567ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
568
Martin v. Löwis11437992002-04-12 09:54:03 +0000569#
570# Initializations.
571#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000572ac_default_prefix=/usr/local
Martin v. Löwiseba40652007-08-30 20:10:57 +0000573ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000574ac_config_libobj_dir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000575LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000576cross_compiling=no
577subdirs=
578MFLAGS=
579MAKEFLAGS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000580
Martin v. Löwis11437992002-04-12 09:54:03 +0000581# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000582PACKAGE_NAME='python'
583PACKAGE_TARNAME='python'
Martin v. Löwis174440b2008-10-03 08:59:41 +0000584PACKAGE_VERSION='2.7'
585PACKAGE_STRING='python 2.7'
Georg Brandl464432d2009-05-20 18:24:08 +0000586PACKAGE_BUGREPORT='http://bugs.python.org/'
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000587PACKAGE_URL=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000588
589ac_unique_file="Include/object.h"
590# Factoring default headers for most tests.
591ac_includes_default="\
592#include <stdio.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +0000593#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000594# include <sys/types.h>
595#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000596#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000597# include <sys/stat.h>
598#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000599#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000600# include <stdlib.h>
601# include <stddef.h>
602#else
Martin v. Löwiseba40652007-08-30 20:10:57 +0000603# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000604# include <stdlib.h>
605# endif
606#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000607#ifdef HAVE_STRING_H
608# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000609# include <memory.h>
610# endif
611# include <string.h>
612#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000613#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000614# include <strings.h>
615#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000616#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000617# include <inttypes.h>
Martin v. Löwis11437992002-04-12 09:54:03 +0000618#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000619#ifdef HAVE_STDINT_H
620# include <stdint.h>
621#endif
622#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000623# include <unistd.h>
624#endif"
625
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000626ac_subst_vars='LTLIBOBJS
Ned Deily3f1d0b32014-11-20 02:11:03 -0800627ENSUREPIP
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000628SRCDIRS
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000629THREADHEADERS
630UNICODE_OBJS
631LIBC
632LIBM
633HAVE_GETHOSTBYNAME
634HAVE_GETHOSTBYNAME_R
635HAVE_GETHOSTBYNAME_R_3_ARG
636HAVE_GETHOSTBYNAME_R_5_ARG
637HAVE_GETHOSTBYNAME_R_6_ARG
638LIBOBJS
639TRUE
640MACHDEP_OBJS
641DYNLOADFILE
642DLINCLDIR
643THREADOBJ
644LDLAST
645USE_THREAD_MODULE
646SIGNAL_OBJS
647USE_SIGNAL_MODULE
Ned Deilya2a9f572013-10-25 00:30:10 -0700648TCLTK_LIBS
649TCLTK_INCLUDES
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000650LIBFFI_INCLUDEDIR
Benjamin Peterson64e8f6e2014-12-15 00:00:23 -0500651PKG_CONFIG_LIBDIR
652PKG_CONFIG_PATH
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000653PKG_CONFIG
654SHLIBS
655CFLAGSFORSHARED
656LINKFORSHARED
657CCSHARED
658BLDSHARED
659LDCXXSHARED
660LDSHARED
661SO
662LIBTOOL_CRUFT
663OTHER_LIBTOOL_OPT
664UNIVERSAL_ARCH_FLAGS
665BASECFLAGS
666OPT
667LN
Trent Nelsonf6407a12012-08-30 14:56:13 +0000668MKDIR_P
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000669INSTALL_DATA
670INSTALL_SCRIPT
671INSTALL_PROGRAM
Georg Brandl3a5508e2011-03-06 10:42:21 +0100672HAS_HG
673HGBRANCH
674HGTAG
675HGVERSION
Trent Nelsond86ceec2012-10-16 09:42:45 -0400676BASECPPFLAGS
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000677SVNVERSION
678ARFLAGS
doko@python.orgd65e2ba2013-01-31 23:52:03 +0100679ac_ct_AR
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000680AR
681RANLIB
682GNULD
683LINKCC
684RUNSHARED
685INSTSONAME
686LDLIBRARYDIR
687BLDLIBRARY
688DLLLIBRARY
689LDLIBRARY
690LIBRARY
691BUILDEXEEXT
692EGREP
693GREP
694CPP
doko@python.org4e63fbe2013-01-25 13:08:27 +0100695MULTIARCH
doko@python.orgd65e2ba2013-01-31 23:52:03 +0100696ac_ct_CXX
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000697MAINCC
698CXX
699OBJEXT
700EXEEXT
701ac_ct_CC
702CPPFLAGS
703LDFLAGS
704CFLAGS
705CC
706EXPORT_MACOSX_DEPLOYMENT_TARGET
707CONFIGURE_MACOSX_DEPLOYMENT_TARGET
708EXTRAMACHDEPPATH
709EXTRAPLATDIR
710SGI_ABI
doko@python.orgd65e2ba2013-01-31 23:52:03 +0100711_PYTHON_HOST_PLATFORM
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000712MACHDEP
713FRAMEWORKINSTALLAPPSPREFIX
714FRAMEWORKUNIXTOOLSPREFIX
715FRAMEWORKALTINSTALLLAST
716FRAMEWORKALTINSTALLFIRST
717FRAMEWORKINSTALLLAST
718FRAMEWORKINSTALLFIRST
719PYTHONFRAMEWORKINSTALLDIR
720PYTHONFRAMEWORKPREFIX
721PYTHONFRAMEWORKDIR
722PYTHONFRAMEWORKIDENTIFIER
723PYTHONFRAMEWORK
724LIPO_32BIT_FLAGS
725ARCH_RUN_32BIT
726UNIVERSALSDK
727CONFIG_ARGS
728SOVERSION
729VERSION
doko@python.orgd65e2ba2013-01-31 23:52:03 +0100730PYTHON_FOR_BUILD
731host_os
732host_vendor
733host_cpu
734host
735build_os
736build_vendor
737build_cpu
738build
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000739target_alias
740host_alias
741build_alias
742LIBS
743ECHO_T
744ECHO_N
745ECHO_C
746DEFS
747mandir
748localedir
749libdir
750psdir
751pdfdir
752dvidir
753htmldir
754infodir
755docdir
756oldincludedir
757includedir
758localstatedir
759sharedstatedir
760sysconfdir
761datadir
762datarootdir
763libexecdir
764sbindir
765bindir
766program_transform_name
767prefix
768exec_prefix
769PACKAGE_URL
770PACKAGE_BUGREPORT
771PACKAGE_STRING
772PACKAGE_VERSION
773PACKAGE_TARNAME
774PACKAGE_NAME
775PATH_SEPARATOR
776SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000777ac_subst_files=''
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000778ac_user_opts='
779enable_option_checking
780enable_universalsdk
781with_universal_archs
782with_framework_name
783enable_framework
784with_gcc
785with_cxx_main
786with_suffix
787enable_shared
788enable_profiling
789with_pydebug
790enable_toolbox_glue
791with_libs
792with_system_expat
793with_system_ffi
Ned Deilya2a9f572013-10-25 00:30:10 -0700794with_tcltk_includes
795with_tcltk_libs
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000796with_dbmliborder
797with_signal_module
798with_dec_threads
799with_threads
800with_thread
801with_pth
802enable_ipv6
803with_doc_strings
804with_tsc
805with_pymalloc
806with_valgrind
807with_wctype_functions
808with_fpectl
809with_libm
810with_libc
811enable_big_digits
812enable_unicode
Ned Deily3f1d0b32014-11-20 02:11:03 -0800813with_ensurepip
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000814'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000815 ac_precious_vars='build_alias
816host_alias
817target_alias
818CC
819CFLAGS
820LDFLAGS
821LIBS
822CPPFLAGS
Benjamin Peterson64e8f6e2014-12-15 00:00:23 -0500823CPP
824PKG_CONFIG
825PKG_CONFIG_PATH
826PKG_CONFIG_LIBDIR'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000827
Guido van Rossum627b2d71993-12-24 10:39:16 +0000828
Guido van Rossum7f43da71994-08-01 12:15:30 +0000829# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000830ac_init_help=
831ac_init_version=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000832ac_unrecognized_opts=
833ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000834# The variables have the same names as the options, with
835# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000836cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000837exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000838no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000839no_recursion=
840prefix=NONE
841program_prefix=NONE
842program_suffix=NONE
843program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000844silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000845site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000846srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000847verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000848x_includes=NONE
849x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000850
851# Installation directory options.
852# These are left unexpanded so users can "make install exec_prefix=/foo"
853# and all the variables that are supposed to be based on exec_prefix
854# by default will actually change.
855# Use braces instead of parens because sh, perl, etc. also accept them.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000856# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000857bindir='${exec_prefix}/bin'
858sbindir='${exec_prefix}/sbin'
859libexecdir='${exec_prefix}/libexec'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000860datarootdir='${prefix}/share'
861datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000862sysconfdir='${prefix}/etc'
863sharedstatedir='${prefix}/com'
864localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000865includedir='${prefix}/include'
866oldincludedir='/usr/include'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000867docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
868infodir='${datarootdir}/info'
869htmldir='${docdir}'
870dvidir='${docdir}'
871pdfdir='${docdir}'
872psdir='${docdir}'
873libdir='${exec_prefix}/lib'
874localedir='${datarootdir}/locale'
875mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000876
Guido van Rossum7f43da71994-08-01 12:15:30 +0000877ac_prev=
Martin v. Löwiseba40652007-08-30 20:10:57 +0000878ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000879for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000880do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000881 # If the previous option needs an argument, assign it.
882 if test -n "$ac_prev"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +0000883 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000884 ac_prev=
885 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000886 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000887
Martin v. Löwiseba40652007-08-30 20:10:57 +0000888 case $ac_option in
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000889 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
890 *=) ac_optarg= ;;
891 *) ac_optarg=yes ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000892 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000893
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000894 # Accept the important Cygnus configure options, so we can diagnose typos.
895
Martin v. Löwiseba40652007-08-30 20:10:57 +0000896 case $ac_dashdash$ac_option in
897 --)
898 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000899
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000900 -bindir | --bindir | --bindi | --bind | --bin | --bi)
901 ac_prev=bindir ;;
902 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000903 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000904
905 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000906 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000907 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000908 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000909
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000910 -cache-file | --cache-file | --cache-fil | --cache-fi \
911 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
912 ac_prev=cache_file ;;
913 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
914 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000915 cache_file=$ac_optarg ;;
916
917 --config-cache | -C)
918 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000919
Martin v. Löwiseba40652007-08-30 20:10:57 +0000920 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000921 ac_prev=datadir ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000922 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000923 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000924
Martin v. Löwiseba40652007-08-30 20:10:57 +0000925 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
926 | --dataroo | --dataro | --datar)
927 ac_prev=datarootdir ;;
928 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
929 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
930 datarootdir=$ac_optarg ;;
931
Guido van Rossum7f43da71994-08-01 12:15:30 +0000932 -disable-* | --disable-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000933 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000934 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000935 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000936 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000937 ac_useropt_orig=$ac_useropt
938 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
939 case $ac_user_opts in
940 *"
941"enable_$ac_useropt"
942"*) ;;
943 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
944 ac_unrecognized_sep=', ';;
945 esac
946 eval enable_$ac_useropt=no ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000947
948 -docdir | --docdir | --docdi | --doc | --do)
949 ac_prev=docdir ;;
950 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
951 docdir=$ac_optarg ;;
952
953 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
954 ac_prev=dvidir ;;
955 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
956 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000957
958 -enable-* | --enable-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000959 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000960 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000961 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000962 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000963 ac_useropt_orig=$ac_useropt
964 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
965 case $ac_user_opts in
966 *"
967"enable_$ac_useropt"
968"*) ;;
969 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
970 ac_unrecognized_sep=', ';;
971 esac
972 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000973
Guido van Rossum7f43da71994-08-01 12:15:30 +0000974 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
975 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
976 | --exec | --exe | --ex)
977 ac_prev=exec_prefix ;;
978 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
979 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
980 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000981 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000982
983 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000984 # Obsolete; use --with-gas.
985 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000986
Martin v. Löwis11437992002-04-12 09:54:03 +0000987 -help | --help | --hel | --he | -h)
988 ac_init_help=long ;;
989 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
990 ac_init_help=recursive ;;
991 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
992 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000993
994 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000995 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000996 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000997 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000998
Martin v. Löwiseba40652007-08-30 20:10:57 +0000999 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1000 ac_prev=htmldir ;;
1001 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1002 | --ht=*)
1003 htmldir=$ac_optarg ;;
1004
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001005 -includedir | --includedir | --includedi | --included | --include \
1006 | --includ | --inclu | --incl | --inc)
1007 ac_prev=includedir ;;
1008 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1009 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001010 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001011
1012 -infodir | --infodir | --infodi | --infod | --info | --inf)
1013 ac_prev=infodir ;;
1014 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001015 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001016
1017 -libdir | --libdir | --libdi | --libd)
1018 ac_prev=libdir ;;
1019 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001020 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001021
1022 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1023 | --libexe | --libex | --libe)
1024 ac_prev=libexecdir ;;
1025 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1026 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001027 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001028
Martin v. Löwiseba40652007-08-30 20:10:57 +00001029 -localedir | --localedir | --localedi | --localed | --locale)
1030 ac_prev=localedir ;;
1031 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1032 localedir=$ac_optarg ;;
1033
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001034 -localstatedir | --localstatedir | --localstatedi | --localstated \
Martin v. Löwiseba40652007-08-30 20:10:57 +00001035 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001036 ac_prev=localstatedir ;;
1037 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Martin v. Löwiseba40652007-08-30 20:10:57 +00001038 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001039 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001040
1041 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1042 ac_prev=mandir ;;
1043 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001044 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001045
Guido van Rossum7f43da71994-08-01 12:15:30 +00001046 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001047 # Obsolete; use --without-fp.
1048 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001049
1050 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001051 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001052 no_create=yes ;;
1053
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001054 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1055 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1056 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001057
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001058 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1059 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1060 | --oldin | --oldi | --old | --ol | --o)
1061 ac_prev=oldincludedir ;;
1062 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1063 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1064 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001065 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001066
Guido van Rossum7f43da71994-08-01 12:15:30 +00001067 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1068 ac_prev=prefix ;;
1069 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001070 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001071
1072 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1073 | --program-pre | --program-pr | --program-p)
1074 ac_prev=program_prefix ;;
1075 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1076 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001077 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001078
1079 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1080 | --program-suf | --program-su | --program-s)
1081 ac_prev=program_suffix ;;
1082 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1083 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001084 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001085
1086 -program-transform-name | --program-transform-name \
1087 | --program-transform-nam | --program-transform-na \
1088 | --program-transform-n | --program-transform- \
1089 | --program-transform | --program-transfor \
1090 | --program-transfo | --program-transf \
1091 | --program-trans | --program-tran \
1092 | --progr-tra | --program-tr | --program-t)
1093 ac_prev=program_transform_name ;;
1094 -program-transform-name=* | --program-transform-name=* \
1095 | --program-transform-nam=* | --program-transform-na=* \
1096 | --program-transform-n=* | --program-transform-=* \
1097 | --program-transform=* | --program-transfor=* \
1098 | --program-transfo=* | --program-transf=* \
1099 | --program-trans=* | --program-tran=* \
1100 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001101 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001102
Martin v. Löwiseba40652007-08-30 20:10:57 +00001103 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1104 ac_prev=pdfdir ;;
1105 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1106 pdfdir=$ac_optarg ;;
1107
1108 -psdir | --psdir | --psdi | --psd | --ps)
1109 ac_prev=psdir ;;
1110 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1111 psdir=$ac_optarg ;;
1112
Guido van Rossum7f43da71994-08-01 12:15:30 +00001113 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1114 | -silent | --silent | --silen | --sile | --sil)
1115 silent=yes ;;
1116
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001117 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1118 ac_prev=sbindir ;;
1119 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1120 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001121 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001122
1123 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1124 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1125 | --sharedst | --shareds | --shared | --share | --shar \
1126 | --sha | --sh)
1127 ac_prev=sharedstatedir ;;
1128 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1129 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1130 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1131 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001132 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001133
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001134 -site | --site | --sit)
1135 ac_prev=site ;;
1136 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001137 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001138
Guido van Rossum7f43da71994-08-01 12:15:30 +00001139 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1140 ac_prev=srcdir ;;
1141 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001142 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001143
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001144 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1145 | --syscon | --sysco | --sysc | --sys | --sy)
1146 ac_prev=sysconfdir ;;
1147 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1148 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001149 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001150
Guido van Rossum7f43da71994-08-01 12:15:30 +00001151 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001152 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001153 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001154 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001155
1156 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1157 verbose=yes ;;
1158
Martin v. Löwis11437992002-04-12 09:54:03 +00001159 -version | --version | --versio | --versi | --vers | -V)
1160 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001161
1162 -with-* | --with-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001163 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001164 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001165 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001166 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001167 ac_useropt_orig=$ac_useropt
1168 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1169 case $ac_user_opts in
1170 *"
1171"with_$ac_useropt"
1172"*) ;;
1173 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1174 ac_unrecognized_sep=', ';;
1175 esac
1176 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001177
1178 -without-* | --without-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001179 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001180 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001181 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001182 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001183 ac_useropt_orig=$ac_useropt
1184 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1185 case $ac_user_opts in
1186 *"
1187"with_$ac_useropt"
1188"*) ;;
1189 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1190 ac_unrecognized_sep=', ';;
1191 esac
1192 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001193
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001194 --x)
1195 # Obsolete; use --with-x.
1196 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001197
1198 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1199 | --x-incl | --x-inc | --x-in | --x-i)
1200 ac_prev=x_includes ;;
1201 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1202 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001203 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001204
1205 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1206 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1207 ac_prev=x_libraries ;;
1208 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1209 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001210 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001211
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001212 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1213Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001214 ;;
1215
Martin v. Löwis11437992002-04-12 09:54:03 +00001216 *=*)
1217 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1218 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001219 case $ac_envvar in #(
1220 '' | [0-9]* | *[!_$as_cr_alnum]* )
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001221 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001222 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001223 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001224 export $ac_envvar ;;
1225
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001226 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001227 # FIXME: should be removed in autoconf 3.0.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001228 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001229 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001230 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Matthias Klose3cef2a92012-03-14 23:39:33 +01001231 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001232 ;;
1233
1234 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001235done
1236
Guido van Rossum7f43da71994-08-01 12:15:30 +00001237if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001238 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001239 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001240fi
1241
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001242if test -n "$ac_unrecognized_opts"; then
1243 case $enable_option_checking in
1244 no) ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001245 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001246 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1247 esac
1248fi
1249
1250# Check all directory arguments for consistency.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001251for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1252 datadir sysconfdir sharedstatedir localstatedir includedir \
1253 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1254 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001255do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001256 eval ac_val=\$$ac_var
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001257 # Remove trailing slashes.
1258 case $ac_val in
1259 */ )
1260 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1261 eval $ac_var=\$ac_val;;
1262 esac
1263 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001264 case $ac_val in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001265 [\\/$]* | ?:[\\/]* ) continue;;
1266 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001267 esac
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001268 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001269done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001270
Martin v. Löwis11437992002-04-12 09:54:03 +00001271# There might be people who depend on the old broken behavior: `$host'
1272# used to hold the argument of --host etc.
1273# FIXME: To remove some day.
1274build=$build_alias
1275host=$host_alias
1276target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001277
Martin v. Löwis11437992002-04-12 09:54:03 +00001278# FIXME: To remove some day.
1279if test "x$host_alias" != x; then
1280 if test "x$build_alias" = x; then
1281 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001282 elif test "x$build_alias" != "x$host_alias"; then
1283 cross_compiling=yes
1284 fi
1285fi
1286
1287ac_tool_prefix=
1288test -n "$host_alias" && ac_tool_prefix=$host_alias-
1289
1290test "$silent" = yes && exec 6>/dev/null
1291
Guido van Rossum627b2d71993-12-24 10:39:16 +00001292
Martin v. Löwiseba40652007-08-30 20:10:57 +00001293ac_pwd=`pwd` && test -n "$ac_pwd" &&
1294ac_ls_di=`ls -di .` &&
1295ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001296 as_fn_error $? "working directory cannot be determined"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001297test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001298 as_fn_error $? "pwd does not report name of working directory"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001299
1300
Guido van Rossum627b2d71993-12-24 10:39:16 +00001301# Find the source files, if location was not specified.
1302if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001303 ac_srcdir_defaulted=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +00001304 # Try the directory containing this script, then the parent directory.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001305 ac_confdir=`$as_dirname -- "$as_myself" ||
1306$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1307 X"$as_myself" : 'X\(//\)[^/]' \| \
1308 X"$as_myself" : 'X\(//\)$' \| \
1309 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1310$as_echo X"$as_myself" |
Martin v. Löwiseba40652007-08-30 20:10:57 +00001311 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1312 s//\1/
1313 q
1314 }
1315 /^X\(\/\/\)[^/].*/{
1316 s//\1/
1317 q
1318 }
1319 /^X\(\/\/\)$/{
1320 s//\1/
1321 q
1322 }
1323 /^X\(\/\).*/{
1324 s//\1/
1325 q
1326 }
1327 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001328 srcdir=$ac_confdir
Martin v. Löwiseba40652007-08-30 20:10:57 +00001329 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001330 srcdir=..
1331 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001332else
1333 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001334fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001335if test ! -r "$srcdir/$ac_unique_file"; then
1336 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001337 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Brett Cannon19fab762007-06-02 03:02:29 +00001338fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001339ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1340ac_abs_confdir=`(
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001341 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001342 pwd)`
1343# When building in place, set srcdir=.
1344if test "$ac_abs_confdir" = "$ac_pwd"; then
1345 srcdir=.
1346fi
1347# Remove unnecessary trailing slashes from srcdir.
1348# Double slashes in file names in object file debugging info
1349# mess up M-x gdb in Emacs.
1350case $srcdir in
1351*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1352esac
1353for ac_var in $ac_precious_vars; do
1354 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1355 eval ac_env_${ac_var}_value=\$${ac_var}
1356 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1357 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1358done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001359
Martin v. Löwis11437992002-04-12 09:54:03 +00001360#
1361# Report the --help message.
1362#
1363if test "$ac_init_help" = "long"; then
1364 # Omit some internal or obsolete options to make the list less imposing.
1365 # This message is too long to be a string in the A/UX 3.1 sh.
1366 cat <<_ACEOF
Martin v. Löwis174440b2008-10-03 08:59:41 +00001367\`configure' configures python 2.7 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001368
1369Usage: $0 [OPTION]... [VAR=VALUE]...
1370
1371To assign environment variables (e.g., CC, CFLAGS...), specify them as
1372VAR=VALUE. See below for descriptions of some of the useful variables.
1373
1374Defaults for the options are specified in brackets.
1375
1376Configuration:
1377 -h, --help display this help and exit
1378 --help=short display options specific to this package
1379 --help=recursive display the short help of all the included packages
1380 -V, --version display version information and exit
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001381 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001382 --cache-file=FILE cache test results in FILE [disabled]
1383 -C, --config-cache alias for \`--cache-file=config.cache'
1384 -n, --no-create do not create output files
1385 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1386
Martin v. Löwis11437992002-04-12 09:54:03 +00001387Installation directories:
1388 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001389 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001390 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001391 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001392
1393By default, \`make install' will install all the files in
1394\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1395an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1396for instance \`--prefix=\$HOME'.
1397
1398For better control, use the options below.
1399
1400Fine tuning of the installation directories:
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001401 --bindir=DIR user executables [EPREFIX/bin]
1402 --sbindir=DIR system admin executables [EPREFIX/sbin]
1403 --libexecdir=DIR program executables [EPREFIX/libexec]
1404 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1405 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1406 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1407 --libdir=DIR object code libraries [EPREFIX/lib]
1408 --includedir=DIR C header files [PREFIX/include]
1409 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1410 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1411 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1412 --infodir=DIR info documentation [DATAROOTDIR/info]
1413 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1414 --mandir=DIR man documentation [DATAROOTDIR/man]
1415 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1416 --htmldir=DIR html documentation [DOCDIR]
1417 --dvidir=DIR dvi documentation [DOCDIR]
1418 --pdfdir=DIR pdf documentation [DOCDIR]
1419 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001420_ACEOF
1421
1422 cat <<\_ACEOF
doko@python.orgd65e2ba2013-01-31 23:52:03 +01001423
1424System types:
1425 --build=BUILD configure for building on BUILD [guessed]
1426 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001427_ACEOF
1428fi
1429
1430if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001431 case $ac_init_help in
Martin v. Löwis174440b2008-10-03 08:59:41 +00001432 short | recursive ) echo "Configuration of python 2.7:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001433 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001434 cat <<\_ACEOF
1435
1436Optional Features:
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001437 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001438 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1439 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Brett Cannon91a1dec2008-02-13 19:15:44 +00001440 --enable-universalsdk[=SDKDIR]
Brett Cannon9a8bb0e2008-02-03 02:07:55 +00001441 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001442 --enable-framework[=INSTALLDIR]
1443 Build (MacOSX|Darwin) framework
1444 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001445 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001446 --enable-toolbox-glue disable/enable MacOSX glue code for extensions
1447 --enable-ipv6 Enable ipv6 (with ipv4) support
1448 --disable-ipv6 Disable ipv6 support
Mark Dickinsonefc82f72009-03-20 15:51:55 +00001449 --enable-big-digits[=BITS]
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001450 use big digits for Python longs [[BITS=30]]
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001451 --enable-unicode[=ucs[24]]
Benjamin Peterson66556b02010-05-25 02:23:32 +00001452 Enable Unicode strings (default is ucs2)
Martin v. Löwis11437992002-04-12 09:54:03 +00001453
1454Optional Packages:
1455 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1456 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001457 --with-universal-archs=ARCH
1458 select architectures for universal build ("32-bit",
Ronald Oussoren23d92532009-09-07 06:12:00 +00001459 "64-bit", "3-way", "intel" or "all")
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001460 --with-framework-name=FRAMEWORK
1461 specify an alternate name of the framework built
1462 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001463 --without-gcc never use gcc
Martin v. Löwis0f48d982006-04-14 14:34:26 +00001464 --with-cxx-main=<compiler>
1465 compile main() and link python executable with C++
1466 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001467 --with-suffix=.exe set executable suffix
1468 --with-pydebug build with Py_DEBUG defined
1469 --with-libs='lib1 ...' link against additional libs
Benjamin Peterson2c196742009-12-31 03:17:18 +00001470 --with-system-expat build pyexpat module using an installed expat
1471 library
Martin v. Löwis9176fc12006-04-11 11:12:43 +00001472 --with-system-ffi build _ctypes module using an installed ffi library
Ned Deilya2a9f572013-10-25 00:30:10 -07001473 --with-tcltk-includes='-I...'
1474 override search for Tcl and Tk include files
1475 --with-tcltk-libs='-L...'
1476 override search for Tcl and Tk libs
Benjamin Peterson867475c2009-04-29 20:36:25 +00001477 --with-dbmliborder=db1:db2:...
1478 order to check db backends for dbm. Valid value is a
1479 colon separated string with the backend names
1480 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001481 --with-signal-module disable/enable signal module
1482 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1483 --with(out)-threads[=DIRECTORY]
1484 disable/enable thread support
1485 --with(out)-thread[=DIRECTORY]
1486 deprecated; use --with(out)-threads
1487 --with-pth use GNU pth threading libraries
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001488 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001489 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001490 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00001491 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001492 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001493 --with-fpectl enable SIGFPE catching
1494 --with-libm=STRING math library
1495 --with-libc=STRING C library
Ned Deily3f1d0b32014-11-20 02:11:03 -08001496 --with(out)-ensurepip=[=OPTION]
1497 "install" or "upgrade" using bundled pip, default is
1498 "no"
Martin v. Löwis11437992002-04-12 09:54:03 +00001499
1500Some influential environment variables:
1501 CC C compiler command
1502 CFLAGS C compiler flags
1503 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1504 nonstandard directory <lib dir>
Martin v. Löwiseba40652007-08-30 20:10:57 +00001505 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001506 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Martin v. Löwiseba40652007-08-30 20:10:57 +00001507 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001508 CPP C preprocessor
Benjamin Peterson64e8f6e2014-12-15 00:00:23 -05001509 PKG_CONFIG path to pkg-config utility
1510 PKG_CONFIG_PATH
1511 directories to add to pkg-config's search path
1512 PKG_CONFIG_LIBDIR
1513 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001514
1515Use these variables to override the choices made by `configure' or to help
1516it to find libraries and programs with nonstandard names/locations.
1517
Georg Brandl464432d2009-05-20 18:24:08 +00001518Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001519_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001520ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001521fi
1522
1523if test "$ac_init_help" = "recursive"; then
1524 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001525 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001526 test -d "$ac_dir" ||
1527 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1528 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001529 ac_builddir=.
1530
Martin v. Löwiseba40652007-08-30 20:10:57 +00001531case "$ac_dir" in
1532.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1533*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001534 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001535 # A ".." for each directory in $ac_dir_suffix.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001536 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001537 case $ac_top_builddir_sub in
1538 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1539 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1540 esac ;;
1541esac
1542ac_abs_top_builddir=$ac_pwd
1543ac_abs_builddir=$ac_pwd$ac_dir_suffix
1544# for backward compatibility:
1545ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001546
1547case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001548 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001549 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001550 ac_top_srcdir=$ac_top_builddir_sub
1551 ac_abs_top_srcdir=$ac_pwd ;;
1552 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001553 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001554 ac_top_srcdir=$srcdir
1555 ac_abs_top_srcdir=$srcdir ;;
1556 *) # Relative name.
1557 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1558 ac_top_srcdir=$ac_top_build_prefix$srcdir
1559 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001560esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001561ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001562
Martin v. Löwiseba40652007-08-30 20:10:57 +00001563 cd "$ac_dir" || { ac_status=$?; continue; }
1564 # Check for guested configure.
1565 if test -f "$ac_srcdir/configure.gnu"; then
1566 echo &&
1567 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1568 elif test -f "$ac_srcdir/configure"; then
1569 echo &&
1570 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001571 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001572 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001573 fi || ac_status=$?
1574 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001575 done
1576fi
1577
Martin v. Löwiseba40652007-08-30 20:10:57 +00001578test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001579if $ac_init_version; then
1580 cat <<\_ACEOF
Martin v. Löwis174440b2008-10-03 08:59:41 +00001581python configure 2.7
Charles-François Natalibe2b9072013-01-08 19:47:00 +01001582generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001583
Charles-François Natalibe2b9072013-01-08 19:47:00 +01001584Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001585This configure script is free software; the Free Software Foundation
1586gives unlimited permission to copy, distribute and modify it.
1587_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001588 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001589fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001590
1591## ------------------------ ##
1592## Autoconf initialization. ##
1593## ------------------------ ##
1594
1595# ac_fn_c_try_compile LINENO
1596# --------------------------
1597# Try to compile conftest.$ac_ext, and return whether this succeeded.
1598ac_fn_c_try_compile ()
1599{
1600 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1601 rm -f conftest.$ac_objext
1602 if { { ac_try="$ac_compile"
1603case "(($ac_try" in
1604 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1605 *) ac_try_echo=$ac_try;;
1606esac
1607eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1608$as_echo "$ac_try_echo"; } >&5
1609 (eval "$ac_compile") 2>conftest.err
1610 ac_status=$?
1611 if test -s conftest.err; then
1612 grep -v '^ *+' conftest.err >conftest.er1
1613 cat conftest.er1 >&5
1614 mv -f conftest.er1 conftest.err
1615 fi
1616 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1617 test $ac_status = 0; } && {
1618 test -z "$ac_c_werror_flag" ||
1619 test ! -s conftest.err
1620 } && test -s conftest.$ac_objext; then :
1621 ac_retval=0
1622else
1623 $as_echo "$as_me: failed program was:" >&5
1624sed 's/^/| /' conftest.$ac_ext >&5
1625
1626 ac_retval=1
1627fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01001628 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001629 as_fn_set_status $ac_retval
1630
1631} # ac_fn_c_try_compile
1632
1633# ac_fn_c_try_cpp LINENO
1634# ----------------------
1635# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1636ac_fn_c_try_cpp ()
1637{
1638 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1639 if { { ac_try="$ac_cpp conftest.$ac_ext"
1640case "(($ac_try" in
1641 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1642 *) ac_try_echo=$ac_try;;
1643esac
1644eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1645$as_echo "$ac_try_echo"; } >&5
1646 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1647 ac_status=$?
1648 if test -s conftest.err; then
1649 grep -v '^ *+' conftest.err >conftest.er1
1650 cat conftest.er1 >&5
1651 mv -f conftest.er1 conftest.err
1652 fi
1653 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001654 test $ac_status = 0; } > conftest.i && {
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001655 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1656 test ! -s conftest.err
1657 }; then :
1658 ac_retval=0
1659else
1660 $as_echo "$as_me: failed program was:" >&5
1661sed 's/^/| /' conftest.$ac_ext >&5
1662
1663 ac_retval=1
1664fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01001665 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001666 as_fn_set_status $ac_retval
1667
1668} # ac_fn_c_try_cpp
1669
1670# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1671# -------------------------------------------------------
1672# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1673# the include files in INCLUDES and setting the cache variable VAR
1674# accordingly.
1675ac_fn_c_check_header_mongrel ()
1676{
1677 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Matthias Klose3cef2a92012-03-14 23:39:33 +01001678 if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001679 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1680$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001681if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001682 $as_echo_n "(cached) " >&6
1683fi
1684eval ac_res=\$$3
1685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1686$as_echo "$ac_res" >&6; }
1687else
1688 # Is the header compilable?
1689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1690$as_echo_n "checking $2 usability... " >&6; }
1691cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1692/* end confdefs.h. */
1693$4
1694#include <$2>
1695_ACEOF
1696if ac_fn_c_try_compile "$LINENO"; then :
1697 ac_header_compiler=yes
1698else
1699 ac_header_compiler=no
1700fi
1701rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1702{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1703$as_echo "$ac_header_compiler" >&6; }
1704
1705# Is the header present?
1706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1707$as_echo_n "checking $2 presence... " >&6; }
1708cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1709/* end confdefs.h. */
1710#include <$2>
1711_ACEOF
1712if ac_fn_c_try_cpp "$LINENO"; then :
1713 ac_header_preproc=yes
1714else
1715 ac_header_preproc=no
1716fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001717rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001718{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1719$as_echo "$ac_header_preproc" >&6; }
1720
1721# So? What about this header?
1722case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1723 yes:no: )
1724 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1725$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1726 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1727$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1728 ;;
1729 no:yes:* )
1730 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1731$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1732 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1733$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1734 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1735$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1736 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1737$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1738 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1739$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001740( $as_echo "## -------------------------------------- ##
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001741## Report this to http://bugs.python.org/ ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001742## -------------------------------------- ##"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001743 ) | sed "s/^/$as_me: WARNING: /" >&2
1744 ;;
1745esac
1746 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1747$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001748if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001749 $as_echo_n "(cached) " >&6
1750else
1751 eval "$3=\$ac_header_compiler"
1752fi
1753eval ac_res=\$$3
1754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1755$as_echo "$ac_res" >&6; }
1756fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01001757 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001758
1759} # ac_fn_c_check_header_mongrel
1760
1761# ac_fn_c_try_run LINENO
1762# ----------------------
1763# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1764# that executables *can* be run.
1765ac_fn_c_try_run ()
1766{
1767 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1768 if { { ac_try="$ac_link"
1769case "(($ac_try" in
1770 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1771 *) ac_try_echo=$ac_try;;
1772esac
1773eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1774$as_echo "$ac_try_echo"; } >&5
1775 (eval "$ac_link") 2>&5
1776 ac_status=$?
1777 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1778 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1779 { { case "(($ac_try" in
1780 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1781 *) ac_try_echo=$ac_try;;
1782esac
1783eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1784$as_echo "$ac_try_echo"; } >&5
1785 (eval "$ac_try") 2>&5
1786 ac_status=$?
1787 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1788 test $ac_status = 0; }; }; then :
1789 ac_retval=0
1790else
1791 $as_echo "$as_me: program exited with status $ac_status" >&5
1792 $as_echo "$as_me: failed program was:" >&5
1793sed 's/^/| /' conftest.$ac_ext >&5
1794
1795 ac_retval=$ac_status
1796fi
1797 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Matthias Klose3cef2a92012-03-14 23:39:33 +01001798 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001799 as_fn_set_status $ac_retval
1800
1801} # ac_fn_c_try_run
1802
1803# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1804# -------------------------------------------------------
1805# Tests whether HEADER exists and can be compiled using the include files in
1806# INCLUDES, setting the cache variable VAR accordingly.
1807ac_fn_c_check_header_compile ()
1808{
1809 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1810 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1811$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001812if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001813 $as_echo_n "(cached) " >&6
1814else
1815 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1816/* end confdefs.h. */
1817$4
1818#include <$2>
1819_ACEOF
1820if ac_fn_c_try_compile "$LINENO"; then :
1821 eval "$3=yes"
1822else
1823 eval "$3=no"
1824fi
1825rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1826fi
1827eval ac_res=\$$3
1828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1829$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001830 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001831
1832} # ac_fn_c_check_header_compile
1833
1834# ac_fn_c_try_link LINENO
1835# -----------------------
1836# Try to link conftest.$ac_ext, and return whether this succeeded.
1837ac_fn_c_try_link ()
1838{
1839 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1840 rm -f conftest.$ac_objext conftest$ac_exeext
1841 if { { ac_try="$ac_link"
1842case "(($ac_try" in
1843 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1844 *) ac_try_echo=$ac_try;;
1845esac
1846eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1847$as_echo "$ac_try_echo"; } >&5
1848 (eval "$ac_link") 2>conftest.err
1849 ac_status=$?
1850 if test -s conftest.err; then
1851 grep -v '^ *+' conftest.err >conftest.er1
1852 cat conftest.er1 >&5
1853 mv -f conftest.er1 conftest.err
1854 fi
1855 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1856 test $ac_status = 0; } && {
1857 test -z "$ac_c_werror_flag" ||
1858 test ! -s conftest.err
1859 } && test -s conftest$ac_exeext && {
1860 test "$cross_compiling" = yes ||
Charles-François Natalibe2b9072013-01-08 19:47:00 +01001861 test -x conftest$ac_exeext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001862 }; then :
1863 ac_retval=0
1864else
1865 $as_echo "$as_me: failed program was:" >&5
1866sed 's/^/| /' conftest.$ac_ext >&5
1867
1868 ac_retval=1
1869fi
1870 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1871 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1872 # interfere with the next link command; also delete a directory that is
1873 # left behind by Apple's compiler. We do this before executing the actions.
1874 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Matthias Klose3cef2a92012-03-14 23:39:33 +01001875 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001876 as_fn_set_status $ac_retval
1877
1878} # ac_fn_c_try_link
1879
1880# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1881# -------------------------------------------
1882# Tests whether TYPE exists after having included INCLUDES, setting cache
1883# variable VAR accordingly.
1884ac_fn_c_check_type ()
1885{
1886 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1887 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1888$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001889if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001890 $as_echo_n "(cached) " >&6
1891else
1892 eval "$3=no"
1893 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1894/* end confdefs.h. */
1895$4
1896int
1897main ()
1898{
1899if (sizeof ($2))
1900 return 0;
1901 ;
1902 return 0;
1903}
1904_ACEOF
1905if ac_fn_c_try_compile "$LINENO"; then :
1906 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1907/* end confdefs.h. */
1908$4
1909int
1910main ()
1911{
1912if (sizeof (($2)))
1913 return 0;
1914 ;
1915 return 0;
1916}
1917_ACEOF
1918if ac_fn_c_try_compile "$LINENO"; then :
1919
1920else
1921 eval "$3=yes"
1922fi
1923rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1924fi
1925rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1926fi
1927eval ac_res=\$$3
1928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1929$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001930 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001931
1932} # ac_fn_c_check_type
1933
1934# ac_fn_c_find_uintX_t LINENO BITS VAR
1935# ------------------------------------
1936# Finds an unsigned integer type with width BITS, setting cache variable VAR
1937# accordingly.
1938ac_fn_c_find_uintX_t ()
1939{
1940 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1941 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1942$as_echo_n "checking for uint$2_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001943if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001944 $as_echo_n "(cached) " >&6
1945else
1946 eval "$3=no"
1947 # Order is important - never check a type that is potentially smaller
1948 # than half of the expected target width.
1949 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1950 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1951 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1952/* end confdefs.h. */
1953$ac_includes_default
1954int
1955main ()
1956{
1957static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01001958test_array [0] = 0;
1959return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001960
1961 ;
1962 return 0;
1963}
1964_ACEOF
1965if ac_fn_c_try_compile "$LINENO"; then :
1966 case $ac_type in #(
1967 uint$2_t) :
1968 eval "$3=yes" ;; #(
1969 *) :
1970 eval "$3=\$ac_type" ;;
1971esac
1972fi
1973rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001974 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001975
1976else
1977 break
1978fi
1979 done
1980fi
1981eval ac_res=\$$3
1982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1983$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001984 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001985
1986} # ac_fn_c_find_uintX_t
1987
1988# ac_fn_c_find_intX_t LINENO BITS VAR
1989# -----------------------------------
1990# Finds a signed integer type with width BITS, setting cache variable VAR
1991# accordingly.
1992ac_fn_c_find_intX_t ()
1993{
1994 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1995 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
1996$as_echo_n "checking for int$2_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001997if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001998 $as_echo_n "(cached) " >&6
1999else
2000 eval "$3=no"
2001 # Order is important - never check a type that is potentially smaller
2002 # than half of the expected target width.
2003 for ac_type in int$2_t 'int' 'long int' \
2004 'long long int' 'short int' 'signed char'; do
2005 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2006/* end confdefs.h. */
2007$ac_includes_default
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002008 enum { N = $2 / 2 - 1 };
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002009int
2010main ()
2011{
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002012static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002013test_array [0] = 0;
2014return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002015
2016 ;
2017 return 0;
2018}
2019_ACEOF
2020if ac_fn_c_try_compile "$LINENO"; then :
2021 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2022/* end confdefs.h. */
2023$ac_includes_default
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002024 enum { N = $2 / 2 - 1 };
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002025int
2026main ()
2027{
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002028static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002029 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002030test_array [0] = 0;
2031return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002032
2033 ;
2034 return 0;
2035}
2036_ACEOF
2037if ac_fn_c_try_compile "$LINENO"; then :
2038
2039else
2040 case $ac_type in #(
2041 int$2_t) :
2042 eval "$3=yes" ;; #(
2043 *) :
2044 eval "$3=\$ac_type" ;;
2045esac
2046fi
2047rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2048fi
2049rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002050 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002051
2052else
2053 break
2054fi
2055 done
2056fi
2057eval ac_res=\$$3
2058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2059$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002060 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002061
2062} # ac_fn_c_find_intX_t
2063
2064# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2065# --------------------------------------------
2066# Tries to find the compile-time value of EXPR in a program that includes
2067# INCLUDES, setting VAR accordingly. Returns whether the value could be
2068# computed
2069ac_fn_c_compute_int ()
2070{
2071 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2072 if test "$cross_compiling" = yes; then
2073 # Depending upon the size, compute the lo and hi bounds.
2074cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2075/* end confdefs.h. */
2076$4
2077int
2078main ()
2079{
2080static int test_array [1 - 2 * !(($2) >= 0)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002081test_array [0] = 0;
2082return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002083
2084 ;
2085 return 0;
2086}
2087_ACEOF
2088if ac_fn_c_try_compile "$LINENO"; then :
2089 ac_lo=0 ac_mid=0
2090 while :; do
2091 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2092/* end confdefs.h. */
2093$4
2094int
2095main ()
2096{
2097static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002098test_array [0] = 0;
2099return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002100
2101 ;
2102 return 0;
2103}
2104_ACEOF
2105if ac_fn_c_try_compile "$LINENO"; then :
2106 ac_hi=$ac_mid; break
2107else
2108 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2109 if test $ac_lo -le $ac_mid; then
2110 ac_lo= ac_hi=
2111 break
2112 fi
2113 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2114fi
2115rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2116 done
2117else
2118 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2119/* end confdefs.h. */
2120$4
2121int
2122main ()
2123{
2124static int test_array [1 - 2 * !(($2) < 0)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002125test_array [0] = 0;
2126return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002127
2128 ;
2129 return 0;
2130}
2131_ACEOF
2132if ac_fn_c_try_compile "$LINENO"; then :
2133 ac_hi=-1 ac_mid=-1
2134 while :; do
2135 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2136/* end confdefs.h. */
2137$4
2138int
2139main ()
2140{
2141static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002142test_array [0] = 0;
2143return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002144
2145 ;
2146 return 0;
2147}
2148_ACEOF
2149if ac_fn_c_try_compile "$LINENO"; then :
2150 ac_lo=$ac_mid; break
2151else
2152 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2153 if test $ac_mid -le $ac_hi; then
2154 ac_lo= ac_hi=
2155 break
2156 fi
2157 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2158fi
2159rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2160 done
2161else
2162 ac_lo= ac_hi=
2163fi
2164rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2165fi
2166rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2167# Binary search between lo and hi bounds.
2168while test "x$ac_lo" != "x$ac_hi"; do
2169 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2170 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2171/* end confdefs.h. */
2172$4
2173int
2174main ()
2175{
2176static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002177test_array [0] = 0;
2178return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002179
2180 ;
2181 return 0;
2182}
2183_ACEOF
2184if ac_fn_c_try_compile "$LINENO"; then :
2185 ac_hi=$ac_mid
2186else
2187 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2188fi
2189rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2190done
2191case $ac_lo in #((
2192?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2193'') ac_retval=1 ;;
2194esac
2195 else
2196 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2197/* end confdefs.h. */
2198$4
2199static long int longval () { return $2; }
2200static unsigned long int ulongval () { return $2; }
2201#include <stdio.h>
2202#include <stdlib.h>
2203int
2204main ()
2205{
2206
2207 FILE *f = fopen ("conftest.val", "w");
2208 if (! f)
2209 return 1;
2210 if (($2) < 0)
2211 {
2212 long int i = longval ();
2213 if (i != ($2))
2214 return 1;
2215 fprintf (f, "%ld", i);
2216 }
2217 else
2218 {
2219 unsigned long int i = ulongval ();
2220 if (i != ($2))
2221 return 1;
2222 fprintf (f, "%lu", i);
2223 }
2224 /* Do not output a trailing newline, as this causes \r\n confusion
2225 on some platforms. */
2226 return ferror (f) || fclose (f) != 0;
2227
2228 ;
2229 return 0;
2230}
2231_ACEOF
2232if ac_fn_c_try_run "$LINENO"; then :
2233 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2234else
2235 ac_retval=1
2236fi
2237rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2238 conftest.$ac_objext conftest.beam conftest.$ac_ext
2239rm -f conftest.val
2240
2241 fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01002242 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002243 as_fn_set_status $ac_retval
2244
2245} # ac_fn_c_compute_int
2246
2247# ac_fn_c_check_func LINENO FUNC VAR
2248# ----------------------------------
2249# Tests whether FUNC exists, setting the cache variable VAR accordingly
2250ac_fn_c_check_func ()
2251{
2252 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2253 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2254$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002255if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002256 $as_echo_n "(cached) " >&6
2257else
2258 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2259/* end confdefs.h. */
2260/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2261 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2262#define $2 innocuous_$2
2263
2264/* System header to define __stub macros and hopefully few prototypes,
2265 which can conflict with char $2 (); below.
2266 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2267 <limits.h> exists even on freestanding compilers. */
2268
2269#ifdef __STDC__
2270# include <limits.h>
2271#else
2272# include <assert.h>
2273#endif
2274
2275#undef $2
2276
2277/* Override any GCC internal prototype to avoid an error.
2278 Use char because int might match the return type of a GCC
2279 builtin and then its argument prototype would still apply. */
2280#ifdef __cplusplus
2281extern "C"
2282#endif
2283char $2 ();
2284/* The GNU C library defines this for functions which it implements
2285 to always fail with ENOSYS. Some functions are actually named
2286 something starting with __ and the normal name is an alias. */
2287#if defined __stub_$2 || defined __stub___$2
2288choke me
2289#endif
2290
2291int
2292main ()
2293{
2294return $2 ();
2295 ;
2296 return 0;
2297}
2298_ACEOF
2299if ac_fn_c_try_link "$LINENO"; then :
2300 eval "$3=yes"
2301else
2302 eval "$3=no"
2303fi
2304rm -f core conftest.err conftest.$ac_objext \
2305 conftest$ac_exeext conftest.$ac_ext
2306fi
2307eval ac_res=\$$3
2308 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2309$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002310 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002311
2312} # ac_fn_c_check_func
2313
2314# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2315# ----------------------------------------------------
2316# Tries to find if the field MEMBER exists in type AGGR, after including
2317# INCLUDES, setting cache variable VAR accordingly.
2318ac_fn_c_check_member ()
2319{
2320 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2321 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2322$as_echo_n "checking for $2.$3... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002323if eval \${$4+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002324 $as_echo_n "(cached) " >&6
2325else
2326 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2327/* end confdefs.h. */
2328$5
2329int
2330main ()
2331{
2332static $2 ac_aggr;
2333if (ac_aggr.$3)
2334return 0;
2335 ;
2336 return 0;
2337}
2338_ACEOF
2339if ac_fn_c_try_compile "$LINENO"; then :
2340 eval "$4=yes"
2341else
2342 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2343/* end confdefs.h. */
2344$5
2345int
2346main ()
2347{
2348static $2 ac_aggr;
2349if (sizeof ac_aggr.$3)
2350return 0;
2351 ;
2352 return 0;
2353}
2354_ACEOF
2355if ac_fn_c_try_compile "$LINENO"; then :
2356 eval "$4=yes"
2357else
2358 eval "$4=no"
2359fi
2360rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2361fi
2362rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2363fi
2364eval ac_res=\$$4
2365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2366$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002367 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002368
2369} # ac_fn_c_check_member
2370
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002371# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2372# ---------------------------------------------
2373# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2374# accordingly.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002375ac_fn_c_check_decl ()
2376{
2377 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002378 as_decl_name=`echo $2|sed 's/ *(.*//'`
2379 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2380 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2381$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002382if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002383 $as_echo_n "(cached) " >&6
2384else
2385 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2386/* end confdefs.h. */
2387$4
2388int
2389main ()
2390{
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002391#ifndef $as_decl_name
2392#ifdef __cplusplus
2393 (void) $as_decl_use;
2394#else
2395 (void) $as_decl_name;
2396#endif
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002397#endif
2398
2399 ;
2400 return 0;
2401}
2402_ACEOF
2403if ac_fn_c_try_compile "$LINENO"; then :
2404 eval "$3=yes"
2405else
2406 eval "$3=no"
2407fi
2408rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2409fi
2410eval ac_res=\$$3
2411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2412$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002413 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002414
2415} # ac_fn_c_check_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +00002416cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002417This file contains any messages produced by compilers while
2418running configure, to aid debugging if configure makes a mistake.
2419
Martin v. Löwis174440b2008-10-03 08:59:41 +00002420It was created by python $as_me 2.7, which was
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002421generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002422
2423 $ $0 $@
2424
2425_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00002426exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002427{
2428cat <<_ASUNAME
2429## --------- ##
2430## Platform. ##
2431## --------- ##
2432
2433hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2434uname -m = `(uname -m) 2>/dev/null || echo unknown`
2435uname -r = `(uname -r) 2>/dev/null || echo unknown`
2436uname -s = `(uname -s) 2>/dev/null || echo unknown`
2437uname -v = `(uname -v) 2>/dev/null || echo unknown`
2438
2439/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2440/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2441
2442/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2443/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2444/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Martin v. Löwiseba40652007-08-30 20:10:57 +00002445/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002446/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2447/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2448/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2449
2450_ASUNAME
2451
2452as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2453for as_dir in $PATH
2454do
2455 IFS=$as_save_IFS
2456 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002457 $as_echo "PATH: $as_dir"
2458 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002459IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002460
2461} >&5
2462
2463cat >&5 <<_ACEOF
2464
2465
2466## ----------- ##
2467## Core tests. ##
2468## ----------- ##
2469
2470_ACEOF
2471
2472
2473# Keep a trace of the command line.
2474# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002475# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002476# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002477# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002478ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002479ac_configure_args0=
2480ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002481ac_must_keep_next=false
2482for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002483do
Skip Montanaro6dead952003-09-25 14:50:04 +00002484 for ac_arg
2485 do
2486 case $ac_arg in
2487 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2488 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2489 | -silent | --silent | --silen | --sile | --sil)
2490 continue ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002491 *\'*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002492 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002493 esac
2494 case $ac_pass in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002495 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002496 2)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002497 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002498 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002499 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002500 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002501 case $ac_arg in
2502 *=* | --config-cache | -C | -disable-* | --disable-* \
2503 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2504 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2505 | -with-* | --with-* | -without-* | --without-* | --x)
2506 case "$ac_configure_args0 " in
2507 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2508 esac
2509 ;;
2510 -* ) ac_must_keep_next=true ;;
2511 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002512 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002513 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002514 ;;
2515 esac
2516 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002517done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002518{ ac_configure_args0=; unset ac_configure_args0;}
2519{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002520
2521# When interrupted or exit'd, cleanup temporary files, and complete
2522# config.log. We remove comments because anyway the quotes in there
2523# would cause problems or look ugly.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002524# WARNING: Use '\'' to represent an apostrophe within the trap.
2525# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
Martin v. Löwis11437992002-04-12 09:54:03 +00002526trap 'exit_status=$?
2527 # Save into config.log some information that might help in debugging.
2528 {
2529 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002530
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002531 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002532## Cache variables. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002533## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002534 echo
2535 # The following way of writing the cache mishandles newlines in values,
Martin v. Löwiseba40652007-08-30 20:10:57 +00002536(
2537 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2538 eval ac_val=\$$ac_var
2539 case $ac_val in #(
2540 *${as_nl}*)
2541 case $ac_var in #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002542 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2543$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002544 esac
2545 case $ac_var in #(
2546 _ | IFS | as_nl) ;; #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002547 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2548 *) { eval $ac_var=; unset $ac_var;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002549 esac ;;
2550 esac
2551 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002552 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +00002553 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2554 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002555 sed -n \
Martin v. Löwiseba40652007-08-30 20:10:57 +00002556 "s/'\''/'\''\\\\'\'''\''/g;
2557 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2558 ;; #(
Skip Montanaro89e975f2007-08-22 19:05:21 +00002559 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00002560 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaro89e975f2007-08-22 19:05:21 +00002561 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002562 esac |
2563 sort
2564)
Martin v. Löwis11437992002-04-12 09:54:03 +00002565 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002566
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002567 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002568## Output variables. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002569## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002570 echo
2571 for ac_var in $ac_subst_vars
2572 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002573 eval ac_val=\$$ac_var
2574 case $ac_val in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002575 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002576 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002577 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002578 done | sort
2579 echo
2580
2581 if test -n "$ac_subst_files"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002582 $as_echo "## ------------------- ##
Martin v. Löwiseba40652007-08-30 20:10:57 +00002583## File substitutions. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002584## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002585 echo
2586 for ac_var in $ac_subst_files
2587 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002588 eval ac_val=\$$ac_var
2589 case $ac_val in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002590 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002591 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002592 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002593 done | sort
2594 echo
2595 fi
2596
Martin v. Löwis11437992002-04-12 09:54:03 +00002597 if test -s confdefs.h; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002598 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002599## confdefs.h. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002600## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002601 echo
Martin v. Löwiseba40652007-08-30 20:10:57 +00002602 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002603 echo
2604 fi
2605 test "$ac_signal" != 0 &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002606 $as_echo "$as_me: caught signal $ac_signal"
2607 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002608 } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002609 rm -f core *.core core.conftest.* &&
2610 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002611 exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +00002612' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002613for ac_signal in 1 2 13 15; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002614 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002615done
2616ac_signal=0
2617
2618# confdefs.h avoids OS command line length limits that DEFS can exceed.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002619rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002620
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002621$as_echo "/* confdefs.h */" > confdefs.h
2622
Martin v. Löwis11437992002-04-12 09:54:03 +00002623# Predefined preprocessor variables.
2624
2625cat >>confdefs.h <<_ACEOF
2626#define PACKAGE_NAME "$PACKAGE_NAME"
2627_ACEOF
2628
Martin v. Löwis11437992002-04-12 09:54:03 +00002629cat >>confdefs.h <<_ACEOF
2630#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2631_ACEOF
2632
Martin v. Löwis11437992002-04-12 09:54:03 +00002633cat >>confdefs.h <<_ACEOF
2634#define PACKAGE_VERSION "$PACKAGE_VERSION"
2635_ACEOF
2636
Martin v. Löwis11437992002-04-12 09:54:03 +00002637cat >>confdefs.h <<_ACEOF
2638#define PACKAGE_STRING "$PACKAGE_STRING"
2639_ACEOF
2640
Martin v. Löwis11437992002-04-12 09:54:03 +00002641cat >>confdefs.h <<_ACEOF
2642#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2643_ACEOF
2644
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002645cat >>confdefs.h <<_ACEOF
2646#define PACKAGE_URL "$PACKAGE_URL"
2647_ACEOF
2648
Martin v. Löwis11437992002-04-12 09:54:03 +00002649
2650# Let the site file select an alternate cache file if it wants to.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002651# Prefer an explicitly selected file to automatically selected ones.
2652ac_site_file1=NONE
2653ac_site_file2=NONE
Martin v. Löwiseba40652007-08-30 20:10:57 +00002654if test -n "$CONFIG_SITE"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002655 # We do not want a PATH search for config.site.
2656 case $CONFIG_SITE in #((
2657 -*) ac_site_file1=./$CONFIG_SITE;;
2658 */*) ac_site_file1=$CONFIG_SITE;;
2659 *) ac_site_file1=./$CONFIG_SITE;;
2660 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00002661elif test "x$prefix" != xNONE; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002662 ac_site_file1=$prefix/share/config.site
2663 ac_site_file2=$prefix/etc/config.site
Martin v. Löwiseba40652007-08-30 20:10:57 +00002664else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002665 ac_site_file1=$ac_default_prefix/share/config.site
2666 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002667fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002668for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Martin v. Löwiseba40652007-08-30 20:10:57 +00002669do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002670 test "x$ac_site_file" = xNONE && continue
2671 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2672 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2673$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002674 sed 's/^/| /' "$ac_site_file" >&5
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002675 . "$ac_site_file" \
2676 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2677$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2678as_fn_error $? "failed to load site script $ac_site_file
Matthias Klose3cef2a92012-03-14 23:39:33 +01002679See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002680 fi
2681done
2682
2683if test -r "$cache_file"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002684 # Some versions of bash will fail to source /dev/null (special files
2685 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2686 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2687 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2688$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002689 case $cache_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00002690 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2691 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002692 esac
2693 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002694else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002695 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2696$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002697 >$cache_file
2698fi
2699
2700# Check that the precious variables saved in the cache have kept the same
2701# value.
2702ac_cache_corrupted=false
Martin v. Löwiseba40652007-08-30 20:10:57 +00002703for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002704 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2705 eval ac_new_set=\$ac_env_${ac_var}_set
Martin v. Löwiseba40652007-08-30 20:10:57 +00002706 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2707 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002708 case $ac_old_set,$ac_new_set in
2709 set,)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002710 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2711$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002712 ac_cache_corrupted=: ;;
2713 ,set)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002714 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2715$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002716 ac_cache_corrupted=: ;;
2717 ,);;
2718 *)
2719 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002720 # differences in whitespace do not lead to failure.
2721 ac_old_val_w=`echo x $ac_old_val`
2722 ac_new_val_w=`echo x $ac_new_val`
2723 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2724 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2725$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2726 ac_cache_corrupted=:
2727 else
2728 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2729$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2730 eval $ac_var=\$ac_old_val
2731 fi
2732 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2733$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2734 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2735$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002736 fi;;
2737 esac
2738 # Pass precious variables to config.status.
2739 if test "$ac_new_set" = set; then
2740 case $ac_new_val in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002741 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002742 *) ac_arg=$ac_var=$ac_new_val ;;
2743 esac
2744 case " $ac_configure_args " in
2745 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002746 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002747 esac
2748 fi
2749done
2750if $ac_cache_corrupted; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002751 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2752$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2753 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2754$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002755 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002756fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002757## -------------------- ##
2758## Main body of script. ##
2759## -------------------- ##
Martin v. Löwiseba40652007-08-30 20:10:57 +00002760
Guido van Rossum7f43da71994-08-01 12:15:30 +00002761ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002762ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002763ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2764ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2765ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002766
Guido van Rossum627b2d71993-12-24 10:39:16 +00002767
Michael W. Hudson54241132001-12-07 15:38:26 +00002768
Martin v. Löwiseba40652007-08-30 20:10:57 +00002769ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002770
2771
doko@python.orgd65e2ba2013-01-31 23:52:03 +01002772ac_aux_dir=
2773for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2774 if test -f "$ac_dir/install-sh"; then
2775 ac_aux_dir=$ac_dir
2776 ac_install_sh="$ac_aux_dir/install-sh -c"
2777 break
2778 elif test -f "$ac_dir/install.sh"; then
2779 ac_aux_dir=$ac_dir
2780 ac_install_sh="$ac_aux_dir/install.sh -c"
2781 break
2782 elif test -f "$ac_dir/shtool"; then
2783 ac_aux_dir=$ac_dir
2784 ac_install_sh="$ac_aux_dir/shtool install -c"
2785 break
2786 fi
2787done
2788if test -z "$ac_aux_dir"; then
2789 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2790fi
2791
2792# These three variables are undocumented and unsupported,
2793# and are intended to be withdrawn in a future Autoconf release.
2794# They can cause serious problems if a builder's source tree is in a directory
2795# whose full name contains unusual characters.
2796ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2797ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2798ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2799
2800
2801# Make sure we can run config.sub.
2802$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2803 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2804
2805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2806$as_echo_n "checking build system type... " >&6; }
2807if ${ac_cv_build+:} false; then :
2808 $as_echo_n "(cached) " >&6
2809else
2810 ac_build_alias=$build_alias
2811test "x$ac_build_alias" = x &&
2812 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2813test "x$ac_build_alias" = x &&
2814 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2815ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2816 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2817
2818fi
2819{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2820$as_echo "$ac_cv_build" >&6; }
2821case $ac_cv_build in
2822*-*-*) ;;
2823*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2824esac
2825build=$ac_cv_build
2826ac_save_IFS=$IFS; IFS='-'
2827set x $ac_cv_build
2828shift
2829build_cpu=$1
2830build_vendor=$2
2831shift; shift
2832# Remember, the first character of IFS is used to create $*,
2833# except with old shells:
2834build_os=$*
2835IFS=$ac_save_IFS
2836case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2837
2838
2839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2840$as_echo_n "checking host system type... " >&6; }
2841if ${ac_cv_host+:} false; then :
2842 $as_echo_n "(cached) " >&6
2843else
2844 if test "x$host_alias" = x; then
2845 ac_cv_host=$ac_cv_build
2846else
2847 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2848 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2849fi
2850
2851fi
2852{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2853$as_echo "$ac_cv_host" >&6; }
2854case $ac_cv_host in
2855*-*-*) ;;
2856*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2857esac
2858host=$ac_cv_host
2859ac_save_IFS=$IFS; IFS='-'
2860set x $ac_cv_host
2861shift
2862host_cpu=$1
2863host_vendor=$2
2864shift; shift
2865# Remember, the first character of IFS is used to create $*,
2866# except with old shells:
2867host_os=$*
2868IFS=$ac_save_IFS
2869case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2870
2871
2872
2873
2874
Ned Deily983df862014-08-22 13:30:59 -07002875# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2876rm -f pybuilddir.txt
2877
doko@python.orgd65e2ba2013-01-31 23:52:03 +01002878if test "$cross_compiling" = yes; then
2879 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2880$as_echo_n "checking for python interpreter for cross build... " >&6; }
2881 if test -z "$PYTHON_FOR_BUILD"; then
2882 for interp in python$PACKAGE_VERSION python2 python; do
2883 which $interp >/dev/null 2>&1 || continue
2884 if $interp -c 'import sys;sys.exit(not (sys.version_info[:2] >= (2,7) and sys.version_info[0] < 3))'; then
2885 break
2886 fi
2887 interp=
2888 done
2889 if test x$interp = x; then
2890 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2891 fi
2892 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2893$as_echo "$interp" >&6; }
2894 PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib:$(srcdir)/Lib/plat-$(MACHDEP) '$interp
2895 fi
2896elif test "$cross_compiling" = maybe; then
2897 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
2898else
2899 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2900fi
2901
2902
Martin v. Löwis11437992002-04-12 09:54:03 +00002903
Georg Brandlbcd64a32009-03-31 21:45:18 +00002904if test "$prefix" != "/"; then
2905 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2906fi
2907
2908
Martin v. Löwis11437992002-04-12 09:54:03 +00002909
2910
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002911# We don't use PACKAGE_ variables, and they cause conflicts
2912# with other autoconf-based packages that include Python.h
2913grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2914rm confdefs.h
2915mv confdefs.h.new confdefs.h
2916
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002917
Martin v. Löwis174440b2008-10-03 08:59:41 +00002918VERSION=2.7
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002919
Martin v. Löwis1142de32002-03-29 16:28:31 +00002920
2921SOVERSION=1.0
2922
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002923# The later defininition of _XOPEN_SOURCE disables certain features
2924# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2925
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002926$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002927
2928
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002929# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2930# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2931# them.
2932
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002933$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002934
2935
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002936# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2937# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2938# them.
2939
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002940$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002941
2942
Martin v. Löwisd6320502004-08-12 13:45:08 +00002943# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2944# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2945
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002946$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002947
2948
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002949# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2950# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2951# them.
2952
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002953$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002954
2955
2956
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002957define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002958
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002959# Arguments passed to configure.
2960
2961CONFIG_ARGS="$ac_configure_args"
2962
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
2964$as_echo_n "checking for --enable-universalsdk... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002965# Check whether --enable-universalsdk was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002966if test "${enable_universalsdk+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00002967 enableval=$enable_universalsdk;
Ronald Oussoren988117f2006-04-29 11:31:35 +00002968 case $enableval in
2969 yes)
2970 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002971 if test ! -d "${enableval}"
2972 then
2973 enableval=/
2974 fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00002975 ;;
2976 esac
2977 case $enableval in
2978 no)
2979 UNIVERSALSDK=
2980 enable_universalsdk=
2981 ;;
2982 *)
2983 UNIVERSALSDK=$enableval
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002984 if test ! -d "${UNIVERSALSDK}"
2985 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002986 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002987 fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00002988 ;;
2989 esac
2990
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002991
Ronald Oussoren988117f2006-04-29 11:31:35 +00002992else
2993
2994 UNIVERSALSDK=
2995 enable_universalsdk=
2996
Martin v. Löwiseba40652007-08-30 20:10:57 +00002997fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00002998
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002999if test -n "${UNIVERSALSDK}"
3000then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3002$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003003else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3005$as_echo "no" >&6; }
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003006fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00003007
Martin v. Löwiseba40652007-08-30 20:10:57 +00003008
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +00003009
Ned Deily8e60f6e2013-05-30 00:14:29 -07003010ARCH_RUN_32BIT=""
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +00003011
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003012UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren92919a62009-12-24 13:30:58 +00003013
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3015$as_echo_n "checking for --with-universal-archs... " >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003016
3017# Check whether --with-universal-archs was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003018if test "${with_universal_archs+set}" = set; then :
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003019 withval=$with_universal_archs;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
3021$as_echo "$withval" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003022 UNIVERSAL_ARCHS="$withval"
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00003023 if test "${enable_universalsdk}" ; then
3024 :
3025 else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003026 as_fn_error $? "--with-universal-archs without --enable-universalsdk. See Mac/README" "$LINENO" 5
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00003027 fi
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003028
3029else
3030
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 32-bit" >&5
3032$as_echo "32-bit" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003033
3034fi
3035
3036
3037
3038
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003039
3040# Check whether --with-framework-name was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003041if test "${with_framework_name+set}" = set; then :
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003042 withval=$with_framework_name;
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00003043 if test "${enable_framework}"; then
3044 :
3045 else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003046 as_fn_error $? "--with-framework-name without --enable-framework. See Mac/README" "$LINENO" 5
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00003047 fi
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003048 PYTHONFRAMEWORK=${withval}
3049 PYTHONFRAMEWORKDIR=${withval}.framework
3050 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3051
3052else
3053
3054 PYTHONFRAMEWORK=Python
3055 PYTHONFRAMEWORKDIR=Python.framework
3056 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3057
3058fi
3059
Martin v. Löwiseba40652007-08-30 20:10:57 +00003060# Check whether --enable-framework was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003061if test "${enable_framework+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003062 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003063 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003064 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003065 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003066 esac
3067 case $enableval in
3068 no)
3069 PYTHONFRAMEWORK=
3070 PYTHONFRAMEWORKDIR=no-framework
3071 PYTHONFRAMEWORKPREFIX=
3072 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00003073 FRAMEWORKINSTALLFIRST=
3074 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00003075 FRAMEWORKALTINSTALLFIRST=
3076 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00003077 if test "x${prefix}" = "xNONE"; then
3078 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3079 else
3080 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3081 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003082 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003083 ;;
3084 *)
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003085 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003086 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00003087 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003088 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure bininstall maninstall"
Ronald Oussoren92919a62009-12-24 13:30:58 +00003089 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3090 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003091 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003092
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00003093 if test "x${prefix}" = "xNONE" ; then
3094 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003095
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00003096 else
3097 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3098 fi
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003099
3100 case "${enableval}" in
3101 /System*)
3102 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3103 if test "${prefix}" = "NONE" ; then
3104 # See below
3105 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3106 fi
3107 ;;
3108
3109 /Library*)
3110 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3111 ;;
3112
3113 */Library/Frameworks)
3114 MDIR="`dirname "${enableval}"`"
3115 MDIR="`dirname "${MDIR}"`"
3116 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3117
3118 if test "${prefix}" = "NONE"; then
3119 # User hasn't specified the
3120 # --prefix option, but wants to install
3121 # the framework in a non-default location,
3122 # ensure that the compatibility links get
3123 # installed relative to that prefix as well
3124 # instead of in /usr/local.
3125 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3126 fi
3127 ;;
3128
3129 *)
3130 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3131 ;;
3132 esac
3133
Jack Jansen127e56e2001-09-11 14:41:54 +00003134 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Ronald Oussoren836b0392006-05-14 19:56:34 +00003135
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003136 # Add files for Mac specific code to the list of output
Ronald Oussoren836b0392006-05-14 19:56:34 +00003137 # files:
Martin v. Löwiseba40652007-08-30 20:10:57 +00003138 ac_config_files="$ac_config_files Mac/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00003139
Martin v. Löwiseba40652007-08-30 20:10:57 +00003140 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00003141
Martin v. Löwiseba40652007-08-30 20:10:57 +00003142 ac_config_files="$ac_config_files Mac/IDLE/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00003143
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003144 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3145
3146 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3147
Jack Jansene578a632001-08-15 01:27:14 +00003148 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003149
Guido van Rossum563e7081996-09-10 18:20:48 +00003150else
Martin v. Löwis11437992002-04-12 09:54:03 +00003151
Jack Jansene578a632001-08-15 01:27:14 +00003152 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003153 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003154 PYTHONFRAMEWORKPREFIX=
3155 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00003156 FRAMEWORKINSTALLFIRST=
3157 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00003158 FRAMEWORKALTINSTALLFIRST=
3159 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00003160 if test "x${prefix}" = "xNONE" ; then
3161 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3162 else
3163 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3164 fi
Jack Jansene578a632001-08-15 01:27:14 +00003165 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003166
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003167
Martin v. Löwiseba40652007-08-30 20:10:57 +00003168fi
3169
Michael W. Hudson54241132001-12-07 15:38:26 +00003170
3171
3172
3173
Jack Jansene578a632001-08-15 01:27:14 +00003174
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00003175
3176
Ronald Oussoren5b787322006-06-06 19:50:24 +00003177
3178
3179
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003180
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003181
Jack Jansene578a632001-08-15 01:27:14 +00003182##AC_ARG_WITH(dyld,
Matthias Klose22520ea2010-05-08 10:14:46 +00003183## AS_HELP_STRING([--with-dyld],
3184## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003185##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003186# Set name for machine-dependent library files
3187
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3189$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003190if test -z "$MACHDEP"
3191then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003192 # avoid using uname for cross builds
3193 if test "$cross_compiling" = yes; then
3194 # ac_sys_system and ac_sys_release are only used for setting
3195 # `define_xopen_source' in the case statement below. For the
3196 # current supported cross builds, this macro is not adjusted.
3197 case "$host" in
3198 *-*-linux*)
3199 ac_sys_system=Linux
3200 ;;
3201 *-*-cygwin*)
3202 ac_sys_system=Cygwin
3203 ;;
3204 *)
3205 # for now, limit cross builds to known configurations
3206 MACHDEP="unknown"
3207 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3208 esac
3209 ac_sys_release=
3210 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003211 ac_sys_system=`uname -s`
Georg Brandlfe18a112009-09-04 07:55:14 +00003212 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003213 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003214 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003215 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003216 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003217 fi
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003218 fi
3219 ac_md_system=`echo $ac_sys_system |
3220 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3221 ac_md_release=`echo $ac_sys_release |
3222 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3223 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003224
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003225 case $MACHDEP in
Victor Stinneracacbaa2011-08-20 14:02:38 +02003226 linux*) MACHDEP="linux2";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003227 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003228 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003229 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00003230 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003231 '') MACHDEP="unknown";;
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003232 esac
3233fi
3234
3235
3236if test "$cross_compiling" = yes; then
3237 case "$host" in
3238 *-*-linux*)
3239 case "$host_cpu" in
3240 arm*)
3241 _host_cpu=arm
3242 ;;
3243 *)
3244 _host_cpu=$host_cpu
3245 esac
3246 ;;
3247 *-*-cygwin*)
3248 _host_cpu=
3249 ;;
3250 *)
3251 # for now, limit cross builds to known configurations
3252 MACHDEP="unknown"
3253 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003254 esac
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003255 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003256fi
Guido van Rossum91922671997-10-09 20:24:13 +00003257
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003258# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3259# disable features if it is defined, without any means to access these
3260# features as extensions. For these systems, we skip the definition of
3261# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3262# some feature, make sure there is no alternative way to access this
3263# feature. Also, when using wildcards, make sure you have verified the
3264# need for not defining _XOPEN_SOURCE on all systems matching the
3265# wildcard, and that the wildcard does not include future systems
3266# (which may remove their limitations).
3267case $ac_sys_system/$ac_sys_release in
3268 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3269 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003270 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis7875ef62010-02-15 21:41:12 +00003271 # In addition, Stefan Krah confirms that issue #1244610 exists through
3272 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali97781b02011-07-22 23:43:42 +02003273 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Martin v. Löwiscb78de62007-12-29 18:49:21 +00003274 define_xopen_source=no
3275 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3276 # also defined. This can be overridden by defining _BSD_SOURCE
3277 # As this has a different meaning on Linux, only define it on OpenBSD
3278
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003279$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwiscb78de62007-12-29 18:49:21 +00003280
3281 ;;
Charles-François Natali97781b02011-07-22 23:43:42 +02003282 OpenBSD/*)
Martin v. Löwis5e2dd862010-02-15 08:32:00 +00003283 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3284 # also defined. This can be overridden by defining _BSD_SOURCE
3285 # As this has a different meaning on Linux, only define it on OpenBSD
3286
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003287$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis5e2dd862010-02-15 08:32:00 +00003288
3289 ;;
Martin v. Löwis4d542ec2006-11-25 15:39:19 +00003290 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3291 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3292 # Marc Recht
Benjamin Petersoneac68f42008-11-16 17:54:55 +00003293 NetBSD/1.5 | NetBSD/1.5.* | NetBSD/1.6 | NetBSD/1.6.* | NetBSD/1.6[A-S])
Martin v. Löwis4d542ec2006-11-25 15:39:19 +00003294 define_xopen_source=no;;
Martin v. Löwisb41afb52010-05-28 15:28:47 +00003295 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3296 # request to enable features supported by the standard as a request
3297 # to disable features not supported by the standard. The best way
3298 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3299 # entirely and define __EXTENSIONS__ instead.
3300 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003301 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003302 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3303 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003304 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003305 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003306 define_xopen_source=no;;
3307 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003308 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003309 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003310 define_xopen_source=no;;
Martin v. Löwisbb86d832008-11-04 20:40:09 +00003311 # On FreeBSD 4, the math functions C89 does not cover are never defined
3312 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3313 FreeBSD/4.*)
3314 define_xopen_source=no;;
3315 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3316 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3317 # identifies itself as Darwin/7.*
3318 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3319 # disables platform specific features beyond repair.
3320 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3321 # has no effect, don't bother defining them
3322 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003323 define_xopen_source=no;;
Ronald Oussorena55af9a2010-01-17 16:25:57 +00003324 Darwin/1[0-9].*)
3325 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003326 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3327 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3328 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003329 AIX/4)
3330 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003331 AIX/5)
3332 if test `uname -r` -eq 1; then
3333 define_xopen_source=no
3334 fi
3335 ;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00003336 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3337 # defining NI_NUMERICHOST.
3338 QNX/6.3.2)
3339 define_xopen_source=no
3340 ;;
Martin v. Löwisa0588362006-04-04 06:03:50 +00003341
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003342esac
3343
3344if test $define_xopen_source = yes
3345then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003346
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003347$as_echo "#define _XOPEN_SOURCE 600" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003348
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003349
3350 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3351 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3352 # several APIs are not declared. Since this is also needed in some
3353 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003354
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003355$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003356
3357
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003358
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003359$as_echo "#define _POSIX_C_SOURCE 200112L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003360
3361
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003362fi
3363
Guido van Rossum91922671997-10-09 20:24:13 +00003364#
3365# SGI compilers allow the specification of the both the ABI and the
3366# ISA on the command line. Depending on the values of these switches,
3367# different and often incompatable code will be generated.
3368#
3369# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3370# thus supply support for various ABI/ISA combinations. The MACHDEP
3371# variable is also adjusted.
3372#
3373
3374if test ! -z "$SGI_ABI"
3375then
3376 CC="cc $SGI_ABI"
3377 LDFLAGS="$SGI_ABI $LDFLAGS"
3378 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3379fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003380{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3381$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003382
Jack Jansen83f898c2002-12-30 22:23:40 +00003383# And add extra plat-mac for darwin
3384
Jack Jansen7b59b422003-03-17 15:44:10 +00003385
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking EXTRAPLATDIR" >&5
3387$as_echo_n "checking EXTRAPLATDIR... " >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00003388if test -z "$EXTRAPLATDIR"
3389then
3390 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00003391 darwin)
3392 EXTRAPLATDIR="\$(PLATMACDIRS)"
3393 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
3394 ;;
3395 *)
3396 EXTRAPLATDIR=""
3397 EXTRAMACHDEPPATH=""
3398 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00003399 esac
3400fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003401{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRAPLATDIR" >&5
3402$as_echo "$EXTRAPLATDIR" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00003403
Jack Jansen6b08a402004-06-03 12:41:45 +00003404# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3405# it may influence the way we can build extensions, so distutils
3406# needs to check it
3407
Ronald Oussoren988117f2006-04-29 11:31:35 +00003408
Jack Jansen6b08a402004-06-03 12:41:45 +00003409CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Ronald Oussoren988117f2006-04-29 11:31:35 +00003410EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003411
Guido van Rossum627b2d71993-12-24 10:39:16 +00003412# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003413
3414# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3415# for debug/optimization stuff. BASECFLAGS is for flags that are required
3416# just to get things to compile and link. Users are free to override OPT
3417# when running configure or make. The build should not break if they do.
3418# BASECFLAGS should generally not be messed with, however.
3419
3420# XXX shouldn't some/most/all of this code be merged with the stuff later
3421# on that fiddles with OPT and BASECFLAGS?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3423$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003424
Martin v. Löwiseba40652007-08-30 20:10:57 +00003425# Check whether --with-gcc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003426if test "${with_gcc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003427 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003428 case $withval in
Mark Dickinson04b27232009-01-04 12:29:36 +00003429 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003430 without_gcc=yes;;
3431 yes) CC=gcc
3432 without_gcc=no;;
3433 *) CC=$withval
3434 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003435 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003436else
Martin v. Löwis11437992002-04-12 09:54:03 +00003437
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003438 case $ac_sys_system in
Antoine Pitrou285cd162010-09-21 15:23:17 +00003439 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003440 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003441 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003442 case $BE_HOST_CPU in
3443 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00003444 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003445 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00003446 BASECFLAGS="$BASECFLAGS -export pragma"
3447 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003448 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003449 ;;
3450 x86)
Fred Drake5790be12000-10-09 17:06:13 +00003451 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003452 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00003453 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003454 ;;
3455 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003456 as_fn_error $? "Unknown BeOS platform \"$BE_HOST_CPU\"" "$LINENO" 5
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003457 ;;
3458 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003459 AR="\$(srcdir)/Modules/ar_beos"
3460 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003461 ;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003462 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003463 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00003464fi
3465
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003466{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3467$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003468
Guido van Rossum8b131c51995-03-09 14:10:13 +00003469# If the user switches compilers, we can't believe the cache
3470if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3471then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003472 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003473(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003474fi
3475
Trent Nelson15daa352012-12-13 06:46:39 +00003476if test "$MACHDEP" = "irix6" && test "$CC" != "gcc"; then
3477 # Normally, MIPSpro CC treats #error directives as warnings, which means
3478 # a successful exit code is returned (0). This is a problem because IRIX
3479 # has a bunch of system headers with this guard at the top:
3480 #
3481 # #ifndef __c99
3482 # #error This header file is to be used only for c99 mode compilations
3483 # #else
3484 #
3485 # When autoconf tests for such a header, like stdint.h, this happens:
3486 #
3487 # configure:4619: cc -c conftest.c >&5
3488 # cc-1035 cc: WARNING File = /usr/include/stdint.h, Line = 5
3489 # #error directive: This header file is to be used only for c99 mode
3490 # compilations
3491 #
3492 # #error This header file is to be used only for c99 mode compilations
3493 # ^
3494 #
3495 # configure:4619: $? = 0
3496 # configure:4619: result: yes
3497 #
3498 # Therefore, we use `-diag_error 1035` to have the compiler treat the
3499 # warning as an error, which causes cc to return a non-zero result,
3500 # which autoconf can interpret correctly.
3501 CFLAGS="$CFLAGS -diag_error 1035"
3502 # Whilst we're here, we might as well make sure CXX defaults to something
3503 # sensible if we're not using gcc.
3504 if test -z "$CXX"; then
3505 CXX="CC"
3506 fi
3507fi
3508
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00003509# If the user set CFLAGS, use this instead of the automatically
3510# determined setting
3511preset_cflags="$CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +00003512ac_ext=c
3513ac_cpp='$CPP $CPPFLAGS'
3514ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3515ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3516ac_compiler_gnu=$ac_cv_c_compiler_gnu
3517if test -n "$ac_tool_prefix"; then
3518 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3519set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3521$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003522if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003523 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003524else
3525 if test -n "$CC"; then
3526 ac_cv_prog_CC="$CC" # Let the user override the test.
3527else
Martin v. Löwis11437992002-04-12 09:54:03 +00003528as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3529for as_dir in $PATH
3530do
3531 IFS=$as_save_IFS
3532 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003533 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003534 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003535 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003536 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003537 break 2
3538 fi
3539done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003540 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003541IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003542
Jack Jansendd19cf82001-12-06 22:36:17 +00003543fi
3544fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003545CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003546if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3548$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003549else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003550 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3551$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003552fi
3553
Martin v. Löwiseba40652007-08-30 20:10:57 +00003554
Martin v. Löwis11437992002-04-12 09:54:03 +00003555fi
3556if test -z "$ac_cv_prog_CC"; then
3557 ac_ct_CC=$CC
3558 # Extract the first word of "gcc", so it can be a program name with args.
3559set dummy gcc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3561$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003562if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003563 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003564else
3565 if test -n "$ac_ct_CC"; then
3566 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3567else
3568as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3569for as_dir in $PATH
3570do
3571 IFS=$as_save_IFS
3572 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003573 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003574 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003575 ac_cv_prog_ac_ct_CC="gcc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003576 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003577 break 2
3578 fi
3579done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003580 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003581IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003582
3583fi
3584fi
3585ac_ct_CC=$ac_cv_prog_ac_ct_CC
3586if test -n "$ac_ct_CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003587 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3588$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003589else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003590 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3591$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003592fi
3593
Martin v. Löwiseba40652007-08-30 20:10:57 +00003594 if test "x$ac_ct_CC" = x; then
3595 CC=""
3596 else
3597 case $cross_compiling:$ac_tool_warned in
3598yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003599{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3600$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00003601ac_tool_warned=yes ;;
3602esac
3603 CC=$ac_ct_CC
3604 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003605else
3606 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003607fi
3608
Jack Jansendd19cf82001-12-06 22:36:17 +00003609if test -z "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003610 if test -n "$ac_tool_prefix"; then
3611 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
Martin v. Löwis11437992002-04-12 09:54:03 +00003612set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3614$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003615if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003616 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003617else
3618 if test -n "$CC"; then
3619 ac_cv_prog_CC="$CC" # Let the user override the test.
3620else
Martin v. Löwis11437992002-04-12 09:54:03 +00003621as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3622for as_dir in $PATH
3623do
3624 IFS=$as_save_IFS
3625 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003626 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003627 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003628 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003629 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003630 break 2
3631 fi
3632done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003633 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003634IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003635
3636fi
3637fi
3638CC=$ac_cv_prog_CC
3639if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3641$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003642else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3644$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003645fi
3646
Martin v. Löwiseba40652007-08-30 20:10:57 +00003647
Martin v. Löwis11437992002-04-12 09:54:03 +00003648 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003649fi
3650if test -z "$CC"; then
3651 # Extract the first word of "cc", so it can be a program name with args.
3652set dummy cc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3654$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003655if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003656 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003657else
3658 if test -n "$CC"; then
3659 ac_cv_prog_CC="$CC" # Let the user override the test.
3660else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003661 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003662as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3663for as_dir in $PATH
3664do
3665 IFS=$as_save_IFS
3666 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003667 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003668 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003669 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3670 ac_prog_rejected=yes
3671 continue
3672 fi
3673 ac_cv_prog_CC="cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003674 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003675 break 2
3676 fi
3677done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003678 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003679IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003680
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003681if test $ac_prog_rejected = yes; then
3682 # We found a bogon in the path, so make sure we never use it.
3683 set dummy $ac_cv_prog_CC
3684 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003685 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003686 # We chose a different compiler from the bogus one.
3687 # However, it has the same basename, so the bogon will be chosen
3688 # first if we set CC to just the basename; use the full file name.
3689 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003690 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003691 fi
3692fi
3693fi
3694fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003695CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003696if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3698$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003699else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3701$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003702fi
3703
Martin v. Löwiseba40652007-08-30 20:10:57 +00003704
Martin v. Löwis11437992002-04-12 09:54:03 +00003705fi
3706if test -z "$CC"; then
3707 if test -n "$ac_tool_prefix"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003708 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003709 do
3710 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3711set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3713$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003714if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003715 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003716else
3717 if test -n "$CC"; then
3718 ac_cv_prog_CC="$CC" # Let the user override the test.
3719else
Martin v. Löwis11437992002-04-12 09:54:03 +00003720as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3721for as_dir in $PATH
3722do
3723 IFS=$as_save_IFS
3724 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003725 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003726 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003727 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003728 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003729 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003730 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003731done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003732 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003733IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003734
3735fi
3736fi
3737CC=$ac_cv_prog_CC
3738if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3740$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003741else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003742 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3743$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003744fi
3745
Martin v. Löwiseba40652007-08-30 20:10:57 +00003746
Martin v. Löwis11437992002-04-12 09:54:03 +00003747 test -n "$CC" && break
3748 done
3749fi
3750if test -z "$CC"; then
3751 ac_ct_CC=$CC
Martin v. Löwiseba40652007-08-30 20:10:57 +00003752 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003753do
3754 # Extract the first word of "$ac_prog", so it can be a program name with args.
3755set dummy $ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3757$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003758if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003759 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003760else
3761 if test -n "$ac_ct_CC"; then
3762 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3763else
3764as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3765for as_dir in $PATH
3766do
3767 IFS=$as_save_IFS
3768 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003769 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003770 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003771 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003772 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003773 break 2
3774 fi
3775done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003776 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003777IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003778
Martin v. Löwis11437992002-04-12 09:54:03 +00003779fi
3780fi
3781ac_ct_CC=$ac_cv_prog_ac_ct_CC
3782if test -n "$ac_ct_CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3784$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003785else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3787$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003788fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003789
Martin v. Löwiseba40652007-08-30 20:10:57 +00003790
Martin v. Löwis11437992002-04-12 09:54:03 +00003791 test -n "$ac_ct_CC" && break
3792done
Michael W. Hudson54241132001-12-07 15:38:26 +00003793
Martin v. Löwiseba40652007-08-30 20:10:57 +00003794 if test "x$ac_ct_CC" = x; then
3795 CC=""
3796 else
3797 case $cross_compiling:$ac_tool_warned in
3798yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003799{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3800$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00003801ac_tool_warned=yes ;;
3802esac
3803 CC=$ac_ct_CC
3804 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003805fi
3806
3807fi
3808
3809
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003810test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3811$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003812as_fn_error $? "no acceptable C compiler found in \$PATH
Matthias Klose3cef2a92012-03-14 23:39:33 +01003813See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003814
3815# Provide some information about the compiler.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003816$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3817set X $ac_compile
3818ac_compiler=$2
3819for ac_option in --version -v -V -qversion; do
3820 { { ac_try="$ac_compiler $ac_option >&5"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003821case "(($ac_try" in
3822 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3823 *) ac_try_echo=$ac_try;;
3824esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003825eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3826$as_echo "$ac_try_echo"; } >&5
3827 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003828 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003829 if test -s conftest.err; then
3830 sed '10a\
3831... rest of stderr output deleted ...
3832 10q' conftest.err >conftest.er1
3833 cat conftest.er1 >&5
3834 fi
3835 rm -f conftest.er1 conftest.err
3836 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3837 test $ac_status = 0; }
3838done
Martin v. Löwis11437992002-04-12 09:54:03 +00003839
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003840cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003841/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003842
Martin v. Löwis11437992002-04-12 09:54:03 +00003843int
3844main ()
3845{
3846
3847 ;
3848 return 0;
3849}
3850_ACEOF
3851ac_clean_files_save=$ac_clean_files
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003852ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003853# Try to create an executable without -o first, disregard a.out.
3854# It will help us diagnose broken compilers, and finding out an intuition
3855# of exeext.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3857$as_echo_n "checking whether the C compiler works... " >&6; }
3858ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3859
3860# The possible output files:
3861ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3862
Martin v. Löwiseba40652007-08-30 20:10:57 +00003863ac_rmfiles=
3864for ac_file in $ac_files
3865do
3866 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003867 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00003868 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3869 esac
3870done
3871rm -f $ac_rmfiles
3872
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003873if { { ac_try="$ac_link_default"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003874case "(($ac_try" in
3875 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3876 *) ac_try_echo=$ac_try;;
3877esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003878eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3879$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003880 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003881 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003882 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3883 test $ac_status = 0; }; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003884 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3885# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3886# in a Makefile. We should not override ac_cv_exeext if it was cached,
3887# so that the user can short-circuit this test for compilers unknown to
3888# Autoconf.
3889for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003890do
3891 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003892 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003893 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Skip Montanarof0d5f792004-08-15 14:08:23 +00003894 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003895 [ab].out )
Skip Montanarof0d5f792004-08-15 14:08:23 +00003896 # We found the default executable, but exeext='' is most
3897 # certainly right.
3898 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003899 *.* )
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003900 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Martin v. Löwiseba40652007-08-30 20:10:57 +00003901 then :; else
3902 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3903 fi
3904 # We set ac_cv_exeext here because the later test for it is not
3905 # safe: cross compilers may not add the suffix if given an `-o'
3906 # argument, so we may need to know it at that point already.
3907 # Even if this section looks crufty: it has the advantage of
3908 # actually working.
Skip Montanarof0d5f792004-08-15 14:08:23 +00003909 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003910 * )
Skip Montanarof0d5f792004-08-15 14:08:23 +00003911 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003912 esac
3913done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003914test "$ac_cv_exeext" = no && ac_cv_exeext=
3915
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003916else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003917 ac_file=''
3918fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003919if test -z "$ac_file"; then :
3920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3921$as_echo "no" >&6; }
3922$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003923sed 's/^/| /' conftest.$ac_ext >&5
3924
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003925{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3926$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003927as_fn_error 77 "C compiler cannot create executables
Matthias Klose3cef2a92012-03-14 23:39:33 +01003928See \`config.log' for more details" "$LINENO" 5; }
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003929else
3930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3931$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003932fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3934$as_echo_n "checking for C compiler default output file name... " >&6; }
3935{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3936$as_echo "$ac_file" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003937ac_exeext=$ac_cv_exeext
Michael W. Hudson54241132001-12-07 15:38:26 +00003938
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003939rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00003940ac_clean_files=$ac_clean_files_save
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3942$as_echo_n "checking for suffix of executables... " >&6; }
3943if { { ac_try="$ac_link"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003944case "(($ac_try" in
3945 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3946 *) ac_try_echo=$ac_try;;
3947esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003948eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3949$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003950 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003951 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003952 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3953 test $ac_status = 0; }; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00003954 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3955# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3956# work properly (i.e., refer to `conftest.exe'), while it won't with
3957# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00003958for ac_file in conftest.exe conftest conftest.*; do
3959 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003960 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003961 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003962 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
Skip Montanarof0d5f792004-08-15 14:08:23 +00003963 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003964 * ) break;;
3965 esac
3966done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003967else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003968 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3969$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003970as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Matthias Klose3cef2a92012-03-14 23:39:33 +01003971See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003972fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003973rm -f conftest conftest$ac_cv_exeext
3974{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3975$as_echo "$ac_cv_exeext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003976
3977rm -f conftest.$ac_ext
3978EXEEXT=$ac_cv_exeext
3979ac_exeext=$EXEEXT
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003980cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3981/* end confdefs.h. */
3982#include <stdio.h>
3983int
3984main ()
3985{
3986FILE *f = fopen ("conftest.out", "w");
3987 return ferror (f) || fclose (f) != 0;
3988
3989 ;
3990 return 0;
3991}
Skip Montanaro6dead952003-09-25 14:50:04 +00003992_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003993ac_clean_files="$ac_clean_files conftest.out"
3994# Check that the compiler produces executables we can run. If not, either
3995# the compiler is broken, or we cross compile.
3996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3997$as_echo_n "checking whether we are cross compiling... " >&6; }
3998if test "$cross_compiling" != yes; then
3999 { { ac_try="$ac_link"
4000case "(($ac_try" in
4001 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4002 *) ac_try_echo=$ac_try;;
4003esac
4004eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4005$as_echo "$ac_try_echo"; } >&5
4006 (eval "$ac_link") 2>&5
4007 ac_status=$?
4008 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4009 test $ac_status = 0; }
4010 if { ac_try='./conftest$ac_cv_exeext'
4011 { { case "(($ac_try" in
4012 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4013 *) ac_try_echo=$ac_try;;
4014esac
4015eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4016$as_echo "$ac_try_echo"; } >&5
4017 (eval "$ac_try") 2>&5
4018 ac_status=$?
4019 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4020 test $ac_status = 0; }; }; then
4021 cross_compiling=no
4022 else
4023 if test "$cross_compiling" = maybe; then
4024 cross_compiling=yes
4025 else
4026 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4027$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004028as_fn_error $? "cannot run C compiled programs.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004029If you meant to cross compile, use \`--host'.
Matthias Klose3cef2a92012-03-14 23:39:33 +01004030See \`config.log' for more details" "$LINENO" 5; }
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004031 fi
4032 fi
4033fi
4034{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4035$as_echo "$cross_compiling" >&6; }
4036
4037rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4038ac_clean_files=$ac_clean_files_save
4039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4040$as_echo_n "checking for suffix of object files... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004041if ${ac_cv_objext+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004042 $as_echo_n "(cached) " >&6
4043else
4044 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004045/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004046
Martin v. Löwis11437992002-04-12 09:54:03 +00004047int
4048main ()
4049{
4050
4051 ;
4052 return 0;
4053}
4054_ACEOF
4055rm -f conftest.o conftest.obj
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004056if { { ac_try="$ac_compile"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004057case "(($ac_try" in
4058 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4059 *) ac_try_echo=$ac_try;;
4060esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004061eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4062$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00004063 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004064 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004065 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4066 test $ac_status = 0; }; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004067 for ac_file in conftest.o conftest.obj conftest.*; do
4068 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004069 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004070 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004071 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4072 break;;
4073 esac
4074done
4075else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004076 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004077sed 's/^/| /' conftest.$ac_ext >&5
4078
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004079{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4080$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004081as_fn_error $? "cannot compute suffix of object files: cannot compile
Matthias Klose3cef2a92012-03-14 23:39:33 +01004082See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004083fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004084rm -f conftest.$ac_cv_objext conftest.$ac_ext
4085fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004086{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4087$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004088OBJEXT=$ac_cv_objext
4089ac_objext=$OBJEXT
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4091$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004092if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004093 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004094else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004095 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004096/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004097
Martin v. Löwis11437992002-04-12 09:54:03 +00004098int
4099main ()
4100{
4101#ifndef __GNUC__
4102 choke me
4103#endif
4104
4105 ;
4106 return 0;
4107}
4108_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004109if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004110 ac_compiler_gnu=yes
4111else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004112 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004113fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004114rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004115ac_cv_c_compiler_gnu=$ac_compiler_gnu
4116
4117fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004118{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4119$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4120if test $ac_compiler_gnu = yes; then
4121 GCC=yes
4122else
4123 GCC=
4124fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004125ac_test_CFLAGS=${CFLAGS+set}
4126ac_save_CFLAGS=$CFLAGS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4128$as_echo_n "checking whether $CC accepts -g... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004129if ${ac_cv_prog_cc_g+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004130 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004131else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004132 ac_save_c_werror_flag=$ac_c_werror_flag
4133 ac_c_werror_flag=yes
4134 ac_cv_prog_cc_g=no
4135 CFLAGS="-g"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004136 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004137/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004138
Martin v. Löwis11437992002-04-12 09:54:03 +00004139int
4140main ()
4141{
4142
4143 ;
4144 return 0;
4145}
4146_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004147if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004148 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004149else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004150 CFLAGS=""
4151 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004152/* end confdefs.h. */
4153
4154int
4155main ()
4156{
4157
4158 ;
4159 return 0;
4160}
4161_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004162if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004163
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004164else
4165 ac_c_werror_flag=$ac_save_c_werror_flag
Martin v. Löwiseba40652007-08-30 20:10:57 +00004166 CFLAGS="-g"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004167 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004168/* end confdefs.h. */
4169
4170int
4171main ()
4172{
4173
4174 ;
4175 return 0;
4176}
4177_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004178if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004179 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004180fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004181rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004182fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004183rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4184fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004185rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4186 ac_c_werror_flag=$ac_save_c_werror_flag
4187fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004188{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4189$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004190if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004191 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004192elif test $ac_cv_prog_cc_g = yes; then
4193 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004194 CFLAGS="-g -O2"
4195 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004196 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004197 fi
4198else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004199 if test "$GCC" = yes; then
4200 CFLAGS="-O2"
4201 else
4202 CFLAGS=
4203 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004204fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4206$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004207if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004208 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004209else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004210 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004211ac_save_CC=$CC
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004212cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004213/* end confdefs.h. */
4214#include <stdarg.h>
4215#include <stdio.h>
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004216struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004217/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4218struct buf { int x; };
4219FILE * (*rcsopen) (struct buf *, struct stat *, int);
4220static char *e (p, i)
4221 char **p;
4222 int i;
4223{
4224 return p[i];
4225}
4226static char *f (char * (*g) (char **, int), char **p, ...)
4227{
4228 char *s;
4229 va_list v;
4230 va_start (v,p);
4231 s = g (p, va_arg (v,int));
4232 va_end (v);
4233 return s;
4234}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004235
4236/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4237 function prototypes and stuff, but not '\xHH' hex character constants.
4238 These don't provoke an error unfortunately, instead are silently treated
Martin v. Löwiseba40652007-08-30 20:10:57 +00004239 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004240 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4241 array size at least. It's necessary to write '\x00'==0 to get something
Martin v. Löwiseba40652007-08-30 20:10:57 +00004242 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004243int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4244
Martin v. Löwiseba40652007-08-30 20:10:57 +00004245/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4246 inside strings and character constants. */
4247#define FOO(x) 'x'
4248int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4249
Skip Montanaro6dead952003-09-25 14:50:04 +00004250int test (int i, double x);
4251struct s1 {int (*f) (int a);};
4252struct s2 {int (*f) (double a);};
4253int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4254int argc;
4255char **argv;
4256int
4257main ()
4258{
4259return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4260 ;
4261 return 0;
4262}
4263_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00004264for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4265 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004266do
4267 CC="$ac_save_CC $ac_arg"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004268 if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004269 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004270fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004271rm -f core conftest.err conftest.$ac_objext
4272 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004273done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004274rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004275CC=$ac_save_CC
4276
4277fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004278# AC_CACHE_VAL
4279case "x$ac_cv_prog_cc_c89" in
4280 x)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4282$as_echo "none needed" >&6; } ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00004283 xno)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4285$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004286 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00004287 CC="$CC $ac_cv_prog_cc_c89"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004288 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4289$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004290esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004291if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004292
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004293fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004294
Martin v. Löwis11437992002-04-12 09:54:03 +00004295ac_ext=c
4296ac_cpp='$CPP $CPPFLAGS'
4297ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4298ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4299ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004300
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00004301if test ! -z "$preset_cflags"
4302then
4303 CFLAGS=$preset_cflags
4304fi
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004305
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004306
4307
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4309$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004310
Martin v. Löwiseba40652007-08-30 20:10:57 +00004311# Check whether --with-cxx_main was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004312if test "${with_cxx_main+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004313 withval=$with_cxx_main;
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004314
4315 case $withval in
4316 no) with_cxx_main=no
4317 MAINCC='$(CC)';;
4318 yes) with_cxx_main=yes
4319 MAINCC='$(CXX)';;
4320 *) with_cxx_main=yes
4321 MAINCC=$withval
4322 if test -z "$CXX"
4323 then
4324 CXX=$withval
4325 fi;;
4326 esac
4327else
4328
4329 with_cxx_main=no
4330 MAINCC='$(CC)'
4331
Martin v. Löwiseba40652007-08-30 20:10:57 +00004332fi
4333
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004334{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4335$as_echo "$with_cxx_main" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004336
4337preset_cxx="$CXX"
4338if test -z "$CXX"
4339then
4340 case "$CC" in
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004341 gcc) if test -n "$ac_tool_prefix"; then
4342 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4343set dummy ${ac_tool_prefix}g++; ac_word=$2
4344{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4345$as_echo_n "checking for $ac_word... " >&6; }
4346if ${ac_cv_path_CXX+:} false; then :
4347 $as_echo_n "(cached) " >&6
4348else
4349 case $CXX in
4350 [\\/]* | ?:[\\/]*)
4351 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4352 ;;
4353 *)
4354 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4355for as_dir in notfound
4356do
4357 IFS=$as_save_IFS
4358 test -z "$as_dir" && as_dir=.
4359 for ac_exec_ext in '' $ac_executable_extensions; do
4360 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4361 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4362 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4363 break 2
4364 fi
4365done
4366 done
4367IFS=$as_save_IFS
4368
4369 ;;
4370esac
4371fi
4372CXX=$ac_cv_path_CXX
4373if test -n "$CXX"; then
4374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4375$as_echo "$CXX" >&6; }
4376else
4377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4378$as_echo "no" >&6; }
4379fi
4380
4381
4382fi
4383if test -z "$ac_cv_path_CXX"; then
4384 ac_pt_CXX=$CXX
4385 # Extract the first word of "g++", so it can be a program name with args.
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004386set dummy g++; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4388$as_echo_n "checking for $ac_word... " >&6; }
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004389if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004390 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004391else
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004392 case $ac_pt_CXX in
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004393 [\\/]* | ?:[\\/]*)
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004394 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004395 ;;
4396 *)
4397 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4398for as_dir in notfound
4399do
4400 IFS=$as_save_IFS
4401 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004402 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004403 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004404 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004405 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004406 break 2
4407 fi
4408done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004409 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004410IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004411
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004412 ;;
4413esac
4414fi
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004415ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4416if test -n "$ac_pt_CXX"; then
4417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4418$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004419else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4421$as_echo "no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004422fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004423
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004424 if test "x$ac_pt_CXX" = x; then
4425 CXX="g++"
4426 else
4427 case $cross_compiling:$ac_tool_warned in
4428yes:)
4429{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4430$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4431ac_tool_warned=yes ;;
4432esac
4433 CXX=$ac_pt_CXX
4434 fi
4435else
4436 CXX="$ac_cv_path_CXX"
4437fi
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004438 ;;
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004439 cc) if test -n "$ac_tool_prefix"; then
4440 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4441set dummy ${ac_tool_prefix}c++; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4443$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004444if ${ac_cv_path_CXX+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004445 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004446else
4447 case $CXX in
4448 [\\/]* | ?:[\\/]*)
4449 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4450 ;;
4451 *)
4452 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4453for as_dir in notfound
4454do
4455 IFS=$as_save_IFS
4456 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004457 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004458 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004459 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004460 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004461 break 2
4462 fi
4463done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004464 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004465IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004466
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004467 ;;
4468esac
4469fi
4470CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00004471if test -n "$CXX"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4473$as_echo "$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004474else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4476$as_echo "no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004477fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004478
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004479
4480fi
4481if test -z "$ac_cv_path_CXX"; then
4482 ac_pt_CXX=$CXX
4483 # Extract the first word of "c++", so it can be a program name with args.
4484set dummy c++; ac_word=$2
4485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4486$as_echo_n "checking for $ac_word... " >&6; }
4487if ${ac_cv_path_ac_pt_CXX+:} false; then :
4488 $as_echo_n "(cached) " >&6
4489else
4490 case $ac_pt_CXX in
4491 [\\/]* | ?:[\\/]*)
4492 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4493 ;;
4494 *)
4495 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4496for as_dir in notfound
4497do
4498 IFS=$as_save_IFS
4499 test -z "$as_dir" && as_dir=.
4500 for ac_exec_ext in '' $ac_executable_extensions; do
4501 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4502 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4503 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4504 break 2
4505 fi
4506done
4507 done
4508IFS=$as_save_IFS
4509
4510 ;;
4511esac
4512fi
4513ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4514if test -n "$ac_pt_CXX"; then
4515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4516$as_echo "$ac_pt_CXX" >&6; }
4517else
4518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4519$as_echo "no" >&6; }
4520fi
4521
4522 if test "x$ac_pt_CXX" = x; then
4523 CXX="c++"
4524 else
4525 case $cross_compiling:$ac_tool_warned in
4526yes:)
4527{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4528$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4529ac_tool_warned=yes ;;
4530esac
4531 CXX=$ac_pt_CXX
4532 fi
4533else
4534 CXX="$ac_cv_path_CXX"
4535fi
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004536 ;;
4537 esac
4538 if test "$CXX" = "notfound"
4539 then
4540 CXX=""
4541 fi
4542fi
4543if test -z "$CXX"
4544then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004545 if test -n "$ac_tool_prefix"; then
4546 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4547 do
4548 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4549set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4551$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004552if ${ac_cv_prog_CXX+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004553 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004554else
4555 if test -n "$CXX"; then
4556 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4557else
4558as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4559for as_dir in $PATH
4560do
4561 IFS=$as_save_IFS
4562 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004563 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004564 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004565 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004566 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004567 break 2
4568 fi
4569done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004570 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004571IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004572
4573fi
4574fi
4575CXX=$ac_cv_prog_CXX
4576if test -n "$CXX"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4578$as_echo "$CXX" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004579else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004580 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4581$as_echo "no" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004582fi
4583
Martin v. Löwiseba40652007-08-30 20:10:57 +00004584
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004585 test -n "$CXX" && break
4586 done
4587fi
4588if test -z "$CXX"; then
4589 ac_ct_CXX=$CXX
4590 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4591do
4592 # Extract the first word of "$ac_prog", so it can be a program name with args.
4593set dummy $ac_prog; ac_word=$2
4594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4595$as_echo_n "checking for $ac_word... " >&6; }
4596if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4597 $as_echo_n "(cached) " >&6
4598else
4599 if test -n "$ac_ct_CXX"; then
4600 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4601else
4602as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4603for as_dir in $PATH
4604do
4605 IFS=$as_save_IFS
4606 test -z "$as_dir" && as_dir=.
4607 for ac_exec_ext in '' $ac_executable_extensions; do
4608 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4609 ac_cv_prog_ac_ct_CXX="$ac_prog"
4610 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4611 break 2
4612 fi
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004613done
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004614 done
4615IFS=$as_save_IFS
4616
4617fi
4618fi
4619ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4620if test -n "$ac_ct_CXX"; then
4621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4622$as_echo "$ac_ct_CXX" >&6; }
4623else
4624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4625$as_echo "no" >&6; }
4626fi
4627
4628
4629 test -n "$ac_ct_CXX" && break
4630done
4631
4632 if test "x$ac_ct_CXX" = x; then
4633 CXX="notfound"
4634 else
4635 case $cross_compiling:$ac_tool_warned in
4636yes:)
4637{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4638$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4639ac_tool_warned=yes ;;
4640esac
4641 CXX=$ac_ct_CXX
4642 fi
4643fi
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004644
4645 if test "$CXX" = "notfound"
4646 then
4647 CXX=""
4648 fi
4649fi
4650if test "$preset_cxx" != "$CXX"
4651then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004652 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004653
4654 By default, distutils will build C++ extension modules with \"$CXX\".
4655 If this is not intended, then set CXX on the configure command line.
4656 " >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004657$as_echo "$as_me: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004658
4659 By default, distutils will build C++ extension modules with \"$CXX\".
4660 If this is not intended, then set CXX on the configure command line.
4661 " >&2;}
4662fi
4663
doko@python.org4e63fbe2013-01-25 13:08:27 +01004664MULTIARCH=$($CC --print-multiarch 2>/dev/null)
4665
4666
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004667
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004668# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004669
4670ac_ext=c
4671ac_cpp='$CPP $CPPFLAGS'
4672ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4673ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4674ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4676$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004677# On Suns, sometimes $CPP names a directory.
4678if test -n "$CPP" && test -d "$CPP"; then
4679 CPP=
4680fi
4681if test -z "$CPP"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +01004682 if ${ac_cv_prog_CPP+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004683 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004684else
Martin v. Löwis11437992002-04-12 09:54:03 +00004685 # Double quotes because CPP needs to be expanded
4686 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4687 do
4688 ac_preproc_ok=false
4689for ac_c_preproc_warn_flag in '' yes
4690do
4691 # Use a header file that comes with gcc, so configuring glibc
4692 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004693 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4694 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004695 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004696 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004697 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004698/* end confdefs.h. */
4699#ifdef __STDC__
4700# include <limits.h>
4701#else
4702# include <assert.h>
4703#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004704 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004705_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004706if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004707
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004708else
Martin v. Löwis11437992002-04-12 09:54:03 +00004709 # Broken: fails on valid input.
4710continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004711fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004712rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004713
Martin v. Löwiseba40652007-08-30 20:10:57 +00004714 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004715 # can be detected and how.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004716 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004717/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004718#include <ac_nonexistent.h>
4719_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004720if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004721 # Broken: success on invalid input.
4722continue
4723else
Martin v. Löwis11437992002-04-12 09:54:03 +00004724 # Passes both tests.
4725ac_preproc_ok=:
4726break
4727fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004728rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004729
4730done
4731# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004732rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004733if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004734 break
4735fi
4736
4737 done
4738 ac_cv_prog_CPP=$CPP
4739
4740fi
4741 CPP=$ac_cv_prog_CPP
4742else
4743 ac_cv_prog_CPP=$CPP
4744fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004745{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4746$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004747ac_preproc_ok=false
4748for ac_c_preproc_warn_flag in '' yes
4749do
4750 # Use a header file that comes with gcc, so configuring glibc
4751 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004752 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4753 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004754 # On the NeXT, cc -E runs the code through the compiler's parser,
4755 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004756 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004757/* end confdefs.h. */
4758#ifdef __STDC__
4759# include <limits.h>
4760#else
4761# include <assert.h>
4762#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004763 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004764_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004765if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004766
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004767else
Martin v. Löwis11437992002-04-12 09:54:03 +00004768 # Broken: fails on valid input.
4769continue
4770fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004771rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004772
Martin v. Löwiseba40652007-08-30 20:10:57 +00004773 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004774 # can be detected and how.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004775 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004776/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004777#include <ac_nonexistent.h>
4778_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004779if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004780 # Broken: success on invalid input.
4781continue
4782else
Martin v. Löwis11437992002-04-12 09:54:03 +00004783 # Passes both tests.
4784ac_preproc_ok=:
4785break
4786fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004787rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004788
4789done
4790# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004791rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004792if $ac_preproc_ok; then :
4793
Martin v. Löwis11437992002-04-12 09:54:03 +00004794else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004795 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4796$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004797as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
Matthias Klose3cef2a92012-03-14 23:39:33 +01004798See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004799fi
4800
4801ac_ext=c
4802ac_cpp='$CPP $CPPFLAGS'
4803ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4804ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4805ac_compiler_gnu=$ac_cv_c_compiler_gnu
4806
4807
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4809$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004810if ${ac_cv_path_GREP+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004811 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004812else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004813 if test -z "$GREP"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004814 ac_path_GREP_found=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004815 # Loop through the user's path and test for each of PROGNAME-LIST
4816 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00004817for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4818do
4819 IFS=$as_save_IFS
4820 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004821 for ac_prog in grep ggrep; do
4822 for ac_exec_ext in '' $ac_executable_extensions; do
4823 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004824 as_fn_executable_p "$ac_path_GREP" || continue
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004825# Check for GNU ac_path_GREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004826 # Check for GNU $ac_path_GREP
4827case `"$ac_path_GREP" --version 2>&1` in
4828*GNU*)
4829 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4830*)
4831 ac_count=0
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004832 $as_echo_n 0123456789 >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004833 while :
4834 do
4835 cat "conftest.in" "conftest.in" >"conftest.tmp"
4836 mv "conftest.tmp" "conftest.in"
4837 cp "conftest.in" "conftest.nl"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004838 $as_echo 'GREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004839 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4840 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004841 as_fn_arith $ac_count + 1 && ac_count=$as_val
Martin v. Löwiseba40652007-08-30 20:10:57 +00004842 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4843 # Best one so far, save it but keep looking for a better one
4844 ac_cv_path_GREP="$ac_path_GREP"
4845 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00004846 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004847 # 10*(2^10) chars as input seems more than enough
4848 test $ac_count -gt 10 && break
4849 done
4850 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4851esac
4852
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004853 $ac_path_GREP_found && break 3
4854 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004855 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004856 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004857IFS=$as_save_IFS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004858 if test -z "$ac_cv_path_GREP"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004859 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004860 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004861else
4862 ac_cv_path_GREP=$GREP
4863fi
4864
Martin v. Löwiseba40652007-08-30 20:10:57 +00004865fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004866{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4867$as_echo "$ac_cv_path_GREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00004868 GREP="$ac_cv_path_GREP"
4869
4870
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4872$as_echo_n "checking for egrep... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004873if ${ac_cv_path_EGREP+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004874 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +00004875else
4876 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4877 then ac_cv_path_EGREP="$GREP -E"
4878 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004879 if test -z "$EGREP"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004880 ac_path_EGREP_found=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004881 # Loop through the user's path and test for each of PROGNAME-LIST
4882 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00004883for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4884do
4885 IFS=$as_save_IFS
4886 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004887 for ac_prog in egrep; do
4888 for ac_exec_ext in '' $ac_executable_extensions; do
4889 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004890 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004891# Check for GNU ac_path_EGREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004892 # Check for GNU $ac_path_EGREP
4893case `"$ac_path_EGREP" --version 2>&1` in
4894*GNU*)
4895 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4896*)
4897 ac_count=0
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004898 $as_echo_n 0123456789 >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004899 while :
4900 do
4901 cat "conftest.in" "conftest.in" >"conftest.tmp"
4902 mv "conftest.tmp" "conftest.in"
4903 cp "conftest.in" "conftest.nl"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004904 $as_echo 'EGREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004905 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4906 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004907 as_fn_arith $ac_count + 1 && ac_count=$as_val
Martin v. Löwiseba40652007-08-30 20:10:57 +00004908 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4909 # Best one so far, save it but keep looking for a better one
4910 ac_cv_path_EGREP="$ac_path_EGREP"
4911 ac_path_EGREP_max=$ac_count
4912 fi
4913 # 10*(2^10) chars as input seems more than enough
4914 test $ac_count -gt 10 && break
4915 done
4916 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4917esac
4918
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004919 $ac_path_EGREP_found && break 3
4920 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004921 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004922 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004923IFS=$as_save_IFS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004924 if test -z "$ac_cv_path_EGREP"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004925 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004926 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004927else
4928 ac_cv_path_EGREP=$EGREP
4929fi
4930
Martin v. Löwiseba40652007-08-30 20:10:57 +00004931 fi
4932fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004933{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4934$as_echo "$ac_cv_path_EGREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00004935 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00004936
4937
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4939$as_echo_n "checking for ANSI C header files... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004940if ${ac_cv_header_stdc+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004941 $as_echo_n "(cached) " >&6
4942else
4943 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00004944/* end confdefs.h. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004945#include <stdlib.h>
4946#include <stdarg.h>
4947#include <string.h>
4948#include <float.h>
4949
4950int
4951main ()
4952{
4953
4954 ;
4955 return 0;
4956}
4957_ACEOF
4958if ac_fn_c_try_compile "$LINENO"; then :
4959 ac_cv_header_stdc=yes
4960else
4961 ac_cv_header_stdc=no
4962fi
4963rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4964
4965if test $ac_cv_header_stdc = yes; then
4966 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4967 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4968/* end confdefs.h. */
4969#include <string.h>
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00004970
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00004971_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004972if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004973 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004974
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004975else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004976 ac_cv_header_stdc=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004977fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00004978rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004979
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004980fi
4981
4982if test $ac_cv_header_stdc = yes; then
4983 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4984 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4985/* end confdefs.h. */
4986#include <stdlib.h>
4987
4988_ACEOF
4989if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4990 $EGREP "free" >/dev/null 2>&1; then :
4991
4992else
4993 ac_cv_header_stdc=no
4994fi
4995rm -f conftest*
4996
4997fi
4998
4999if test $ac_cv_header_stdc = yes; then
5000 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5001 if test "$cross_compiling" = yes; then :
5002 :
5003else
5004 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5005/* end confdefs.h. */
5006#include <ctype.h>
5007#include <stdlib.h>
5008#if ((' ' & 0x0FF) == 0x020)
5009# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5010# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5011#else
5012# define ISLOWER(c) \
5013 (('a' <= (c) && (c) <= 'i') \
5014 || ('j' <= (c) && (c) <= 'r') \
5015 || ('s' <= (c) && (c) <= 'z'))
5016# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5017#endif
5018
5019#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5020int
5021main ()
5022{
5023 int i;
5024 for (i = 0; i < 256; i++)
5025 if (XOR (islower (i), ISLOWER (i))
5026 || toupper (i) != TOUPPER (i))
5027 return 2;
5028 return 0;
5029}
5030_ACEOF
5031if ac_fn_c_try_run "$LINENO"; then :
5032
5033else
5034 ac_cv_header_stdc=no
5035fi
5036rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5037 conftest.$ac_objext conftest.beam conftest.$ac_ext
5038fi
5039
5040fi
5041fi
5042{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5043$as_echo "$ac_cv_header_stdc" >&6; }
5044if test $ac_cv_header_stdc = yes; then
5045
5046$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5047
5048fi
5049
5050# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5051for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5052 inttypes.h stdint.h unistd.h
5053do :
5054 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5055ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5056"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00005057if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005058 cat >>confdefs.h <<_ACEOF
5059#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5060_ACEOF
5061
5062fi
5063
5064done
5065
5066
5067
5068 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01005069if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005070 MINIX=yes
5071else
5072 MINIX=
5073fi
5074
5075
5076 if test "$MINIX" = yes; then
5077
5078$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5079
5080
5081$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5082
5083
5084$as_echo "#define _MINIX 1" >>confdefs.h
5085
5086 fi
5087
5088
5089 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5090$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005091if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005092 $as_echo_n "(cached) " >&6
5093else
5094 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5095/* end confdefs.h. */
5096
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005097# define __EXTENSIONS__ 1
5098 $ac_includes_default
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005099int
5100main ()
5101{
5102
5103 ;
5104 return 0;
5105}
5106_ACEOF
5107if ac_fn_c_try_compile "$LINENO"; then :
5108 ac_cv_safe_to_define___extensions__=yes
5109else
5110 ac_cv_safe_to_define___extensions__=no
5111fi
5112rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5113fi
5114{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5115$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5116 test $ac_cv_safe_to_define___extensions__ = yes &&
5117 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5118
5119 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5120
5121 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5122
5123 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5124
5125 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5126
5127
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005128
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005129# Check for unsupported systems
5130case $ac_sys_system/$ac_sys_release in
5131atheos*|Linux*/1*)
5132 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5133 echo See README for details.
5134 exit 1;;
5135esac
5136
5137
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5139$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005140
5141# Check whether --with-suffix was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005142if test "${with_suffix+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005143 withval=$with_suffix;
5144 case $withval in
5145 no) EXEEXT=;;
5146 yes) EXEEXT=.exe;;
5147 *) EXEEXT=$withval;;
5148 esac
5149fi
5150
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005151{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5152$as_echo "$EXEEXT" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005153
5154# Test whether we're running on a non-case-sensitive system, in which
5155# case we give a warning if no ext is given
5156
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5158$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005159if test ! -d CaseSensitiveTestDir; then
5160mkdir CaseSensitiveTestDir
5161fi
5162
5163if test -d casesensitivetestdir
5164then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005165 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5166$as_echo "yes" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005167 BUILDEXEEXT=.exe
5168else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005169 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5170$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005171 BUILDEXEEXT=$EXEEXT
5172fi
5173rmdir CaseSensitiveTestDir
5174
5175case $MACHDEP in
5176bsdos*)
5177 case $CC in
5178 gcc) CC="$CC -D_HAVE_BSDI";;
5179 esac;;
5180esac
5181
5182case $ac_sys_system in
5183hp*|HP*)
5184 case $CC in
5185 cc|*/cc) CC="$CC -Ae";;
5186 esac;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005187SunOS*)
5188 # Some functions have a prototype only with that define, e.g. confstr
5189
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005190$as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005191
5192 ;;
5193esac
5194
5195
5196
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5198$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005199if test -z "$LIBRARY"
5200then
5201 LIBRARY='libpython$(VERSION).a'
5202fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005203{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5204$as_echo "$LIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005205
5206# LDLIBRARY is the name of the library to link against (as opposed to the
5207# name of the library into which to insert object files). BLDLIBRARY is also
5208# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5209# is blank as the main program is not linked directly against LDLIBRARY.
5210# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5211# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5212# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5213# DLLLIBRARY is the shared (i.e., DLL) library.
5214#
5215# RUNSHARED is used to run shared python without installed libraries
5216#
5217# INSTSONAME is the name of the shared library that will be use to install
5218# on the system - some systems like version suffix, others don't
5219
5220
5221
5222
5223
5224
5225LDLIBRARY="$LIBRARY"
5226BLDLIBRARY='$(LDLIBRARY)'
5227INSTSONAME='$(LDLIBRARY)'
5228DLLLIBRARY=''
5229LDLIBRARYDIR=''
5230RUNSHARED=''
5231
5232# LINKCC is the command that links the python executable -- default is $(CC).
5233# If CXX is set, and if it is needed to link a main function that was
5234# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5235# python might then depend on the C++ runtime
5236# This is altered for AIX in order to build the export list before
5237# linking.
5238
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5240$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005241if test -z "$LINKCC"
5242then
5243 LINKCC='$(PURIFY) $(MAINCC)'
5244 case $ac_sys_system in
5245 AIX*)
5246 exp_extra="\"\""
5247 if test $ac_sys_release -ge 5 -o \
5248 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5249 exp_extra="."
5250 fi
5251 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005252 QNX*)
5253 # qcc must be used because the other compilers do not
5254 # support -N.
5255 LINKCC=qcc;;
5256 esac
5257fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005258{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5259$as_echo "$LINKCC" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005260
5261# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5262# make sure we default having it set to "no": this is used by
5263# distutils.unixccompiler to know if it should add --enable-new-dtags
5264# to linker command lines, and failing to detect GNU ld simply results
5265# in the same bahaviour as before.
5266
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5268$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005269ac_prog=ld
5270if test "$GCC" = yes; then
5271 ac_prog=`$CC -print-prog-name=ld`
5272fi
5273case `"$ac_prog" -V 2>&1 < /dev/null` in
5274 *GNU*)
5275 GNULD=yes;;
5276 *)
5277 GNULD=no;;
5278esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005279{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5280$as_echo "$GNULD" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005281
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005282{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5283$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005284# Check whether --enable-shared was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005285if test "${enable_shared+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005286 enableval=$enable_shared;
5287fi
5288
5289
5290if test -z "$enable_shared"
5291then
5292 case $ac_sys_system in
5293 CYGWIN* | atheos*)
5294 enable_shared="yes";;
5295 *)
5296 enable_shared="no";;
5297 esac
5298fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005299{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5300$as_echo "$enable_shared" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005301
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5303$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005304# Check whether --enable-profiling was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005305if test "${enable_profiling+set}" = set; then :
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005306 enableval=$enable_profiling;
5307fi
5308
5309if test "x$enable_profiling" = xyes; then
5310 ac_save_cc="$CC"
Benjamin Petersonb9be7bb2013-03-26 08:55:37 -04005311 CC="$CC -pg"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005312 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005313/* end confdefs.h. */
5314int main() { return 0; }
5315_ACEOF
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005316if ac_fn_c_try_link "$LINENO"; then :
5317
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005318else
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005319 enable_profiling=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005320fi
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005321rm -f core conftest.err conftest.$ac_objext \
5322 conftest$ac_exeext conftest.$ac_ext
5323 CC="$ac_save_cc"
5324else
5325 enable_profiling=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005326fi
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005327{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5328$as_echo "$enable_profiling" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005329
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005330if test "x$enable_profiling" = xyes; then
5331 BASECFLAGS="-pg $BASECFLAGS"
5332 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005333fi
5334
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5336$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005337
5338# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5339# library that we build, but we do not want to link against it (we
5340# will find it with a -framework option). For this reason there is an
5341# extra variable BLDLIBRARY against which Python and the extension
5342# modules are linked, BLDLIBRARY. This is normally the same as
5343# LDLIBRARY, but empty for MacOSX framework builds.
5344if test "$enable_framework"
5345then
5346 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005347 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005348 BLDLIBRARY=''
5349else
5350 BLDLIBRARY='$(LDLIBRARY)'
5351fi
5352
5353# Other platforms follow
5354if test $enable_shared = "yes"; then
5355
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005356$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005357
5358 case $ac_sys_system in
5359 BeOS*)
5360 LDLIBRARY='libpython$(VERSION).so'
5361 ;;
5362 CYGWIN*)
5363 LDLIBRARY='libpython$(VERSION).dll.a'
5364 DLLLIBRARY='libpython$(VERSION).dll'
5365 ;;
5366 SunOS*)
5367 LDLIBRARY='libpython$(VERSION).so'
5368 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005369 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005370 INSTSONAME="$LDLIBRARY".$SOVERSION
5371 ;;
Charles-François Natali3de8c732011-07-24 22:33:35 +02005372 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005373 LDLIBRARY='libpython$(VERSION).so'
5374 BLDLIBRARY='-L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005375 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005376 case $ac_sys_system in
5377 FreeBSD*)
5378 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
5379 ;;
5380 esac
5381 INSTSONAME="$LDLIBRARY".$SOVERSION
5382 ;;
5383 hp*|HP*)
5384 case `uname -m` in
5385 ia64)
5386 LDLIBRARY='libpython$(VERSION).so'
5387 ;;
5388 *)
5389 LDLIBRARY='libpython$(VERSION).sl'
5390 ;;
5391 esac
5392 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005393 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005394 ;;
5395 OSF*)
5396 LDLIBRARY='libpython$(VERSION).so'
5397 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005398 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005399 ;;
5400 atheos*)
5401 LDLIBRARY='libpython$(VERSION).so'
5402 BLDLIBRARY='-L. -lpython$(VERSION)'
5403 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
5404 ;;
5405 Darwin*)
5406 LDLIBRARY='libpython$(VERSION).dylib'
5407 BLDLIBRARY='-L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005408 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005409 ;;
Antoine Pitrouaabdceb2010-09-10 20:03:17 +00005410 AIX*)
5411 LDLIBRARY='libpython$(VERSION).so'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005412 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrouaabdceb2010-09-10 20:03:17 +00005413 ;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005414
5415 esac
5416else # shared is disabled
5417 case $ac_sys_system in
5418 CYGWIN*)
5419 BLDLIBRARY='$(LIBRARY)'
5420 LDLIBRARY='libpython$(VERSION).dll.a'
5421 ;;
5422 esac
5423fi
5424
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005425if test "$cross_compiling" = yes; then
5426 RUNSHARED=
5427fi
5428
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005429{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5430$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005431
5432if test -n "$ac_tool_prefix"; then
5433 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5434set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5436$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005437if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005438 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005439else
5440 if test -n "$RANLIB"; then
5441 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5442else
5443as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5444for as_dir in $PATH
5445do
5446 IFS=$as_save_IFS
5447 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005448 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005449 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005450 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005451 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005452 break 2
5453 fi
5454done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005455 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005456IFS=$as_save_IFS
5457
5458fi
5459fi
5460RANLIB=$ac_cv_prog_RANLIB
5461if test -n "$RANLIB"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5463$as_echo "$RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005464else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5466$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005467fi
5468
5469
5470fi
5471if test -z "$ac_cv_prog_RANLIB"; then
5472 ac_ct_RANLIB=$RANLIB
5473 # Extract the first word of "ranlib", so it can be a program name with args.
5474set dummy ranlib; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5476$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005477if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005478 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005479else
5480 if test -n "$ac_ct_RANLIB"; then
5481 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5482else
5483as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5484for as_dir in $PATH
5485do
5486 IFS=$as_save_IFS
5487 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005488 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005489 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005490 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005491 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005492 break 2
5493 fi
5494done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005495 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005496IFS=$as_save_IFS
5497
5498fi
5499fi
5500ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5501if test -n "$ac_ct_RANLIB"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005502 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5503$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005504else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005505 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5506$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005507fi
5508
5509 if test "x$ac_ct_RANLIB" = x; then
5510 RANLIB=":"
5511 else
5512 case $cross_compiling:$ac_tool_warned in
5513yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005514{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5515$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005516ac_tool_warned=yes ;;
5517esac
5518 RANLIB=$ac_ct_RANLIB
5519 fi
5520else
5521 RANLIB="$ac_cv_prog_RANLIB"
5522fi
5523
5524
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005525if test -n "$ac_tool_prefix"; then
5526 for ac_prog in ar aal
5527 do
5528 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5529set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5531$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005532if ${ac_cv_prog_AR+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005533 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005534else
5535 if test -n "$AR"; then
5536 ac_cv_prog_AR="$AR" # Let the user override the test.
5537else
5538as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5539for as_dir in $PATH
5540do
5541 IFS=$as_save_IFS
5542 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005543 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005544 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005545 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005546 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005547 break 2
5548 fi
5549done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005550 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005551IFS=$as_save_IFS
5552
5553fi
5554fi
5555AR=$ac_cv_prog_AR
5556if test -n "$AR"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5558$as_echo "$AR" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005559else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5561$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005562fi
5563
5564
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005565 test -n "$AR" && break
5566 done
5567fi
5568if test -z "$AR"; then
5569 ac_ct_AR=$AR
5570 for ac_prog in ar aal
5571do
5572 # Extract the first word of "$ac_prog", so it can be a program name with args.
5573set dummy $ac_prog; ac_word=$2
5574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5575$as_echo_n "checking for $ac_word... " >&6; }
5576if ${ac_cv_prog_ac_ct_AR+:} false; then :
5577 $as_echo_n "(cached) " >&6
5578else
5579 if test -n "$ac_ct_AR"; then
5580 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5581else
5582as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5583for as_dir in $PATH
5584do
5585 IFS=$as_save_IFS
5586 test -z "$as_dir" && as_dir=.
5587 for ac_exec_ext in '' $ac_executable_extensions; do
5588 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5589 ac_cv_prog_ac_ct_AR="$ac_prog"
5590 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5591 break 2
5592 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005593done
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005594 done
5595IFS=$as_save_IFS
5596
5597fi
5598fi
5599ac_ct_AR=$ac_cv_prog_ac_ct_AR
5600if test -n "$ac_ct_AR"; then
5601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5602$as_echo "$ac_ct_AR" >&6; }
5603else
5604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5605$as_echo "no" >&6; }
5606fi
5607
5608
5609 test -n "$ac_ct_AR" && break
5610done
5611
5612 if test "x$ac_ct_AR" = x; then
5613 AR="ar"
5614 else
5615 case $cross_compiling:$ac_tool_warned in
5616yes:)
5617{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5618$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5619ac_tool_warned=yes ;;
5620esac
5621 AR=$ac_ct_AR
5622 fi
5623fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005624
5625
5626# tweak ARFLAGS only if the user didn't set it on the command line
5627
5628if test -z "$ARFLAGS"
5629then
5630 ARFLAGS="rc"
5631fi
5632
5633
5634# Extract the first word of "svnversion", so it can be a program name with args.
5635set dummy svnversion; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5637$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005638if ${ac_cv_prog_SVNVERSION+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005639 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005640else
5641 if test -n "$SVNVERSION"; then
5642 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
5643else
5644as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5645for as_dir in $PATH
5646do
5647 IFS=$as_save_IFS
5648 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005649 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005650 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005651 ac_cv_prog_SVNVERSION="found"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005652 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005653 break 2
5654 fi
5655done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005656 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005657IFS=$as_save_IFS
5658
5659 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
5660fi
5661fi
5662SVNVERSION=$ac_cv_prog_SVNVERSION
5663if test -n "$SVNVERSION"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SVNVERSION" >&5
5665$as_echo "$SVNVERSION" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005666else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5668$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005669fi
5670
5671
5672if test $SVNVERSION = found
5673then
5674 SVNVERSION="svnversion \$(srcdir)"
5675else
5676 SVNVERSION="echo Unversioned directory"
5677fi
5678
Trent Nelsond86ceec2012-10-16 09:42:45 -04005679
Trent Nelsonabf20512012-10-17 04:32:49 -04005680if test "$abs_srcdir" != "$abs_builddir"; then
Trent Nelsond86ceec2012-10-16 09:42:45 -04005681 # If we're building out-of-tree make sure Include (in the current dir)
5682 # gets picked up before its $srcdir counterpart in order for Python-ast.h
5683 # and graminit.h to get picked up from the correct directory.
5684 # (A side effect of this is that these resources will automatically be
5685 # regenerated when building out-of-tree, regardless of whether or not
5686 # the $srcdir counterpart is up-to-date. This is an acceptable trade
5687 # off.)
5688 BASECPPFLAGS="-IInclude"
5689else
5690 BASECPPFLAGS=""
5691fi
5692
Georg Brandl3a5508e2011-03-06 10:42:21 +01005693
5694
5695
5696# Extract the first word of "hg", so it can be a program name with args.
5697set dummy hg; ac_word=$2
5698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5699$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005700if ${ac_cv_prog_HAS_HG+:} false; then :
Georg Brandl3a5508e2011-03-06 10:42:21 +01005701 $as_echo_n "(cached) " >&6
5702else
5703 if test -n "$HAS_HG"; then
5704 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
5705else
5706as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5707for as_dir in $PATH
5708do
5709 IFS=$as_save_IFS
5710 test -z "$as_dir" && as_dir=.
5711 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005712 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Georg Brandl3a5508e2011-03-06 10:42:21 +01005713 ac_cv_prog_HAS_HG="found"
5714 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5715 break 2
5716 fi
5717done
5718 done
5719IFS=$as_save_IFS
5720
5721 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
5722fi
5723fi
5724HAS_HG=$ac_cv_prog_HAS_HG
5725if test -n "$HAS_HG"; then
5726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
5727$as_echo "$HAS_HG" >&6; }
5728else
5729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5730$as_echo "no" >&6; }
5731fi
5732
5733
5734if test $HAS_HG = found
5735then
5736 HGVERSION="hg id -i \$(srcdir)"
5737 HGTAG="hg id -t \$(srcdir)"
5738 HGBRANCH="hg id -b \$(srcdir)"
5739else
5740 HGVERSION=""
5741 HGTAG=""
5742 HGBRANCH=""
5743fi
5744
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005745case $MACHDEP in
5746bsdos*|hp*|HP*)
5747 # install -d does not work on BSDI or HP-UX
5748 if test -z "$INSTALL"
5749 then
5750 INSTALL="${srcdir}/install-sh -c"
5751 fi
5752esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005753# Find a good install program. We prefer a C program (faster),
5754# so one script is as good as another. But avoid the broken or
5755# incompatible versions:
5756# SysV /etc/install, /usr/sbin/install
5757# SunOS /usr/etc/install
5758# IRIX /sbin/install
5759# AIX /bin/install
5760# AmigaOS /C/install, which installs bootblocks on floppy discs
5761# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5762# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5763# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5764# OS/2's system install, which has a completely different semantic
5765# ./install, which can be erroneously created by make from ./install.sh.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005766# Reject install programs that cannot install multiple files.
5767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5768$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005769if test -z "$INSTALL"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +01005770if ${ac_cv_path_install+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005771 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005772else
5773 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5774for as_dir in $PATH
5775do
5776 IFS=$as_save_IFS
5777 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005778 # Account for people who put trailing slashes in PATH elements.
5779case $as_dir/ in #((
5780 ./ | .// | /[cC]/* | \
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005781 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005782 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005783 /usr/ucb/* ) ;;
5784 *)
5785 # OSF1 and SCO ODT 3.0 have their own names for install.
5786 # Don't use installbsd from OSF since it installs stuff as root
5787 # by default.
5788 for ac_prog in ginstall scoinst install; do
5789 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005790 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005791 if test $ac_prog = install &&
5792 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5793 # AIX install. It has an incompatible calling convention.
5794 :
5795 elif test $ac_prog = install &&
5796 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5797 # program-specific install script used by HP pwplus--don't use.
5798 :
5799 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005800 rm -rf conftest.one conftest.two conftest.dir
5801 echo one > conftest.one
5802 echo two > conftest.two
5803 mkdir conftest.dir
5804 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5805 test -s conftest.one && test -s conftest.two &&
5806 test -s conftest.dir/conftest.one &&
5807 test -s conftest.dir/conftest.two
5808 then
5809 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5810 break 3
5811 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005812 fi
5813 fi
5814 done
5815 done
5816 ;;
5817esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005818
5819 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005820IFS=$as_save_IFS
5821
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005822rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005823
5824fi
5825 if test "${ac_cv_path_install+set}" = set; then
5826 INSTALL=$ac_cv_path_install
5827 else
5828 # As a last resort, use the slow shell script. Don't cache a
5829 # value for INSTALL within a source directory, because that will
5830 # break other packages using the cache if that directory is
5831 # removed, or if the value is a relative name.
5832 INSTALL=$ac_install_sh
5833 fi
5834fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005835{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5836$as_echo "$INSTALL" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005837
5838# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5839# It thinks the first close brace ends the variable substitution.
5840test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5841
5842test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5843
5844test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5845
Trent Nelsonf6407a12012-08-30 14:56:13 +00005846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
5847$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
5848if test -z "$MKDIR_P"; then
5849 if ${ac_cv_path_mkdir+:} false; then :
5850 $as_echo_n "(cached) " >&6
5851else
5852 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5853for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
5854do
5855 IFS=$as_save_IFS
5856 test -z "$as_dir" && as_dir=.
5857 for ac_prog in mkdir gmkdir; do
5858 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005859 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Trent Nelsonf6407a12012-08-30 14:56:13 +00005860 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
5861 'mkdir (GNU coreutils) '* | \
5862 'mkdir (coreutils) '* | \
5863 'mkdir (fileutils) '4.1*)
5864 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
5865 break 3;;
5866 esac
5867 done
5868 done
5869 done
5870IFS=$as_save_IFS
5871
5872fi
5873
5874 test -d ./--version && rmdir ./--version
5875 if test "${ac_cv_path_mkdir+set}" = set; then
5876 MKDIR_P="$ac_cv_path_mkdir -p"
5877 else
5878 # As a last resort, use the slow shell script. Don't cache a
5879 # value for MKDIR_P within a source directory, because that will
5880 # break other packages using the cache if that directory is
5881 # removed, or if the value is a relative name.
5882 MKDIR_P="$ac_install_sh -d"
5883 fi
5884fi
5885{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
5886$as_echo "$MKDIR_P" >&6; }
5887
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005888
5889# Not every filesystem supports hard links
5890
5891if test -z "$LN" ; then
5892 case $ac_sys_system in
5893 BeOS*) LN="ln -s";;
5894 CYGWIN*) LN="ln -s";;
5895 atheos*) LN="ln -s";;
5896 *) LN=ln;;
5897 esac
5898fi
5899
5900# Check for --with-pydebug
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
5902$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005903
5904# Check whether --with-pydebug was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005905if test "${with_pydebug+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005906 withval=$with_pydebug;
5907if test "$withval" != no
5908then
5909
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005910$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005911
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5913$as_echo "yes" >&6; };
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005914 Py_DEBUG='true'
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005915else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5916$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005917fi
5918else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5920$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005921fi
5922
5923
5924# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5925# merged with this chunk of code?
5926
5927# Optimizer/debugger flags
5928# ------------------------
5929# (The following bit of code is complicated enough - please keep things
5930# indented properly. Just pretend you're editing Python code. ;-)
5931
5932# There are two parallel sets of case statements below, one that checks to
5933# see if OPT was set and one that does BASECFLAGS setting based upon
5934# compiler and platform. BASECFLAGS tweaks need to be made even if the
5935# user set OPT.
5936
5937# tweak OPT based on compiler and platform, only if the user didn't set
5938# it on the command line
5939
Benjamin Petersond4b721b2010-03-23 20:58:37 +00005940if test "${OPT-unset}" = "unset"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005941then
5942 case $GCC in
5943 yes)
5944 if test "$CC" != 'g++' ; then
5945 STRICT_PROTO="-Wstrict-prototypes"
5946 fi
5947 # For gcc 4.x we need to use -fwrapv so lets check if its supported
5948 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
5949 WRAP="-fwrapv"
5950 fi
Stefan Krah503e5e12011-09-14 15:19:42 +02005951
5952 # Clang also needs -fwrapv
Stefan Krah2bc1e8f2011-12-08 22:26:06 +01005953 case $CC in
5954 *clang*) WRAP="-fwrapv"
5955 ;;
5956 esac
Stefan Krah503e5e12011-09-14 15:19:42 +02005957
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005958 case $ac_cv_prog_cc_g in
5959 yes)
5960 if test "$Py_DEBUG" = 'true' ; then
5961 # Optimization messes up debuggers, so turn it off for
5962 # debug builds.
Mark Dickinsond2f3e3f2010-05-05 22:23:58 +00005963 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005964 else
5965 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
5966 fi
5967 ;;
5968 *)
5969 OPT="-O3 -Wall $STRICT_PROTO"
5970 ;;
5971 esac
5972 case $ac_sys_system in
5973 SCO_SV*) OPT="$OPT -m486 -DSCO5"
5974 ;;
5975 esac
5976 ;;
5977
5978 *)
5979 OPT="-O"
5980 ;;
5981 esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005982fi
5983
5984
5985
5986# The -arch flags for universal builds on OSX
5987UNIVERSAL_ARCH_FLAGS=
5988
5989
5990# tweak BASECFLAGS based on compiler and platform
5991case $GCC in
5992yes)
5993 # Python violates C99 rules, by casting between incompatible
5994 # pointer types. GCC may generate bad code as a result of that,
5995 # so use -fno-strict-aliasing if supported.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005996 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -fno-strict-aliasing" >&5
5997$as_echo_n "checking whether $CC accepts -fno-strict-aliasing... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005998 ac_save_cc="$CC"
5999 CC="$CC -fno-strict-aliasing"
Matthias Klose3cef2a92012-03-14 23:39:33 +01006000 if ${ac_cv_no_strict_aliasing_ok+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006001 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00006002else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006003 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006004/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00006005
6006int
6007main ()
6008{
Mark Dickinson5e13e292010-05-11 08:55:06 +00006009
Gregory P. Smith373469a2009-11-01 21:03:38 +00006010 ;
6011 return 0;
6012}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006013_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006014if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006015 ac_cv_no_strict_aliasing_ok=yes
6016else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006017 ac_cv_no_strict_aliasing_ok=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006018fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00006019rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00006020fi
6021
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006022 CC="$ac_save_cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing_ok" >&5
6024$as_echo "$ac_cv_no_strict_aliasing_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006025 if test $ac_cv_no_strict_aliasing_ok = yes
6026 then
6027 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6028 fi
6029
6030 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
6031 # support. Without this, treatment of subnormals doesn't follow
6032 # the standard.
doko@python.orgd65e2ba2013-01-31 23:52:03 +01006033 case $host in
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006034 alpha*)
6035 BASECFLAGS="$BASECFLAGS -mieee"
6036 ;;
6037 esac
6038
6039 case $ac_sys_system in
6040 SCO_SV*)
6041 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
6042 ;;
6043 # is there any other compiler on Darwin besides gcc?
6044 Darwin*)
6045 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
6046 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006047 if test "${CC}" = gcc
6048 then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006049 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
6050$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006051 case "${UNIVERSALSDK}" in
6052 */MacOSX10.4u.sdk)
6053 # Build using 10.4 SDK, force usage of gcc when the
6054 # compiler is gcc, otherwise the user will get very
6055 # confusing error messages when building on OSX 10.6
6056 CC=gcc-4.0
6057 CPP=cpp-4.0
6058 ;;
6059 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
6061$as_echo "$CC" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006062 fi
6063
6064 # Calculate the right deployment target for this build.
6065 #
Ned Deilyc40b9032014-06-25 13:48:46 -07006066 cur_target_major=`sw_vers -productVersion | \
6067 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
6068 cur_target_minor=`sw_vers -productVersion | \
6069 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
6070 cur_target="${cur_target_major}.${cur_target_minor}"
6071 if test ${cur_target_major} -eq 10 && \
6072 test ${cur_target_minor} -ge 3
6073 then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006074 cur_target=10.3
Ronald Oussoren25967582009-09-06 10:00:26 +00006075 if test ${enable_universalsdk}; then
6076 if test "${UNIVERSAL_ARCHS}" = "all"; then
6077 # Ensure that the default platform for a
6078 # 4-way universal build is OSX 10.5,
6079 # that's the first OS release where
6080 # 4-way builds make sense.
6081 cur_target='10.5'
Ronald Oussoren23d92532009-09-07 06:12:00 +00006082
6083 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
6084 cur_target='10.5'
6085
6086 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
6087 cur_target='10.5'
6088
6089 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
6090 cur_target='10.5'
Ronald Oussoren25967582009-09-06 10:00:26 +00006091 fi
6092 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00006093 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren25967582009-09-06 10:00:26 +00006094 # On Intel macs default to a deployment
6095 # target of 10.4, that's the first OSX
6096 # release with Intel support.
6097 cur_target="10.4"
6098 fi
6099 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006100 fi
6101 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
6102
6103 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
6104 # environment with a value that is the same as what we'll use
6105 # in the Makefile to ensure that we'll get the same compiler
6106 # environment during configure and build time.
6107 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
6108 export MACOSX_DEPLOYMENT_TARGET
6109 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
6110
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006111 if test "${enable_universalsdk}"; then
6112 UNIVERSAL_ARCH_FLAGS=""
6113 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
6114 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
6115 ARCH_RUN_32BIT=""
Ronald Oussoren75912852010-04-08 08:13:31 +00006116 LIPO_32BIT_FLAGS=""
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006117
6118 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
6119 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
6120 LIPO_32BIT_FLAGS=""
6121 ARCH_RUN_32BIT="true"
6122
6123 elif test "$UNIVERSAL_ARCHS" = "all" ; then
6124 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
6125 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren92397ce2010-01-17 19:32:00 +00006126 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006127
6128 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
6129 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
6130 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren92397ce2010-01-17 19:32:00 +00006131 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006132
6133 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
6134 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
6135 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren9922f172010-02-11 13:19:34 +00006136 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006137
6138 else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006139 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006140
6141 fi
6142
6143
Ronald Oussoren974eb5e2010-04-18 17:59:37 +00006144 CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
6145 if test "${UNIVERSALSDK}" != "/"
6146 then
6147 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
6148 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
6149 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006150 fi
6151
6152 fi
6153
6154
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006155 ;;
6156 OSF*)
6157 BASECFLAGS="$BASECFLAGS -mieee"
6158 ;;
6159 esac
6160 ;;
6161
6162*)
6163 case $ac_sys_system in
6164 OpenUNIX*|UnixWare*)
6165 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
6166 ;;
6167 OSF*)
6168 BASECFLAGS="$BASECFLAGS -ieee -std"
6169 ;;
6170 SCO_SV*)
6171 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
6172 ;;
6173 esac
6174 ;;
6175esac
6176
6177if test "$Py_DEBUG" = 'true'; then
6178 :
6179else
6180 OPT="-DNDEBUG $OPT"
6181fi
6182
6183if test "$ac_arch_flags"
6184then
6185 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
6186fi
6187
6188# disable check for icc since it seems to pass, but generates a warning
6189if test "$CC" = icc
6190then
6191 ac_cv_opt_olimit_ok=no
6192fi
6193
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -OPT:Olimit=0" >&5
6195$as_echo_n "checking whether $CC accepts -OPT:Olimit=0... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006196if ${ac_cv_opt_olimit_ok+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006197 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006198else
6199 ac_save_cc="$CC"
6200CC="$CC -OPT:Olimit=0"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006201cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006202/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00006203
6204int
6205main ()
6206{
Mark Dickinson5e13e292010-05-11 08:55:06 +00006207
Gregory P. Smith373469a2009-11-01 21:03:38 +00006208 ;
6209 return 0;
6210}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006211_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006212if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006213 ac_cv_opt_olimit_ok=yes
6214else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006215 ac_cv_opt_olimit_ok=no
Matthias Klosec511b472010-05-08 11:01:39 +00006216
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006217fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00006218rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006219CC="$ac_save_cc"
6220fi
6221
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006222{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_opt_olimit_ok" >&5
6223$as_echo "$ac_cv_opt_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006224if test $ac_cv_opt_olimit_ok = yes; then
6225 case $ac_sys_system in
6226 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
6227 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
6228 # environment?
6229 Darwin*)
6230 ;;
Trent Nelson34562e12012-10-17 18:01:12 -04006231 # XXX thankfully this useless troublemaker of a flag has been
6232 # eradicated in the 3.x line. For now, make sure it isn't picked
6233 # up by any of our other platforms that use CC.
6234 AIX*|SunOS*|HP-UX*|IRIX*)
6235 ;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006236 *)
6237 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
6238 ;;
6239 esac
6240else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006241 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Olimit 1500" >&5
6242$as_echo_n "checking whether $CC accepts -Olimit 1500... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006243 if ${ac_cv_olimit_ok+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006244 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006245else
6246 ac_save_cc="$CC"
6247 CC="$CC -Olimit 1500"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006248 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006249/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00006250
6251int
6252main ()
6253{
Mark Dickinson5e13e292010-05-11 08:55:06 +00006254
Gregory P. Smith373469a2009-11-01 21:03:38 +00006255 ;
6256 return 0;
6257}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006258_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006259if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006260 ac_cv_olimit_ok=yes
6261else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006262 ac_cv_olimit_ok=no
Matthias Klosec511b472010-05-08 11:01:39 +00006263
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006264fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00006265rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006266 CC="$ac_save_cc"
6267fi
6268
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006269 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_olimit_ok" >&5
6270$as_echo "$ac_cv_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006271 if test $ac_cv_olimit_ok = yes; then
Stefan Krah67473262012-11-29 00:17:05 +01006272 case $ac_sys_system in
6273 # Issue #16534: On HP-UX ac_cv_olimit_ok=yes is a false positive.
6274 HP-UX*)
6275 ;;
6276 *)
6277 BASECFLAGS="$BASECFLAGS -Olimit 1500"
6278 ;;
6279 esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006280 fi
6281fi
6282
6283# Check whether GCC supports PyArg_ParseTuple format
6284if test "$GCC" = "yes"
6285then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006286 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
6287$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006288 save_CFLAGS=$CFLAGS
Benjamin Petersonc8759662013-05-11 13:00:05 -05006289 CFLAGS="$CFLAGS -Werror -Wformat"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006290 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006291/* end confdefs.h. */
6292
6293 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006294int
6295main ()
6296{
6297
6298 ;
6299 return 0;
6300}
Matthias Klosec511b472010-05-08 11:01:39 +00006301
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006302_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006303if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006304
Matthias Klosec511b472010-05-08 11:01:39 +00006305
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006306$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006307
Matthias Klosec511b472010-05-08 11:01:39 +00006308 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006309$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00006310
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006311else
Matthias Klosec511b472010-05-08 11:01:39 +00006312
6313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006314$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006315
6316fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006317rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6318 CFLAGS=$save_CFLAGS
6319fi
6320
6321# On some compilers, pthreads are available without further options
6322# (e.g. MacOS X). On some of these systems, the compiler will not
6323# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
6324# So we have to see first whether pthreads are available without
6325# options before we can check whether -Kpthread improves anything.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006326{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
6327$as_echo_n "checking whether pthreads are available without options... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006328if ${ac_cv_pthread_is_default+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006329 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006330else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006331 if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006332 ac_cv_pthread_is_default=no
6333else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006334 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006335/* end confdefs.h. */
6336
Stefan Krahae66ca62012-11-22 22:36:57 +01006337#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006338#include <pthread.h>
6339
6340void* routine(void* p){return NULL;}
6341
6342int main(){
6343 pthread_t p;
6344 if(pthread_create(&p,NULL,routine,NULL)!=0)
6345 return 1;
6346 (void)pthread_detach(p);
6347 return 0;
6348}
6349
6350_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006351if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006352
6353 ac_cv_pthread_is_default=yes
6354 ac_cv_kthread=no
6355 ac_cv_pthread=no
6356
6357else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006358 ac_cv_pthread_is_default=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006359fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006360rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6361 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006362fi
6363
6364
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006365fi
6366
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006367{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
6368$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006369
6370
6371if test $ac_cv_pthread_is_default = yes
6372then
6373 ac_cv_kpthread=no
6374else
6375# -Kpthread, if available, provides the right #defines
6376# and linker options to make pthread_create available
6377# Some compilers won't report that they do not support -Kpthread,
6378# so we need to run a program to see whether it really made the
6379# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006380{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
6381$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006382if ${ac_cv_kpthread+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006383 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006384else
6385 ac_save_cc="$CC"
6386CC="$CC -Kpthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006387if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006388 ac_cv_kpthread=no
6389else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006390 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006391/* end confdefs.h. */
6392
Stefan Krahae66ca62012-11-22 22:36:57 +01006393#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006394#include <pthread.h>
6395
6396void* routine(void* p){return NULL;}
6397
6398int main(){
6399 pthread_t p;
6400 if(pthread_create(&p,NULL,routine,NULL)!=0)
6401 return 1;
6402 (void)pthread_detach(p);
6403 return 0;
6404}
6405
6406_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006407if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006408 ac_cv_kpthread=yes
6409else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006410 ac_cv_kpthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006411fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006412rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6413 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006414fi
6415
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006416CC="$ac_save_cc"
6417fi
6418
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006419{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
6420$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006421fi
6422
6423if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
6424then
6425# -Kthread, if available, provides the right #defines
6426# and linker options to make pthread_create available
6427# Some compilers won't report that they do not support -Kthread,
6428# so we need to run a program to see whether it really made the
6429# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
6431$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006432if ${ac_cv_kthread+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006433 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006434else
6435 ac_save_cc="$CC"
6436CC="$CC -Kthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006437if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006438 ac_cv_kthread=no
6439else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006440 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006441/* end confdefs.h. */
6442
Stefan Krahae66ca62012-11-22 22:36:57 +01006443#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006444#include <pthread.h>
6445
6446void* routine(void* p){return NULL;}
6447
6448int main(){
6449 pthread_t p;
6450 if(pthread_create(&p,NULL,routine,NULL)!=0)
6451 return 1;
6452 (void)pthread_detach(p);
6453 return 0;
6454}
6455
6456_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006457if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006458 ac_cv_kthread=yes
6459else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006460 ac_cv_kthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006461fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006462rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6463 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006464fi
6465
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006466CC="$ac_save_cc"
6467fi
6468
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006469{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
6470$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006471fi
6472
6473if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
6474then
6475# -pthread, if available, provides the right #defines
6476# and linker options to make pthread_create available
6477# Some compilers won't report that they do not support -pthread,
6478# so we need to run a program to see whether it really made the
6479# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
6481$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.orgfa3f9a32013-01-25 15:32:31 +01006482if ${ac_cv_pthread+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006483 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006484else
6485 ac_save_cc="$CC"
6486CC="$CC -pthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006487if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006488 ac_cv_pthread=no
6489else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006490 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006491/* end confdefs.h. */
6492
Stefan Krahae66ca62012-11-22 22:36:57 +01006493#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006494#include <pthread.h>
6495
6496void* routine(void* p){return NULL;}
6497
6498int main(){
6499 pthread_t p;
6500 if(pthread_create(&p,NULL,routine,NULL)!=0)
6501 return 1;
6502 (void)pthread_detach(p);
6503 return 0;
6504}
6505
6506_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006507if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006508 ac_cv_pthread=yes
6509else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006510 ac_cv_pthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006511fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006512rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6513 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006514fi
6515
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006516CC="$ac_save_cc"
6517fi
6518
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006519{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
6520$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006521fi
6522
6523# If we have set a CC compiler flag for thread support then
6524# check if it works for CXX, too.
6525ac_cv_cxx_thread=no
6526if test ! -z "$CXX"
6527then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
6529$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006530ac_save_cxx="$CXX"
6531
6532if test "$ac_cv_kpthread" = "yes"
6533then
6534 CXX="$CXX -Kpthread"
6535 ac_cv_cxx_thread=yes
6536elif test "$ac_cv_kthread" = "yes"
6537then
6538 CXX="$CXX -Kthread"
6539 ac_cv_cxx_thread=yes
6540elif test "$ac_cv_pthread" = "yes"
6541then
6542 CXX="$CXX -pthread"
6543 ac_cv_cxx_thread=yes
6544fi
6545
6546if test $ac_cv_cxx_thread = yes
6547then
6548 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
6549 $CXX -c conftest.$ac_ext 2>&5
6550 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
6551 && test -s conftest$ac_exeext && ./conftest$ac_exeext
6552 then
6553 ac_cv_cxx_thread=yes
6554 else
6555 ac_cv_cxx_thread=no
6556 fi
6557 rm -fr conftest*
6558fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006559{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
6560$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006561fi
6562CXX="$ac_save_cxx"
6563
6564
6565# checks for header files
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6567$as_echo_n "checking for ANSI C header files... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006568if ${ac_cv_header_stdc+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006569 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006570else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006571 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006572/* end confdefs.h. */
6573#include <stdlib.h>
6574#include <stdarg.h>
6575#include <string.h>
6576#include <float.h>
6577
6578int
6579main ()
6580{
6581
6582 ;
6583 return 0;
6584}
6585_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006586if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006587 ac_cv_header_stdc=yes
6588else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006589 ac_cv_header_stdc=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006590fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006591rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6592
6593if test $ac_cv_header_stdc = yes; then
6594 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006595 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006596/* end confdefs.h. */
6597#include <string.h>
6598
6599_ACEOF
6600if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006601 $EGREP "memchr" >/dev/null 2>&1; then :
6602
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006603else
6604 ac_cv_header_stdc=no
6605fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006606rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006607
6608fi
6609
6610if test $ac_cv_header_stdc = yes; then
6611 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006612 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006613/* end confdefs.h. */
6614#include <stdlib.h>
6615
6616_ACEOF
6617if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006618 $EGREP "free" >/dev/null 2>&1; then :
6619
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006620else
6621 ac_cv_header_stdc=no
6622fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006623rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006624
6625fi
6626
6627if test $ac_cv_header_stdc = yes; then
6628 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006629 if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006630 :
6631else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006632 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006633/* end confdefs.h. */
6634#include <ctype.h>
6635#include <stdlib.h>
6636#if ((' ' & 0x0FF) == 0x020)
6637# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6638# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6639#else
6640# define ISLOWER(c) \
6641 (('a' <= (c) && (c) <= 'i') \
6642 || ('j' <= (c) && (c) <= 'r') \
6643 || ('s' <= (c) && (c) <= 'z'))
6644# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6645#endif
6646
6647#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6648int
6649main ()
6650{
6651 int i;
6652 for (i = 0; i < 256; i++)
6653 if (XOR (islower (i), ISLOWER (i))
6654 || toupper (i) != TOUPPER (i))
6655 return 2;
6656 return 0;
6657}
6658_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006659if ac_fn_c_try_run "$LINENO"; then :
6660
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006661else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006662 ac_cv_header_stdc=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006663fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006664rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6665 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006666fi
6667
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006668fi
6669fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006670{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6671$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006672if test $ac_cv_header_stdc = yes; then
6673
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006674$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006675
6676fi
6677
doko@ubuntu.comf27ec3e2014-04-17 20:11:19 +02006678for ac_header in asm/types.h conio.h direct.h dlfcn.h errno.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00006679fcntl.h grp.h \
doko@ubuntu.comf27ec3e2014-04-17 20:11:19 +02006680ieeefp.h io.h langinfo.h libintl.h poll.h process.h pthread.h \
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00006681shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006682unistd.h utime.h \
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00006683sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
6684sys/lock.h sys/mkdev.h sys/modem.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00006685sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
Martin v. Löwis8c255e42008-05-23 15:06:50 +00006686sys/termio.h sys/time.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00006687sys/times.h sys/types.h sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \
Martin v. Löwis0347a9a2006-10-27 07:06:52 +00006688sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimes3aa138f2013-06-18 13:25:24 +02006689bluetooth/bluetooth.h linux/tipc.h spawn.h util.h alloca.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006690do :
6691 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6692ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006693if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006694 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006695#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006696_ACEOF
6697
6698fi
6699
Guido van Rossum627b2d71993-12-24 10:39:16 +00006700done
6701
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006702ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006703for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006704 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6706$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006707if eval \${$as_ac_Header+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006708 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006709else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006710 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006711/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006712#include <sys/types.h>
6713#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006714
Martin v. Löwis11437992002-04-12 09:54:03 +00006715int
6716main ()
6717{
6718if ((DIR *) 0)
6719return 0;
6720 ;
6721 return 0;
6722}
6723_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006724if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006725 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006726else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006727 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006728fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006729rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006730fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006731eval ac_res=\$$as_ac_Header
6732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6733$as_echo "$ac_res" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006734if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006735 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006736#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006737_ACEOF
6738
6739ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006740fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006741
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006742done
6743# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6744if test $ac_header_dirent = dirent.h; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006745 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6746$as_echo_n "checking for library containing opendir... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006747if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006748 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006749else
Martin v. Löwis11437992002-04-12 09:54:03 +00006750 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006751cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006752/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006753
Martin v. Löwiseba40652007-08-30 20:10:57 +00006754/* Override any GCC internal prototype to avoid an error.
6755 Use char because int might match the return type of a GCC
6756 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006757#ifdef __cplusplus
6758extern "C"
6759#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006760char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006761int
6762main ()
6763{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006764return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006765 ;
6766 return 0;
6767}
6768_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006769for ac_lib in '' dir; do
6770 if test -z "$ac_lib"; then
6771 ac_res="none required"
6772 else
6773 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00006774 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00006775 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006776 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006777 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00006778fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006779rm -f core conftest.err conftest.$ac_objext \
6780 conftest$ac_exeext
Matthias Klose3cef2a92012-03-14 23:39:33 +01006781 if ${ac_cv_search_opendir+:} false; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006782 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00006783fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006784done
Matthias Klose3cef2a92012-03-14 23:39:33 +01006785if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006786
Martin v. Löwiseba40652007-08-30 20:10:57 +00006787else
6788 ac_cv_search_opendir=no
6789fi
6790rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006791LIBS=$ac_func_search_save_LIBS
6792fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006793{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6794$as_echo "$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006795ac_res=$ac_cv_search_opendir
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006796if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006797 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006798
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006799fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006800
Michael W. Hudson54241132001-12-07 15:38:26 +00006801else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006802 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6803$as_echo_n "checking for library containing opendir... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006804if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006805 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006806else
6807 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006808cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006809/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006810
Martin v. Löwiseba40652007-08-30 20:10:57 +00006811/* Override any GCC internal prototype to avoid an error.
6812 Use char because int might match the return type of a GCC
6813 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006814#ifdef __cplusplus
6815extern "C"
6816#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006817char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006818int
6819main ()
6820{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006821return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006822 ;
6823 return 0;
6824}
6825_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006826for ac_lib in '' x; do
6827 if test -z "$ac_lib"; then
6828 ac_res="none required"
6829 else
6830 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00006831 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00006832 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006833 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006834 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00006835fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006836rm -f core conftest.err conftest.$ac_objext \
6837 conftest$ac_exeext
Matthias Klose3cef2a92012-03-14 23:39:33 +01006838 if ${ac_cv_search_opendir+:} false; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006839 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00006840fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006841done
Matthias Klose3cef2a92012-03-14 23:39:33 +01006842if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006843
Martin v. Löwiseba40652007-08-30 20:10:57 +00006844else
6845 ac_cv_search_opendir=no
6846fi
6847rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006848LIBS=$ac_func_search_save_LIBS
6849fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006850{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6851$as_echo "$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006852ac_res=$ac_cv_search_opendir
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006853if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006854 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006855
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006856fi
6857
6858fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006859
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
6861$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006862if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006863 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006864else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006865 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006866/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006867#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006868int
6869main ()
6870{
6871return makedev(0, 0);
6872 ;
6873 return 0;
6874}
6875_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006876if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006877 ac_cv_header_sys_types_h_makedev=yes
6878else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006879 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006880fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006881rm -f core conftest.err conftest.$ac_objext \
6882 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006883
6884fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006885{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
6886$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006887
6888if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006889ac_fn_c_check_header_mongrel "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01006890if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006891
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006892$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006893
6894fi
6895
6896
6897
6898 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006899 ac_fn_c_check_header_mongrel "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01006900if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006901
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006902$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006903
6904fi
6905
6906
6907 fi
6908fi
6909
Michael W. Hudson54241132001-12-07 15:38:26 +00006910
Martin v. Löwis11017b12006-01-14 18:12:57 +00006911# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00006912for ac_header in linux/netlink.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006913do :
6914 ac_fn_c_check_header_compile "$LINENO" "linux/netlink.h" "ac_cv_header_linux_netlink_h" "
Martin v. Löwis11017b12006-01-14 18:12:57 +00006915#ifdef HAVE_ASM_TYPES_H
6916#include <asm/types.h>
6917#endif
6918#ifdef HAVE_SYS_SOCKET_H
6919#include <sys/socket.h>
6920#endif
6921
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006922"
Matthias Klose3cef2a92012-03-14 23:39:33 +01006923if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00006924 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006925#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006926_ACEOF
6927
6928fi
6929
6930done
6931
6932
Guido van Rossum627b2d71993-12-24 10:39:16 +00006933# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006934was_it_defined=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
6936$as_echo_n "checking for clock_t in time.h... " >&6; }
6937cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006938/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006939#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006940
6941_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006942if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006943 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00006944 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006945else
Martin v. Löwis11437992002-04-12 09:54:03 +00006946
6947
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006948$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00006949
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006950
Guido van Rossum627b2d71993-12-24 10:39:16 +00006951fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006952rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006953
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006954{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
6955$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006956
Neal Norwitz11690112002-07-30 01:08:28 +00006957# Check whether using makedev requires defining _OSF_SOURCE
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
6959$as_echo_n "checking for makedev... " >&6; }
6960cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006961/* end confdefs.h. */
Jesus Cea616de772010-04-28 10:32:30 +00006962
6963#if defined(MAJOR_IN_MKDEV)
6964#include <sys/mkdev.h>
6965#elif defined(MAJOR_IN_SYSMACROS)
6966#include <sys/sysmacros.h>
6967#else
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006968#include <sys/types.h>
Jesus Cea616de772010-04-28 10:32:30 +00006969#endif
Neal Norwitz11690112002-07-30 01:08:28 +00006970int
6971main ()
6972{
6973 makedev(0, 0)
6974 ;
6975 return 0;
6976}
6977_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006978if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006979 ac_cv_has_makedev=yes
6980else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006981 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006982fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006983rm -f core conftest.err conftest.$ac_objext \
6984 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006985if test "$ac_cv_has_makedev" = "no"; then
6986 # we didn't link, try if _OSF_SOURCE will allow us to link
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006987 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006988/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006989
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006990#define _OSF_SOURCE 1
6991#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006992
Neal Norwitz11690112002-07-30 01:08:28 +00006993int
6994main ()
6995{
6996 makedev(0, 0)
6997 ;
6998 return 0;
6999}
7000_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007001if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007002 ac_cv_has_makedev=yes
7003else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007004 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007005fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007006rm -f core conftest.err conftest.$ac_objext \
7007 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00007008 if test "$ac_cv_has_makedev" = "yes"; then
7009
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007010$as_echo "#define _OSF_SOURCE 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007011
7012 fi
7013fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007014{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
7015$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007016if test "$ac_cv_has_makedev" = "yes"; then
7017
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007018$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007019
7020fi
7021
Martin v. Löwis399a6892002-10-04 10:22:02 +00007022# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
7023# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
7024# defined, but the compiler does not support pragma redefine_extname,
7025# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
7026# structures (such as rlimit64) without declaring them. As a
7027# work-around, disable LFS on such configurations
7028
7029use_lfs=yes
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
7031$as_echo_n "checking Solaris LFS bug... " >&6; }
7032cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007033/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00007034
7035#define _LARGEFILE_SOURCE 1
7036#define _FILE_OFFSET_BITS 64
7037#include <sys/resource.h>
7038
Martin v. Löwis399a6892002-10-04 10:22:02 +00007039int
7040main ()
7041{
7042struct rlimit foo;
7043 ;
7044 return 0;
7045}
7046_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007047if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00007048 sol_lfs_bug=no
7049else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007050 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00007051fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007052rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007053{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
7054$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00007055if test "$sol_lfs_bug" = "yes"; then
7056 use_lfs=no
7057fi
7058
7059if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00007060# Two defines needed to enable largefile support on various platforms
7061# These may affect some typedefs
Georg Brandl94800df2011-02-25 11:09:02 +00007062case $ac_sys_system/$ac_sys_release in
7063AIX*)
7064
7065$as_echo "#define _LARGE_FILES 1" >>confdefs.h
7066
7067 ;;
7068esac
Guido van Rossum810cc512001-09-09 23:51:39 +00007069
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007070$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007071
7072
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007073$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00007074
Martin v. Löwis399a6892002-10-04 10:22:02 +00007075fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007076
Guido van Rossum84e7b241996-08-19 21:59:00 +00007077# Add some code to confdefs.h so that the test for off_t works on SCO
7078cat >> confdefs.h <<\EOF
7079#if defined(SCO_DS)
7080#undef _OFF_T
7081#endif
7082EOF
7083
Guido van Rossumef2255b2000-03-10 22:30:29 +00007084# Type availability checks
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007085ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007086if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007087
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007088else
Martin v. Löwis11437992002-04-12 09:54:03 +00007089
7090cat >>confdefs.h <<_ACEOF
7091#define mode_t int
7092_ACEOF
7093
7094fi
7095
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007096ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007097if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007098
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007099else
Martin v. Löwis11437992002-04-12 09:54:03 +00007100
7101cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007102#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00007103_ACEOF
7104
7105fi
7106
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007107ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007108if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007109
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007110else
Martin v. Löwis11437992002-04-12 09:54:03 +00007111
7112cat >>confdefs.h <<_ACEOF
7113#define pid_t int
7114_ACEOF
7115
7116fi
7117
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007118
Martin v. Löwis11437992002-04-12 09:54:03 +00007119cat >>confdefs.h <<_ACEOF
Matthias Klosecbf54b12010-05-08 11:04:18 +00007120#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00007121_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007122
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007123ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007124if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007125
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007126else
Martin v. Löwis11437992002-04-12 09:54:03 +00007127
7128cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007129#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007130_ACEOF
7131
7132fi
7133
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
7135$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007136if ${ac_cv_type_uid_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007137 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007138else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007139 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007140/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007141#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007142
7143_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007144if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007145 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007146 ac_cv_type_uid_t=yes
7147else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007148 ac_cv_type_uid_t=no
7149fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00007150rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007151
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007152fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007153{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
7154$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007155if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007156
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007157$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007158
7159
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007160$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007161
7162fi
7163
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007164
7165# There are two separate checks for each of the exact-width integer types we
7166# need. First we check whether the type is available using the usual
7167# AC_CHECK_TYPE macro with the default includes (which includes <inttypes.h>
7168# and <stdint.h> where available). We then also use the special type checks of
7169# the form AC_TYPE_UINT32_T, which in the case that uint32_t is not available
7170# directly, #define's uint32_t to be a suitable type.
7171
7172ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
7173if test "x$ac_cv_type_uint32_t" = xyes; then :
7174
7175$as_echo "#define HAVE_UINT32_T 1" >>confdefs.h
7176
7177fi
7178
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007179ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
7180case $ac_cv_c_uint32_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007181 no|yes) ;; #(
7182 *)
7183
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007184$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007185
7186
7187cat >>confdefs.h <<_ACEOF
7188#define uint32_t $ac_cv_c_uint32_t
7189_ACEOF
7190;;
7191 esac
7192
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007193
7194ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
7195if test "x$ac_cv_type_uint64_t" = xyes; then :
7196
7197$as_echo "#define HAVE_UINT64_T 1" >>confdefs.h
7198
7199fi
7200
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007201ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
7202case $ac_cv_c_uint64_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007203 no|yes) ;; #(
7204 *)
7205
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007206$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007207
7208
7209cat >>confdefs.h <<_ACEOF
7210#define uint64_t $ac_cv_c_uint64_t
7211_ACEOF
7212;;
7213 esac
7214
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007215
7216ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
7217if test "x$ac_cv_type_int32_t" = xyes; then :
7218
7219$as_echo "#define HAVE_INT32_T 1" >>confdefs.h
7220
7221fi
7222
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007223ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
7224case $ac_cv_c_int32_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007225 no|yes) ;; #(
7226 *)
7227
7228cat >>confdefs.h <<_ACEOF
7229#define int32_t $ac_cv_c_int32_t
7230_ACEOF
7231;;
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007232esac
7233
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007234
7235ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
7236if test "x$ac_cv_type_int64_t" = xyes; then :
7237
7238$as_echo "#define HAVE_INT64_T 1" >>confdefs.h
7239
7240fi
7241
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007242ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
7243case $ac_cv_c_int64_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007244 no|yes) ;; #(
7245 *)
7246
7247cat >>confdefs.h <<_ACEOF
7248#define int64_t $ac_cv_c_int64_t
7249_ACEOF
7250;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007251esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00007252
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007253
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007254ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007255if test "x$ac_cv_type_ssize_t" = xyes; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007256
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007257$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00007258
7259fi
7260
Jack Jansendd19cf82001-12-06 22:36:17 +00007261
Michael W. Hudson54241132001-12-07 15:38:26 +00007262# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007263# ANSI C requires sizeof(char) == 1, so no need to check it
Martin v. Löwiseba40652007-08-30 20:10:57 +00007264# The cast to long int works around a bug in the HP C Compiler
7265# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7266# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7267# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
7269$as_echo_n "checking size of int... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007270if ${ac_cv_sizeof_int+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007271 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007272else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007273 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007274
Martin v. Löwis11437992002-04-12 09:54:03 +00007275else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007276 if test "$ac_cv_type_int" = yes; then
7277 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7278$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007279as_fn_error 77 "cannot compute sizeof (int)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007280See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007281 else
7282 ac_cv_sizeof_int=0
7283 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007284fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007285
Martin v. Löwis11437992002-04-12 09:54:03 +00007286fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007287{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
7288$as_echo "$ac_cv_sizeof_int" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007289
7290
7291
Martin v. Löwis11437992002-04-12 09:54:03 +00007292cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007293#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007294_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007295
7296
Martin v. Löwiseba40652007-08-30 20:10:57 +00007297# The cast to long int works around a bug in the HP C Compiler
7298# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7299# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7300# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
7302$as_echo_n "checking size of long... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007303if ${ac_cv_sizeof_long+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007304 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007305else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007306 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007307
Martin v. Löwis11437992002-04-12 09:54:03 +00007308else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007309 if test "$ac_cv_type_long" = yes; then
7310 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7311$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007312as_fn_error 77 "cannot compute sizeof (long)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007313See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007314 else
7315 ac_cv_sizeof_long=0
7316 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007317fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007318
Martin v. Löwis11437992002-04-12 09:54:03 +00007319fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007320{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
7321$as_echo "$ac_cv_sizeof_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007322
7323
7324
Martin v. Löwis11437992002-04-12 09:54:03 +00007325cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007326#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007327_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007328
7329
Martin v. Löwiseba40652007-08-30 20:10:57 +00007330# The cast to long int works around a bug in the HP C Compiler
7331# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7332# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7333# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
7335$as_echo_n "checking size of void *... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007336if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007337 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007338else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007339 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007340
Martin v. Löwis11437992002-04-12 09:54:03 +00007341else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007342 if test "$ac_cv_type_void_p" = yes; then
7343 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7344$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007345as_fn_error 77 "cannot compute sizeof (void *)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007346See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007347 else
7348 ac_cv_sizeof_void_p=0
7349 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007350fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007351
Martin v. Löwis11437992002-04-12 09:54:03 +00007352fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007353{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
7354$as_echo "$ac_cv_sizeof_void_p" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007355
7356
7357
Martin v. Löwis11437992002-04-12 09:54:03 +00007358cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007359#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00007360_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007361
7362
Martin v. Löwiseba40652007-08-30 20:10:57 +00007363# The cast to long int works around a bug in the HP C Compiler
7364# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7365# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7366# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
7368$as_echo_n "checking size of short... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007369if ${ac_cv_sizeof_short+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007370 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007371else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007372 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007373
Martin v. Löwis11437992002-04-12 09:54:03 +00007374else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007375 if test "$ac_cv_type_short" = yes; then
7376 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7377$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007378as_fn_error 77 "cannot compute sizeof (short)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007379See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007380 else
7381 ac_cv_sizeof_short=0
7382 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007383fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007384
Martin v. Löwis11437992002-04-12 09:54:03 +00007385fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007386{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
7387$as_echo "$ac_cv_sizeof_short" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007388
7389
7390
Martin v. Löwis11437992002-04-12 09:54:03 +00007391cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007392#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007393_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007394
7395
Martin v. Löwiseba40652007-08-30 20:10:57 +00007396# The cast to long int works around a bug in the HP C Compiler
7397# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7398# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7399# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
7401$as_echo_n "checking size of float... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007402if ${ac_cv_sizeof_float+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007403 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007404else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007405 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (float))" "ac_cv_sizeof_float" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007406
Martin v. Löwis11437992002-04-12 09:54:03 +00007407else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007408 if test "$ac_cv_type_float" = yes; then
7409 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7410$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007411as_fn_error 77 "cannot compute sizeof (float)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007412See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007413 else
7414 ac_cv_sizeof_float=0
7415 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007416fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007417
Martin v. Löwis11437992002-04-12 09:54:03 +00007418fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007419{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
7420$as_echo "$ac_cv_sizeof_float" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007421
7422
7423
Martin v. Löwis11437992002-04-12 09:54:03 +00007424cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007425#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007426_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007427
7428
Martin v. Löwiseba40652007-08-30 20:10:57 +00007429# The cast to long int works around a bug in the HP C Compiler
7430# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7431# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7432# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
7434$as_echo_n "checking size of double... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007435if ${ac_cv_sizeof_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007436 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007437else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007438 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (double))" "ac_cv_sizeof_double" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007439
Martin v. Löwis11437992002-04-12 09:54:03 +00007440else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007441 if test "$ac_cv_type_double" = yes; then
7442 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7443$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007444as_fn_error 77 "cannot compute sizeof (double)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007445See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007446 else
7447 ac_cv_sizeof_double=0
7448 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007449fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007450
Martin v. Löwis11437992002-04-12 09:54:03 +00007451fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007452{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
7453$as_echo "$ac_cv_sizeof_double" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007454
7455
7456
Martin v. Löwis11437992002-04-12 09:54:03 +00007457cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007458#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007459_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007460
7461
Martin v. Löwiseba40652007-08-30 20:10:57 +00007462# The cast to long int works around a bug in the HP C Compiler
7463# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7464# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7465# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
7467$as_echo_n "checking size of fpos_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007468if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007469 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007470else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007471 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (fpos_t))" "ac_cv_sizeof_fpos_t" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007472
Martin v. Löwis11437992002-04-12 09:54:03 +00007473else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007474 if test "$ac_cv_type_fpos_t" = yes; then
7475 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7476$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007477as_fn_error 77 "cannot compute sizeof (fpos_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007478See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007479 else
7480 ac_cv_sizeof_fpos_t=0
7481 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007482fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007483
Martin v. Löwis11437992002-04-12 09:54:03 +00007484fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007485{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
7486$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007487
7488
7489
Martin v. Löwis11437992002-04-12 09:54:03 +00007490cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007491#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007492_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007493
Michael W. Hudson54241132001-12-07 15:38:26 +00007494
Martin v. Löwiseba40652007-08-30 20:10:57 +00007495# The cast to long int works around a bug in the HP C Compiler
7496# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7497# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7498# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
7500$as_echo_n "checking size of size_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007501if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007502 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007503else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007504 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t" "$ac_includes_default"; then :
Martin v. Löwis18e16552006-02-15 17:27:45 +00007505
Martin v. Löwis18e16552006-02-15 17:27:45 +00007506else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007507 if test "$ac_cv_type_size_t" = yes; then
7508 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7509$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007510as_fn_error 77 "cannot compute sizeof (size_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007511See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007512 else
7513 ac_cv_sizeof_size_t=0
7514 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00007515fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007516
Martin v. Löwis18e16552006-02-15 17:27:45 +00007517fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007518{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
7519$as_echo "$ac_cv_sizeof_size_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007520
7521
7522
Martin v. Löwis18e16552006-02-15 17:27:45 +00007523cat >>confdefs.h <<_ACEOF
7524#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
7525_ACEOF
7526
7527
Christian Heimes951cc0f2008-01-31 23:08:23 +00007528# The cast to long int works around a bug in the HP C Compiler
7529# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7530# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7531# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
7533$as_echo_n "checking size of pid_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007534if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007535 $as_echo_n "(cached) " >&6
Christian Heimes951cc0f2008-01-31 23:08:23 +00007536else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007537 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pid_t))" "ac_cv_sizeof_pid_t" "$ac_includes_default"; then :
Christian Heimes951cc0f2008-01-31 23:08:23 +00007538
Christian Heimes951cc0f2008-01-31 23:08:23 +00007539else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007540 if test "$ac_cv_type_pid_t" = yes; then
7541 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7542$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007543as_fn_error 77 "cannot compute sizeof (pid_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007544See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes951cc0f2008-01-31 23:08:23 +00007545 else
7546 ac_cv_sizeof_pid_t=0
7547 fi
7548fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007549
Christian Heimes951cc0f2008-01-31 23:08:23 +00007550fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007551{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
7552$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes951cc0f2008-01-31 23:08:23 +00007553
7554
7555
7556cat >>confdefs.h <<_ACEOF
7557#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
7558_ACEOF
7559
7560
Michael W. Hudson54241132001-12-07 15:38:26 +00007561
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
7563$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007564have_long_long=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007565cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007566/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007567
Martin v. Löwis11437992002-04-12 09:54:03 +00007568int
7569main ()
7570{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007571long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007572 ;
7573 return 0;
7574}
7575_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007576if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007577
7578
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007579$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007580
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007581 have_long_long=yes
7582
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007583fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007584rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007585{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
7586$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007587if test "$have_long_long" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00007588# The cast to long int works around a bug in the HP C Compiler
7589# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7590# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7591# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
7593$as_echo_n "checking size of long long... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007594if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007595 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007596else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007597 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007598
Martin v. Löwis11437992002-04-12 09:54:03 +00007599else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007600 if test "$ac_cv_type_long_long" = yes; then
7601 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7602$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007603as_fn_error 77 "cannot compute sizeof (long long)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007604See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007605 else
7606 ac_cv_sizeof_long_long=0
7607 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007608fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007609
Martin v. Löwis11437992002-04-12 09:54:03 +00007610fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007611{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
7612$as_echo "$ac_cv_sizeof_long_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007613
7614
7615
Martin v. Löwis11437992002-04-12 09:54:03 +00007616cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007617#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007618_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007619
Michael W. Hudson54241132001-12-07 15:38:26 +00007620
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007621fi
7622
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
7624$as_echo_n "checking for long double support... " >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007625have_long_double=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007626cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007627/* end confdefs.h. */
7628
7629int
7630main ()
7631{
Matthias Klosec511b472010-05-08 11:01:39 +00007632long double x; x = (long double)0;
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007633 ;
7634 return 0;
7635}
7636_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007637if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007638
7639
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007640$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007641
7642 have_long_double=yes
7643
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007644fi
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007645rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007646{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
7647$as_echo "$have_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007648if test "$have_long_double" = yes ; then
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007649# The cast to long int works around a bug in the HP C Compiler
7650# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7651# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7652# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
7654$as_echo_n "checking size of long double... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007655if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007656 $as_echo_n "(cached) " >&6
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007657else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007658 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long double))" "ac_cv_sizeof_long_double" "$ac_includes_default"; then :
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007659
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007660else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007661 if test "$ac_cv_type_long_double" = yes; then
7662 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7663$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007664as_fn_error 77 "cannot compute sizeof (long double)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007665See \`config.log' for more details" "$LINENO" 5; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007666 else
7667 ac_cv_sizeof_long_double=0
7668 fi
7669fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007670
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007671fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007672{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
7673$as_echo "$ac_cv_sizeof_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007674
7675
7676
7677cat >>confdefs.h <<_ACEOF
7678#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
7679_ACEOF
7680
7681
7682fi
7683
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
7685$as_echo_n "checking for _Bool support... " >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007686have_c99_bool=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007687cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007688/* end confdefs.h. */
7689
7690int
7691main ()
7692{
7693_Bool x; x = (_Bool)0;
7694 ;
7695 return 0;
7696}
7697_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007698if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007699
7700
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007701$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007702
7703 have_c99_bool=yes
7704
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007705fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007706rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007707{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7708$as_echo "$have_c99_bool" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007709if test "$have_c99_bool" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00007710# The cast to long int works around a bug in the HP C Compiler
7711# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7712# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7713# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7715$as_echo_n "checking size of _Bool... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007716if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007717 $as_echo_n "(cached) " >&6
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007718else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007719 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (_Bool))" "ac_cv_sizeof__Bool" "$ac_includes_default"; then :
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007720
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007721else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007722 if test "$ac_cv_type__Bool" = yes; then
7723 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7724$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007725as_fn_error 77 "cannot compute sizeof (_Bool)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007726See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007727 else
7728 ac_cv_sizeof__Bool=0
7729 fi
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007730fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007731
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007732fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007733{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7734$as_echo "$ac_cv_sizeof__Bool" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007735
7736
7737
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007738cat >>confdefs.h <<_ACEOF
7739#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7740_ACEOF
7741
7742
7743fi
7744
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007745ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00007746 #include <stdint.h>
7747 #endif
Antoine Pitrou7be5a652010-10-10 08:14:41 +00007748 #ifdef HAVE_INTTYPES_H
7749 #include <inttypes.h>
7750 #endif
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007751"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007752if test "x$ac_cv_type_uintptr_t" = xyes; then :
Martin v. Löwisebe26702006-10-02 14:55:51 +00007753
7754cat >>confdefs.h <<_ACEOF
7755#define HAVE_UINTPTR_T 1
7756_ACEOF
7757
Martin v. Löwiseba40652007-08-30 20:10:57 +00007758# The cast to long int works around a bug in the HP C Compiler
7759# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7760# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7761# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7763$as_echo_n "checking size of uintptr_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007764if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007765 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007766else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007767 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007768
Martin v. Löwis11437992002-04-12 09:54:03 +00007769else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007770 if test "$ac_cv_type_uintptr_t" = yes; then
7771 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7772$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007773as_fn_error 77 "cannot compute sizeof (uintptr_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007774See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007775 else
7776 ac_cv_sizeof_uintptr_t=0
7777 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007778fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007779
Martin v. Löwis11437992002-04-12 09:54:03 +00007780fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007781{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7782$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007783
7784
7785
Martin v. Löwis11437992002-04-12 09:54:03 +00007786cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007787#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007788_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007789
Michael W. Hudson54241132001-12-07 15:38:26 +00007790
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007791fi
7792
Martin v. Löwisebe26702006-10-02 14:55:51 +00007793
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007794# The cast to long int works around a bug in the HP C Compiler
7795# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7796# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7797# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
7799$as_echo_n "checking size of off_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007800if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007801 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007802else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007803 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007804#ifdef HAVE_SYS_TYPES_H
7805#include <sys/types.h>
7806#endif
7807
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007808"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007809
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007810else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007811 if test "$ac_cv_type_off_t" = yes; then
7812 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7813$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007814as_fn_error 77 "cannot compute sizeof (off_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007815See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007816 else
7817 ac_cv_sizeof_off_t=0
7818 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007819fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007820
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007821fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007822{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
7823$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007824
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007825
7826
Martin v. Löwis11437992002-04-12 09:54:03 +00007827cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007828#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007829_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007830
Michael W. Hudson54241132001-12-07 15:38:26 +00007831
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007832
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
7834$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson0ef0b912009-12-31 21:11:48 +00007835if test "$have_long_long" = yes
7836then
7837if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007838 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007839
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007840$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007841
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7843$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007844else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7846$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007847fi
Mark Dickinson0ef0b912009-12-31 21:11:48 +00007848else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7850$as_echo "no" >&6; }
Mark Dickinson0ef0b912009-12-31 21:11:48 +00007851fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007852
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007853# The cast to long int works around a bug in the HP C Compiler
7854# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7855# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7856# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
7858$as_echo_n "checking size of time_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007859if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007860 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007861else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007862 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007863#ifdef HAVE_SYS_TYPES_H
7864#include <sys/types.h>
7865#endif
7866#ifdef HAVE_TIME_H
7867#include <time.h>
7868#endif
7869
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007870"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007871
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007872else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007873 if test "$ac_cv_type_time_t" = yes; then
7874 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7875$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007876as_fn_error 77 "cannot compute sizeof (time_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007877See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007878 else
7879 ac_cv_sizeof_time_t=0
7880 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007881fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007882
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007883fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007884{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
7885$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007886
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007887
7888
Martin v. Löwis11437992002-04-12 09:54:03 +00007889cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007890#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007891_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007892
Michael W. Hudson54241132001-12-07 15:38:26 +00007893
7894
Trent Mick635f6fb2000-08-23 21:33:05 +00007895# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007896ac_save_cc="$CC"
7897if test "$ac_cv_kpthread" = "yes"
7898then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00007899elif test "$ac_cv_kthread" = "yes"
7900then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00007901elif test "$ac_cv_pthread" = "yes"
7902then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007903fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
7905$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007906have_pthread_t=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007907cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007908/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00007909
7910 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007911int
7912main ()
7913{
Guido van Rossum12580492000-09-24 16:47:19 +00007914pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007915 ;
7916 return 0;
7917}
Matthias Klosec511b472010-05-08 11:01:39 +00007918
Martin v. Löwis11437992002-04-12 09:54:03 +00007919_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007920if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00007921 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00007922fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007923rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007924{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
7925$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007926if test "$have_pthread_t" = yes ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007927 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007928# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7929# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7930# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
7932$as_echo_n "checking size of pthread_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007933if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007934 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007935else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007936 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007937#ifdef HAVE_PTHREAD_H
7938#include <pthread.h>
7939#endif
7940
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007941"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007942
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007943else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007944 if test "$ac_cv_type_pthread_t" = yes; then
7945 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7946$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007947as_fn_error 77 "cannot compute sizeof (pthread_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007948See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007949 else
7950 ac_cv_sizeof_pthread_t=0
7951 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00007952fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007953
Trent Mick635f6fb2000-08-23 21:33:05 +00007954fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007955{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
7956$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007957
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007958
7959
Martin v. Löwis11437992002-04-12 09:54:03 +00007960cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007961#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007962_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007963
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007964
Trent Mick635f6fb2000-08-23 21:33:05 +00007965fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007966CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00007967
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-toolbox-glue" >&5
7969$as_echo_n "checking for --enable-toolbox-glue... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007970# Check whether --enable-toolbox-glue was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007971if test "${enable_toolbox_glue+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007972 enableval=$enable_toolbox_glue;
7973fi
Jack Jansene578a632001-08-15 01:27:14 +00007974
7975
7976if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +00007977then
Jack Jansene578a632001-08-15 01:27:14 +00007978 case $ac_sys_system/$ac_sys_release in
7979 Darwin/*)
7980 enable_toolbox_glue="yes";;
7981 *)
7982 enable_toolbox_glue="no";;
7983 esac
7984fi
7985case "$enable_toolbox_glue" in
7986yes)
Jack Jansene578a632001-08-15 01:27:14 +00007987 extra_machdep_objs="Python/mactoolboxglue.o"
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007988 extra_undefs="-u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +00007989
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007990$as_echo "#define USE_TOOLBOX_OBJECT_GLUE 1" >>confdefs.h
Jack Jansene578a632001-08-15 01:27:14 +00007991
7992 ;;
7993*)
Jack Jansene578a632001-08-15 01:27:14 +00007994 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00007995 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00007996 ;;
7997esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007998{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_toolbox_glue" >&5
7999$as_echo "$enable_toolbox_glue" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008000
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008001
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00008002
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008003case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +00008004 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008005 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8006 ;;
8007 Darwin/*)
8008 OTHER_LIBTOOL_OPT=""
8009 ;;
8010esac
8011
8012
Ronald Oussoren25967582009-09-06 10:00:26 +00008013
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008014case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +00008015 Darwin/[01567]\..*)
Ronald Oussoren988117f2006-04-29 11:31:35 +00008016 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8017 if test "${enable_universalsdk}"; then
8018 :
8019 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00008020 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Ronald Oussoren988117f2006-04-29 11:31:35 +00008021 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008022 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008023 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008024 Darwin/*)
Ronald Oussorena55af9a2010-01-17 16:25:57 +00008025 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008026 if test ${gcc_version} '<' 4.0
8027 then
8028 LIBTOOL_CRUFT="-lcc_dynamic"
8029 else
8030 LIBTOOL_CRUFT=""
8031 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008032 if test "$cross_compiling" = yes; then :
Ronald Oussoren23d92532009-09-07 06:12:00 +00008033 ac_osx_32bit=yes
Ronald Oussoren25967582009-09-06 10:00:26 +00008034else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008035 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren25967582009-09-06 10:00:26 +00008036/* end confdefs.h. */
Ronald Oussoren23d92532009-09-07 06:12:00 +00008037
Ronald Oussoren25967582009-09-06 10:00:26 +00008038 #include <unistd.h>
8039 int main(int argc, char*argv[])
8040 {
8041 if (sizeof(long) == 4) {
8042 return 0;
8043 } else {
8044 return 1;
8045 }
Ronald Oussoren84ddd722009-09-08 07:17:10 +00008046 }
Ronald Oussoren23d92532009-09-07 06:12:00 +00008047
Ronald Oussoren25967582009-09-06 10:00:26 +00008048_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008049if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren25967582009-09-06 10:00:26 +00008050 ac_osx_32bit=yes
8051else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008052 ac_osx_32bit=no
Ronald Oussoren25967582009-09-06 10:00:26 +00008053fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008054rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8055 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren25967582009-09-06 10:00:26 +00008056fi
8057
8058
Ronald Oussoren25967582009-09-06 10:00:26 +00008059 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00008060 case `/usr/bin/arch` in
Ronald Oussoren25967582009-09-06 10:00:26 +00008061 i386)
8062 MACOSX_DEFAULT_ARCH="i386"
8063 ;;
8064 ppc)
8065 MACOSX_DEFAULT_ARCH="ppc"
8066 ;;
8067 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008068 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren25967582009-09-06 10:00:26 +00008069 ;;
8070 esac
8071 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00008072 case `/usr/bin/arch` in
Ronald Oussoren25967582009-09-06 10:00:26 +00008073 i386)
8074 MACOSX_DEFAULT_ARCH="x86_64"
8075 ;;
8076 ppc)
8077 MACOSX_DEFAULT_ARCH="ppc64"
8078 ;;
8079 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008080 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren25967582009-09-06 10:00:26 +00008081 ;;
8082 esac
8083
8084 #ARCH_RUN_32BIT="true"
8085 fi
8086
8087 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00008088 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008089 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008090esac
8091
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
8093$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008094if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008095then
Skip Montanarodecc6a42003-01-01 20:07:49 +00008096 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00008097 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008098 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008099
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008100$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008101
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8103$as_echo "yes" >&6; }
Ronald Oussoren450d5612009-06-08 21:12:41 +00008104 if test $enable_shared = "yes"
8105 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008106 as_fn_error $? "Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead. See Mac/README." "$LINENO" 5
Ronald Oussoren450d5612009-06-08 21:12:41 +00008107 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008108else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8110$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008111fi
8112
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
8114$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008115case $ac_sys_system/$ac_sys_release in
8116 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008117
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008118$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008119
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
8121$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008122 ;;
8123 *)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8125$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008126 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008127esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008128
Guido van Rossum0a516c91994-09-12 10:58:40 +00008129# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008130
Michael W. Hudson54241132001-12-07 15:38:26 +00008131
8132
8133
8134
Ronald Oussoren75912852010-04-08 08:13:31 +00008135
Guido van Rossum0a516c91994-09-12 10:58:40 +00008136# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00008137# -- usually .so, .sl on HP-UX, .dll on Cygwin
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
8139$as_echo_n "checking SO... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008140if test -z "$SO"
8141then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008142 case $ac_sys_system in
Neal Norwitz58e28882006-05-19 07:00:58 +00008143 hp*|HP*)
8144 case `uname -m` in
8145 ia64) SO=.so;;
8146 *) SO=.sl;;
8147 esac
8148 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00008149 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00008150 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008151 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +00008152else
8153 # this might also be a termcap variable, see #610332
8154 echo
8155 echo '====================================================================='
8156 echo '+ +'
8157 echo '+ WARNING: You have set SO in your environment. +'
8158 echo '+ Do you really mean to change the extension for shared libraries? +'
8159 echo '+ Continuing in 10 seconds to let you to ponder. +'
8160 echo '+ +'
8161 echo '====================================================================='
8162 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +00008163fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008164{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
8165$as_echo "$SO" >&6; }
Neal Norwitz58e28882006-05-19 07:00:58 +00008166
Ronald Oussoren79f90492009-01-02 10:44:46 +00008167
Neal Norwitz58e28882006-05-19 07:00:58 +00008168cat >>confdefs.h <<_ACEOF
8169#define SHLIB_EXT "$SO"
8170_ACEOF
8171
Guido van Rossum0a516c91994-09-12 10:58:40 +00008172# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00008173# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008174# (Shared libraries in this instance are shared modules to be loaded into
8175# Python, as opposed to building Python itself as a shared library.)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
8177$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008178if test -z "$LDSHARED"
8179then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008180 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008181 AIX*)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008182 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00008183 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008184 ;;
8185 BeOS*)
8186 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +00008187 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008188 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00008189 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00008190 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008191 SunOS/5*)
Ronald Oussoren75912852010-04-08 08:13:31 +00008192 if test "$GCC" = "yes" ; then
8193 LDSHARED='$(CC) -shared'
8194 LDCXXSHARED='$(CXX) -shared'
8195 else
8196 LDSHARED='$(CC) -G'
8197 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a662000-05-26 12:22:54 +00008198 fi ;;
Thomas Hellerdc96a772008-04-04 10:07:55 +00008199 hp*|HP*)
Ronald Oussoren75912852010-04-08 08:13:31 +00008200 if test "$GCC" = "yes" ; then
8201 LDSHARED='$(CC) -shared'
8202 LDCXXSHARED='$(CXX) -shared'
8203 else
8204 LDSHARED='ld -b'
Thomas Hellerdc96a772008-04-04 10:07:55 +00008205 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +00008206 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +00008207 Darwin/1.3*)
Stefan Krah3a3e2032010-11-28 15:30:05 +00008208 LDSHARED='$(CC) -bundle'
8209 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00008210 if test "$enable_framework" ; then
8211 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008212 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8213 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008214 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008215 else
8216 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00008217 LDSHARED="$LDSHARED -undefined suppress"
Ronald Oussoren75912852010-04-08 08:13:31 +00008218 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00008219 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008220 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Stefan Krah3a3e2032010-11-28 15:30:05 +00008221 LDSHARED='$(CC) -bundle'
8222 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00008223 if test "$enable_framework" ; then
8224 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008225 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8226 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008227 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008228 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00008229 # No framework, use the Python app as bundle-loader
8230 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00008231 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008232 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008233 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008234 Darwin/*)
8235 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
8236 # This allows an extension to be used in any Python
Ronald Oussoren38f1b982007-09-02 09:46:07 +00008237
Ned Deilyc40b9032014-06-25 13:48:46 -07008238 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
8239 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
8240 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
8241 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
8242 if test ${dep_target_major} -eq 10 && \
8243 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00008244 then
Ned Deilyc40b9032014-06-25 13:48:46 -07008245 # building for OS X 10.0 through 10.2
Stefan Krah3a3e2032010-11-28 15:30:05 +00008246 LDSHARED='$(CC) -bundle'
8247 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00008248 if test "$enable_framework" ; then
8249 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008250 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8251 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008252 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008253 else
8254 # No framework, use the Python app as bundle-loader
8255 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
8256 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008257 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008258 fi
Ned Deilyc40b9032014-06-25 13:48:46 -07008259 else
8260 # building for OS X 10.3 and later
8261 if test "${enable_universalsdk}"; then
8262 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
8263 fi
8264 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
8265 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
8266 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00008267 fi
8268 ;;
Ronald Oussoren75912852010-04-08 08:13:31 +00008269 Linux*|GNU*|QNX*)
8270 LDSHARED='$(CC) -shared'
8271 LDCXXSHARED='$(CXX) -shared';;
8272 BSD/OS*/4*)
8273 LDSHARED="gcc -shared"
8274 LDCXXSHARED="g++ -shared";;
Martin v. Löwis222c5152006-06-03 07:37:13 +00008275 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00008276 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00008277 then
Stefan Krah3a3e2032010-11-28 15:30:05 +00008278 LDSHARED='$(CC) -shared'
8279 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00008280 else
Stefan Krah3a3e2032010-11-28 15:30:05 +00008281 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00008282 fi;;
Martin v. Löwis222c5152006-06-03 07:37:13 +00008283 OpenBSD*)
8284 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8285 then
Stefan Krah3a3e2032010-11-28 15:30:05 +00008286 LDSHARED='$(CC) -shared $(CCSHARED)'
8287 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Martin v. Löwis222c5152006-06-03 07:37:13 +00008288 else
8289 case `uname -r` in
8290 [01].* | 2.[0-7] | 2.[0-7].*)
8291 LDSHARED="ld -Bshareable ${LDFLAGS}"
8292 ;;
8293 *)
Stefan Krah3a3e2032010-11-28 15:30:05 +00008294 LDSHARED='$(CC) -shared $(CCSHARED)'
8295 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Martin v. Löwis222c5152006-06-03 07:37:13 +00008296 ;;
8297 esac
8298 fi;;
Ronald Oussoren75912852010-04-08 08:13:31 +00008299 NetBSD*|DragonFly*)
Antoine Pitroucb402772011-01-02 20:51:34 +00008300 LDSHARED='$(CC) -shared'
8301 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008302 OpenUNIX*|UnixWare*)
Ronald Oussoren75912852010-04-08 08:13:31 +00008303 if test "$GCC" = "yes" ; then
8304 LDSHARED='$(CC) -shared'
8305 LDCXXSHARED='$(CXX) -shared'
8306 else
8307 LDSHARED='$(CC) -G'
8308 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00008309 fi;;
Ronald Oussoren75912852010-04-08 08:13:31 +00008310 SCO_SV*)
8311 LDSHARED='$(CC) -Wl,-G,-Bexport'
8312 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
8313 CYGWIN*)
8314 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
8315 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
8316 atheos*)
8317 LDSHARED="gcc -shared"
8318 LDCXXSHARED="g++ -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008319 *) LDSHARED="ld";;
8320 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008321fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008322{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
8323$as_echo "$LDSHARED" >&6; }
Ronald Oussoren75912852010-04-08 08:13:31 +00008324LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008325BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00008326# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008327# library (module) -- this is only needed for a few systems
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
8329$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008330if test -z "$CCSHARED"
8331then
Guido van Rossum07397971997-04-29 21:49:50 +00008332 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008333 SunOS*) if test "$GCC" = yes;
Martin v. Löwiseb623572007-03-12 10:50:39 +00008334 then CCSHARED="-fPIC";
8335 elif test `uname -p` = sparc;
8336 then CCSHARED="-xcode=pic32";
8337 else CCSHARED="-Kpic";
8338 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00008339 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00008340 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00008341 else CCSHARED="+z";
8342 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008343 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008344 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008345 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008346 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008347 if test "$GCC" = "yes"
8348 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008349 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008350 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008351 SCO_SV*)
8352 if test "$GCC" = "yes"
8353 then CCSHARED="-fPIC"
8354 else CCSHARED="-Kpic -belf"
8355 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008356 IRIX*/6*) case $CC in
8357 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00008358 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008359 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008360 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008361 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008362fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008363{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
8364$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008365# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008366# the python executable -- this is only needed for a few systems
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
8368$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008369if test -z "$LINKFORSHARED"
8370then
Guido van Rossum07397971997-04-29 21:49:50 +00008371 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008372 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008373 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00008374 LINKFORSHARED="-Wl,-E -Wl,+s";;
8375# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008376 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008377 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008378 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00008379 Darwin/*)
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008380 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
8381 # which is
Jack Jansene578a632001-08-15 01:27:14 +00008382 # not used by the core itself but which needs to be in the core so
8383 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +00008384 # -prebind is no longer used, because it actually seems to give a
8385 # slowdown in stead of a speedup, maybe due to the large number of
8386 # dynamic loads Python does.
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008387
8388 LINKFORSHARED="$extra_undefs"
Jack Jansene578a632001-08-15 01:27:14 +00008389 if test "$enable_framework"
8390 then
Jack Jansenda49e192005-01-07 13:08:22 +00008391 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008392 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008393 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008394 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008395 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00008396 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008397 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00008398 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8399 then
8400 LINKFORSHARED="-Wl,--export-dynamic"
8401 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008402 SunOS/5*) case $CC in
8403 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00008404 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00008405 then
8406 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008407 fi;;
8408 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00008409 CYGWIN*)
8410 if test $enable_shared = "no"
8411 then
8412 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
8413 fi;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00008414 QNX*)
8415 # -Wl,-E causes the symbols to be added to the dynamic
8416 # symbol table so that they can be found when a module
8417 # is loaded. -N 2048K causes the stack size to be set
8418 # to 2048 kilobytes so that the stack doesn't overflow
8419 # when running test_compile.py.
8420 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008421 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008422fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008423{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
8424$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008425
Michael W. Hudson54241132001-12-07 15:38:26 +00008426
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00008427
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
8429$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008430if test ! "$LIBRARY" = "$LDLIBRARY"
8431then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00008432 case $ac_sys_system in
8433 CYGWIN*)
8434 # Cygwin needs CCSHARED when building extension DLLs
8435 # but not when building the interpreter DLL.
8436 CFLAGSFORSHARED='';;
8437 *)
8438 CFLAGSFORSHARED='$(CCSHARED)'
8439 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008440fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008441{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
8442$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008443
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008444# SHLIBS are libraries (except -lc and -lm) to link to the python shared
8445# library (with --enable-shared).
8446# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008447# symbols, this must be set to $(LIBS) (expanded by make). We do this even
8448# if it is not required, since it creates a dependency of the shared library
8449# to LIBS. This, in turn, means that applications linking the shared libpython
8450# don't need to link LIBS explicitly. The default should be only changed
8451# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008452
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
8454$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008455case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008456 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008457 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008458esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008459{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
8460$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008461
8462
Guido van Rossum627b2d71993-12-24 10:39:16 +00008463# checks for libraries
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
8465$as_echo_n "checking for dlopen in -ldl... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008466if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008467 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008468else
Martin v. Löwis11437992002-04-12 09:54:03 +00008469 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008470LIBS="-ldl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008471cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008472/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008473
Martin v. Löwiseba40652007-08-30 20:10:57 +00008474/* Override any GCC internal prototype to avoid an error.
8475 Use char because int might match the return type of a GCC
8476 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008477#ifdef __cplusplus
8478extern "C"
8479#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008480char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008481int
8482main ()
8483{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008484return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008485 ;
8486 return 0;
8487}
8488_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008489if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008490 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008491else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008492 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008493fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008494rm -f core conftest.err conftest.$ac_objext \
8495 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008496LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008497fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008498{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
8499$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008500if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008501 cat >>confdefs.h <<_ACEOF
8502#define HAVE_LIBDL 1
8503_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008504
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008505 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00008506
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008507fi
8508 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
8510$as_echo_n "checking for shl_load in -ldld... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008511if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008512 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008513else
Martin v. Löwis11437992002-04-12 09:54:03 +00008514 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008515LIBS="-ldld $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008516cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008517/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008518
Martin v. Löwiseba40652007-08-30 20:10:57 +00008519/* Override any GCC internal prototype to avoid an error.
8520 Use char because int might match the return type of a GCC
8521 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008522#ifdef __cplusplus
8523extern "C"
8524#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008525char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008526int
8527main ()
8528{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008529return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008530 ;
8531 return 0;
8532}
8533_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008534if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008535 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008536else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008537 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008538fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008539rm -f core conftest.err conftest.$ac_objext \
8540 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008541LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008542fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008543{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
8544$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008545if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008546 cat >>confdefs.h <<_ACEOF
8547#define HAVE_LIBDLD 1
8548_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008549
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008550 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008551
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008552fi
8553 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00008554
Ronald Oussoren79f90492009-01-02 10:44:46 +00008555# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00008556if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008557 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
8558$as_echo_n "checking for library containing sem_init... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008559if ${ac_cv_search_sem_init+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008560 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008561else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008562 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008563cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008564/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008565
Martin v. Löwiseba40652007-08-30 20:10:57 +00008566/* Override any GCC internal prototype to avoid an error.
8567 Use char because int might match the return type of a GCC
8568 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008569#ifdef __cplusplus
8570extern "C"
8571#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008572char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008573int
8574main ()
8575{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008576return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008577 ;
8578 return 0;
8579}
8580_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00008581for ac_lib in '' pthread rt posix4; do
8582 if test -z "$ac_lib"; then
8583 ac_res="none required"
8584 else
8585 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00008586 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00008587 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008588 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008589 ac_cv_search_sem_init=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00008590fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008591rm -f core conftest.err conftest.$ac_objext \
8592 conftest$ac_exeext
Matthias Klose3cef2a92012-03-14 23:39:33 +01008593 if ${ac_cv_search_sem_init+:} false; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008594 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00008595fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008596done
Matthias Klose3cef2a92012-03-14 23:39:33 +01008597if ${ac_cv_search_sem_init+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008598
Martin v. Löwiseba40652007-08-30 20:10:57 +00008599else
8600 ac_cv_search_sem_init=no
8601fi
8602rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008603LIBS=$ac_func_search_save_LIBS
8604fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008605{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
8606$as_echo "$ac_cv_search_sem_init" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008607ac_res=$ac_cv_search_sem_init
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008608if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008609 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008610
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008611fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00008612 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00008613 # posix4 on Solaris 2.6
8614 # pthread (first!) on Linux
8615fi
8616
Martin v. Löwis19d17342003-06-14 21:03:05 +00008617# check if we need libintl for locale functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
8619$as_echo_n "checking for textdomain in -lintl... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008620if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008621 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00008622else
8623 ac_check_lib_save_LIBS=$LIBS
8624LIBS="-lintl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008625cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008626/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008627
Martin v. Löwiseba40652007-08-30 20:10:57 +00008628/* Override any GCC internal prototype to avoid an error.
8629 Use char because int might match the return type of a GCC
8630 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008631#ifdef __cplusplus
8632extern "C"
8633#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00008634char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008635int
8636main ()
8637{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008638return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008639 ;
8640 return 0;
8641}
8642_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008643if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008644 ac_cv_lib_intl_textdomain=yes
8645else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008646 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00008647fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008648rm -f core conftest.err conftest.$ac_objext \
8649 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00008650LIBS=$ac_check_lib_save_LIBS
8651fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008652{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
8653$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008654if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008655
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008656$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00008657
8658fi
8659
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008660
8661# checks for system dependent C++ extensions support
8662case "$ac_sys_system" in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008663 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
8664$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
8665 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008666/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00008667
Georg Brandl94800df2011-02-25 11:09:02 +00008668 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008669int
8670main ()
8671{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008672loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00008673 ;
8674 return 0;
8675}
Matthias Klosec511b472010-05-08 11:01:39 +00008676
Martin v. Löwis11437992002-04-12 09:54:03 +00008677_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008678if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008679
Matthias Klosec511b472010-05-08 11:01:39 +00008680
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008681$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008682
Matthias Klosec511b472010-05-08 11:01:39 +00008683 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008684$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00008685
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008686else
Matthias Klosec511b472010-05-08 11:01:39 +00008687
8688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008689$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00008690
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008691fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008692rm -f core conftest.err conftest.$ac_objext \
8693 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008694 *) ;;
8695esac
8696
Guido van Rossum70c7f481998-03-26 18:44:10 +00008697# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008698# BeOS' sockets are stashed in libnet.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
8700$as_echo_n "checking for t_open in -lnsl... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008701if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008702 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008703else
Martin v. Löwis11437992002-04-12 09:54:03 +00008704 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008705LIBS="-lnsl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008706cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008707/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008708
Martin v. Löwiseba40652007-08-30 20:10:57 +00008709/* Override any GCC internal prototype to avoid an error.
8710 Use char because int might match the return type of a GCC
8711 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008712#ifdef __cplusplus
8713extern "C"
8714#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008715char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008716int
8717main ()
8718{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008719return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008720 ;
8721 return 0;
8722}
8723_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008724if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008725 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008726else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008727 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008728fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008729rm -f core conftest.err conftest.$ac_objext \
8730 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008731LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008732fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008733{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
8734$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008735if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008736 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008737fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00008738 # SVR4
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8740$as_echo_n "checking for socket in -lsocket... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008741if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008742 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008743else
Martin v. Löwis11437992002-04-12 09:54:03 +00008744 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008745LIBS="-lsocket $LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008746cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008747/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008748
Martin v. Löwiseba40652007-08-30 20:10:57 +00008749/* Override any GCC internal prototype to avoid an error.
8750 Use char because int might match the return type of a GCC
8751 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008752#ifdef __cplusplus
8753extern "C"
8754#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008755char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008756int
8757main ()
8758{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008759return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008760 ;
8761 return 0;
8762}
8763_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008764if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008765 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008766else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008767 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008768fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008769rm -f core conftest.err conftest.$ac_objext \
8770 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008771LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008772fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008773{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8774$as_echo "$ac_cv_lib_socket_socket" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008775if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00008776 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00008777fi
8778 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00008779
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +00008780case "$ac_sys_system" in
8781BeOS*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lnet" >&5
8783$as_echo_n "checking for socket in -lnet... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008784if ${ac_cv_lib_net_socket+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008785 $as_echo_n "(cached) " >&6
Guido van Rossumad678af1998-10-02 14:42:15 +00008786else
Martin v. Löwis11437992002-04-12 09:54:03 +00008787 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00008788LIBS="-lnet $LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008789cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008790/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008791
Martin v. Löwiseba40652007-08-30 20:10:57 +00008792/* Override any GCC internal prototype to avoid an error.
8793 Use char because int might match the return type of a GCC
8794 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008795#ifdef __cplusplus
8796extern "C"
8797#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008798char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008799int
8800main ()
8801{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008802return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008803 ;
8804 return 0;
8805}
8806_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008807if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008808 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +00008809else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008810 ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +00008811fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008812rm -f core conftest.err conftest.$ac_objext \
8813 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008814LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00008815fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008816{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_net_socket" >&5
8817$as_echo "$ac_cv_lib_net_socket" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008818if test "x$ac_cv_lib_net_socket" = xyes; then :
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008819 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008820fi
8821 # BeOS
8822;;
8823esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00008824
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
8826$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008827
Martin v. Löwiseba40652007-08-30 20:10:57 +00008828# Check whether --with-libs was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008829if test "${with_libs+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008830 withval=$with_libs;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008831{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8832$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00008833LIBS="$withval $LIBS"
8834
8835else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8837$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008838fi
8839
Guido van Rossum7f43da71994-08-01 12:15:30 +00008840
Benjamin Peterson64e8f6e2014-12-15 00:00:23 -05008841
8842
8843
8844
8845
8846
8847
8848if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
8849 if test -n "$ac_tool_prefix"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008850 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8851set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8853$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008854if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008855 $as_echo_n "(cached) " >&6
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008856else
8857 case $PKG_CONFIG in
8858 [\\/]* | ?:[\\/]*)
8859 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8860 ;;
8861 *)
8862 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8863for as_dir in $PATH
8864do
8865 IFS=$as_save_IFS
8866 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008867 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01008868 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008869 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008870 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008871 break 2
8872 fi
8873done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008874 done
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008875IFS=$as_save_IFS
8876
8877 ;;
8878esac
8879fi
8880PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8881if test -n "$PKG_CONFIG"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008882 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8883$as_echo "$PKG_CONFIG" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008884else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008885 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8886$as_echo "no" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008887fi
8888
8889
8890fi
8891if test -z "$ac_cv_path_PKG_CONFIG"; then
8892 ac_pt_PKG_CONFIG=$PKG_CONFIG
8893 # Extract the first word of "pkg-config", so it can be a program name with args.
8894set dummy pkg-config; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8896$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008897if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008898 $as_echo_n "(cached) " >&6
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008899else
8900 case $ac_pt_PKG_CONFIG in
8901 [\\/]* | ?:[\\/]*)
8902 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8903 ;;
8904 *)
8905 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8906for as_dir in $PATH
8907do
8908 IFS=$as_save_IFS
8909 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008910 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01008911 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008912 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008913 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008914 break 2
8915 fi
8916done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008917 done
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008918IFS=$as_save_IFS
8919
8920 ;;
8921esac
8922fi
8923ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8924if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
8926$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008927else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8929$as_echo "no" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008930fi
8931
8932 if test "x$ac_pt_PKG_CONFIG" = x; then
8933 PKG_CONFIG=""
8934 else
8935 case $cross_compiling:$ac_tool_warned in
8936yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008937{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8938$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008939ac_tool_warned=yes ;;
8940esac
8941 PKG_CONFIG=$ac_pt_PKG_CONFIG
8942 fi
8943else
8944 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8945fi
8946
Benjamin Peterson64e8f6e2014-12-15 00:00:23 -05008947fi
8948if test -n "$PKG_CONFIG"; then
8949 _pkg_min_version=0.9.0
8950 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
8951$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
8952 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
8953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8954$as_echo "yes" >&6; }
8955 else
8956 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8957$as_echo "no" >&6; }
8958 PKG_CONFIG=""
8959 fi
8960fi
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008961
8962# Check for use of the system expat library
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
8964$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008965
8966# Check whether --with-system_expat was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008967if test "${with_system_expat+set}" = set; then :
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008968 withval=$with_system_expat;
Benjamin Petersonf2d1b2a2010-10-31 16:53:53 +00008969else
8970 with_system_expat="no"
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008971fi
8972
8973
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008974{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
8975$as_echo "$with_system_expat" >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008976
8977# Check for use of the system libffi library
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
8979$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008980
8981# Check whether --with-system_ffi was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008982if test "${with_system_ffi+set}" = set; then :
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008983 withval=$with_system_ffi;
Benjamin Petersonf2d1b2a2010-10-31 16:53:53 +00008984else
8985 with_system_ffi="no"
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008986fi
8987
8988
8989if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008990 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
8991else
8992 LIBFFI_INCLUDEDIR=""
8993fi
8994
8995
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008996{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
8997$as_echo "$with_system_ffi" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +00008998
Ned Deilya2a9f572013-10-25 00:30:10 -07008999# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
9000
9001
9002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
9003$as_echo_n "checking for --with-tcltk-includes... " >&6; }
9004
9005# Check whether --with-tcltk-includes was given.
9006if test "${with_tcltk_includes+set}" = set; then :
9007 withval=$with_tcltk_includes;
9008else
9009 with_tcltk_includes="default"
9010fi
9011
9012{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
9013$as_echo "$with_tcltk_includes" >&6; }
9014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
9015$as_echo_n "checking for --with-tcltk-libs... " >&6; }
9016
9017# Check whether --with-tcltk-libs was given.
9018if test "${with_tcltk_libs+set}" = set; then :
9019 withval=$with_tcltk_libs;
9020else
9021 with_tcltk_libs="default"
9022fi
9023
9024{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
9025$as_echo "$with_tcltk_libs" >&6; }
9026if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
9027then
9028 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
9029 then
9030 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
9031 fi
9032 TCLTK_INCLUDES=""
9033 TCLTK_LIBS=""
9034else
9035 TCLTK_INCLUDES="$with_tcltk_includes"
9036 TCLTK_LIBS="$with_tcltk_libs"
9037fi
9038
Benjamin Peterson867475c2009-04-29 20:36:25 +00009039# Check for --with-dbmliborder
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
9041$as_echo_n "checking for --with-dbmliborder... " >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +00009042
9043# Check whether --with-dbmliborder was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009044if test "${with_dbmliborder+set}" = set; then :
Benjamin Peterson867475c2009-04-29 20:36:25 +00009045 withval=$with_dbmliborder;
9046if test x$with_dbmliborder = xyes
9047then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009048as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Benjamin Peterson867475c2009-04-29 20:36:25 +00009049else
9050 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
9051 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
9052 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009053 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Benjamin Peterson867475c2009-04-29 20:36:25 +00009054 fi
9055 done
9056fi
9057fi
9058
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009059{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
9060$as_echo "$with_dbmliborder" >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +00009061
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009062# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009063
9064
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
9066$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009067
Martin v. Löwiseba40652007-08-30 20:10:57 +00009068# Check whether --with-signal-module was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009069if test "${with_signal_module+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009070 withval=$with_signal_module;
9071fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009072
9073
9074if test -z "$with_signal_module"
9075then with_signal_module="yes"
9076fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009077{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
9078$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009079
9080if test "${with_signal_module}" = "yes"; then
9081 USE_SIGNAL_MODULE=""
9082 SIGNAL_OBJS=""
9083else
9084 USE_SIGNAL_MODULE="#"
9085 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9086fi
9087
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009088# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009089
Barry Warsawc0d24d82000-06-29 16:12:00 +00009090USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009091
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dec-threads" >&5
9093$as_echo_n "checking for --with-dec-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009094
Guido van Rossumec2f0731997-01-22 20:54:01 +00009095
Martin v. Löwiseba40652007-08-30 20:10:57 +00009096# Check whether --with-dec-threads was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009097if test "${with_dec_threads+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009098 withval=$with_dec_threads;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009099{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9100$as_echo "$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +00009101LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00009102if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00009103 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00009104fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009105else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9107$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009108fi
9109
Martin v. Löwis11437992002-04-12 09:54:03 +00009110
9111# Templates for things AC_DEFINEd more than once.
9112# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009113
9114
Martin v. Löwis11437992002-04-12 09:54:03 +00009115
9116
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
9118$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009119
Martin v. Löwiseba40652007-08-30 20:10:57 +00009120# Check whether --with-threads was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009121if test "${with_threads+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009122 withval=$with_threads;
9123fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009124
9125
Barry Warsawc0d24d82000-06-29 16:12:00 +00009126# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009127
Martin v. Löwiseba40652007-08-30 20:10:57 +00009128# Check whether --with-thread was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009129if test "${with_thread+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009130 withval=$with_thread; with_threads=$with_thread
9131fi
9132
Barry Warsawc0d24d82000-06-29 16:12:00 +00009133
9134if test -z "$with_threads"
9135then with_threads="yes"
9136fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009137{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
9138$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d82000-06-29 16:12:00 +00009139
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009140
Barry Warsawc0d24d82000-06-29 16:12:00 +00009141if test "$with_threads" = "no"
9142then
9143 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009144elif test "$ac_cv_pthread_is_default" = yes
9145then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009146 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009147
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009148 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009149 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009150
9151 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009152 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009153elif test "$ac_cv_kpthread" = "yes"
9154then
9155 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009156 if test "$ac_cv_cxx_thread" = "yes"; then
9157 CXX="$CXX -Kpthread"
9158 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009159 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009160
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009161 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009162 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009163elif test "$ac_cv_kthread" = "yes"
9164then
9165 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009166 if test "$ac_cv_cxx_thread" = "yes"; then
9167 CXX="$CXX -Kthread"
9168 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009169 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009170
9171 posix_threads=yes
9172 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009173elif test "$ac_cv_pthread" = "yes"
9174then
9175 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009176 if test "$ac_cv_cxx_thread" = "yes"; then
9177 CXX="$CXX -pthread"
9178 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009179 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009180
9181 posix_threads=yes
9182 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009183else
9184 if test ! -z "$with_threads" -a -d "$with_threads"
9185 then LDFLAGS="$LDFLAGS -L$with_threads"
9186 fi
9187 if test ! -z "$withval" -a -d "$withval"
9188 then LDFLAGS="$LDFLAGS -L$withval"
9189 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009190
9191 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00009192 # define _POSIX_THREADS in unistd.h. Some apparently don't
9193 # (e.g. gnu pth with pthread emulation)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009194 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
9195$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
9196 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009197/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009198
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009199#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009200#ifdef _POSIX_THREADS
9201yes
9202#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009203
9204_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009205if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009206 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009207 unistd_defines_pthreads=yes
9208else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009209 unistd_defines_pthreads=no
9210fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009211rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009212
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009213 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
9214$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009215
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009216 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009217
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009218 ac_fn_c_check_header_mongrel "$LINENO" "cthreads.h" "ac_cv_header_cthreads_h" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01009219if test "x$ac_cv_header_cthreads_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009220 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00009221
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009222 $as_echo "#define C_THREADS 1" >>confdefs.h
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009223
Martin v. Löwis11437992002-04-12 09:54:03 +00009224
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009225$as_echo "#define HURD_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009226
9227 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009228 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009229else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009230
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009231 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 +01009232if test "x$ac_cv_header_mach_cthreads_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009233 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00009234
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009235 $as_echo "#define C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009236
Martin v. Löwis11437992002-04-12 09:54:03 +00009237
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009238$as_echo "#define MACH_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009239
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009240 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009241else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009242
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009243 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pth" >&5
9244$as_echo_n "checking for --with-pth... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009245
Martin v. Löwiseba40652007-08-30 20:10:57 +00009246# Check whether --with-pth was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009247if test "${with_pth+set}" = set; then :
9248 withval=$with_pth; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9249$as_echo "$withval" >&6; }
9250 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009251
9252
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009253$as_echo "#define HAVE_PTH 1" >>confdefs.h
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009254
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009255 LIBS="-lpth $LIBS"
9256 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009257else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009258 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9259$as_echo "no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009260
9261 # Just looking for pthread_create in libpthread is not enough:
9262 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
9263 # So we really have to include pthread.h, and then link.
9264 _libs=$LIBS
9265 LIBS="$LIBS -lpthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009266 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
9267$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
9268 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009269/* end confdefs.h. */
Stefan Krahae66ca62012-11-22 22:36:57 +01009270
9271#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009272#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00009273
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009274void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00009275int
9276main ()
9277{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009278
9279pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00009280 ;
9281 return 0;
9282}
9283_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009284if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009285
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9287$as_echo "yes" >&6; }
9288 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00009289
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009290 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009291 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009292else
Martin v. Löwis11437992002-04-12 09:54:03 +00009293
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009294 LIBS=$_libs
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009295 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Matthias Klose3cef2a92012-03-14 23:39:33 +01009296if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009297 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00009298
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009299 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009300 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00009301else
Guido van Rossumad678af1998-10-02 14:42:15 +00009302
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009303 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 +01009304if test "x$ac_cv_header_atheos_threads_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009305 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009306
9307
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009308$as_echo "#define ATHEOS_THREADS 1" >>confdefs.h
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009309
9310 THREADOBJ="Python/thread.o"
9311else
9312
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009313 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 +01009314if test "x$ac_cv_header_kernel_OS_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009315 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009316
9317
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009318$as_echo "#define BEOS_THREADS 1" >>confdefs.h
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009319
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009320 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009321else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009322
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009323 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
9324$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009325if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009326 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009327else
Martin v. Löwis11437992002-04-12 09:54:03 +00009328 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009329LIBS="-lpthreads $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009330cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009331/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009332
Martin v. Löwiseba40652007-08-30 20:10:57 +00009333/* Override any GCC internal prototype to avoid an error.
9334 Use char because int might match the return type of a GCC
9335 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009336#ifdef __cplusplus
9337extern "C"
9338#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009339char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009340int
9341main ()
9342{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009343return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009344 ;
9345 return 0;
9346}
9347_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009348if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009349 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00009350else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009351 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00009352fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009353rm -f core conftest.err conftest.$ac_objext \
9354 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009355LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009356fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009357{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
9358$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009359if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009360 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00009361
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009362 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009363 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009364 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00009365else
Greg Steinadf63d62000-07-05 10:38:09 +00009366
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009367 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
9368$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009369if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009370 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00009371else
Martin v. Löwis11437992002-04-12 09:54:03 +00009372 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009373LIBS="-lc_r $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009374cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009375/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009376
Martin v. Löwiseba40652007-08-30 20:10:57 +00009377/* Override any GCC internal prototype to avoid an error.
9378 Use char because int might match the return type of a GCC
9379 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009380#ifdef __cplusplus
9381extern "C"
9382#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009383char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009384int
9385main ()
9386{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009387return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009388 ;
9389 return 0;
9390}
9391_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009392if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009393 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00009394else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009395 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00009396fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009397rm -f core conftest.err conftest.$ac_objext \
9398 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009399LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00009400fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009401{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
9402$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009403if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009404 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00009405
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009406 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009407 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009408 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009409else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009410
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009411 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
9412$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009413if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009414 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009415else
Martin v. Löwis11437992002-04-12 09:54:03 +00009416 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009417LIBS="-lpthread $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009418cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009419/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009420
Martin v. Löwiseba40652007-08-30 20:10:57 +00009421/* Override any GCC internal prototype to avoid an error.
9422 Use char because int might match the return type of a GCC
9423 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009424#ifdef __cplusplus
9425extern "C"
9426#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009427char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009428int
9429main ()
9430{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009431return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009432 ;
9433 return 0;
9434}
9435_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009436if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009437 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009438else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009439 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009440fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009441rm -f core conftest.err conftest.$ac_objext \
9442 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009443LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009444fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009445{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
9446$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009447if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009448 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009449
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009450 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009451 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009452 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009453else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009454
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009455 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
9456$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009457if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009458 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00009459else
Martin v. Löwis11437992002-04-12 09:54:03 +00009460 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009461LIBS="-lcma $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009462cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009463/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009464
Martin v. Löwiseba40652007-08-30 20:10:57 +00009465/* Override any GCC internal prototype to avoid an error.
9466 Use char because int might match the return type of a GCC
9467 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009468#ifdef __cplusplus
9469extern "C"
9470#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009471char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009472int
9473main ()
9474{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009475return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009476 ;
9477 return 0;
9478}
9479_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009480if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009481 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00009482else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009483 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00009484fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009485rm -f core conftest.err conftest.$ac_objext \
9486 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009487LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009488fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009489{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
9490$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009491if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009492 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00009493
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009494 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009495 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009496 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00009497else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00009498
Martin v. Löwis130fb172001-07-19 11:00:41 +00009499 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00009500fi
9501
Guido van Rossum627b2d71993-12-24 10:39:16 +00009502
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009503fi
9504
Guido van Rossum0be3e491997-05-22 20:33:33 +00009505fi
9506
Guido van Rossum49545951997-12-02 19:28:29 +00009507fi
9508
Guido van Rossumb93a8621998-05-07 13:27:32 +00009509fi
9510
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009511
Michael W. Hudson54241132001-12-07 15:38:26 +00009512fi
9513
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009514
9515fi
9516
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009517fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009518rm -f core conftest.err conftest.$ac_objext \
9519 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009520fi
9521
Martin v. Löwis11437992002-04-12 09:54:03 +00009522fi
9523
9524
9525fi
9526
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009527
Michael W. Hudson54241132001-12-07 15:38:26 +00009528
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009529 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
9530$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009531if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009532 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009533else
Martin v. Löwis11437992002-04-12 09:54:03 +00009534 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009535LIBS="-lmpc $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009536cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009537/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009538
Martin v. Löwiseba40652007-08-30 20:10:57 +00009539/* Override any GCC internal prototype to avoid an error.
9540 Use char because int might match the return type of a GCC
9541 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009542#ifdef __cplusplus
9543extern "C"
9544#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009545char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009546int
9547main ()
9548{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009549return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009550 ;
9551 return 0;
9552}
9553_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009554if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009555 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009556else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009557 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009558fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009559rm -f core conftest.err conftest.$ac_objext \
9560 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009561LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009562fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009563{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
9564$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009565if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009566 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009567
Martin v. Löwis130fb172001-07-19 11:00:41 +00009568 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009569 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009570 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009571fi
9572
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009573
Neal Norwitza978ab02002-11-02 16:58:05 +00009574 if test "$posix_threads" != "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009575 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
9576$as_echo_n "checking for thr_create in -lthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009577if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009578 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009579else
Martin v. Löwis11437992002-04-12 09:54:03 +00009580 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009581LIBS="-lthread $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009582cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009583/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009584
Martin v. Löwiseba40652007-08-30 20:10:57 +00009585/* Override any GCC internal prototype to avoid an error.
9586 Use char because int might match the return type of a GCC
9587 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009588#ifdef __cplusplus
9589extern "C"
9590#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009591char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009592int
9593main ()
9594{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009595return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009596 ;
9597 return 0;
9598}
9599_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009600if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009601 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009602else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009603 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009604fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009605rm -f core conftest.err conftest.$ac_objext \
9606 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009607LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009608fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009609{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
9610$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009611if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009612 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009613
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009614 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009615 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009616 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009617fi
9618
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009619 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009620
Martin v. Löwis130fb172001-07-19 11:00:41 +00009621 if test "$USE_THREAD_MODULE" != "#"
9622 then
9623 # If the above checks didn't disable threads, (at least) OSF1
9624 # needs this '-threads' argument during linking.
9625 case $ac_sys_system in
9626 OSF1) LDLAST=-threads;;
9627 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00009628 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009629fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009630
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009631if test "$posix_threads" = "yes"; then
9632 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009633
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009634$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009635
9636 fi
9637
9638 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
9639 case $ac_sys_system/$ac_sys_release in
Charles-François Natali4929eb92011-07-21 19:41:04 +02009640 SunOS/5.6)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009641$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009642
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009643 ;;
9644 SunOS/5.8)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009645$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009646
9647 ;;
Charles-François Natali4929eb92011-07-21 19:41:04 +02009648 AIX/*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009649$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimescba36bb2008-01-30 22:54:18 +00009650
9651 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009652 esac
9653
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009654 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
9655$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009656 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009657 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009658else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009659 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009660 ac_cv_pthread_system_supported=no
9661else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009662 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009663/* end confdefs.h. */
Stefan Krahae66ca62012-11-22 22:36:57 +01009664
9665 #include <stdio.h>
9666 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009667 void *foo(void *parm) {
9668 return NULL;
9669 }
9670 main() {
9671 pthread_attr_t attr;
9672 pthread_t id;
9673 if (pthread_attr_init(&attr)) exit(-1);
9674 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
9675 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
9676 exit(0);
9677 }
9678_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009679if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009680 ac_cv_pthread_system_supported=yes
9681else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009682 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009683fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009684rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9685 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009686fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009687
Martin v. Löwiseba40652007-08-30 20:10:57 +00009688
Guido van Rossum627b2d71993-12-24 10:39:16 +00009689fi
9690
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
9692$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009693 if test "$ac_cv_pthread_system_supported" = "yes"; then
9694
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009695$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009696
9697 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009698 for ac_func in pthread_sigmask
9699do :
9700 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Matthias Klose3cef2a92012-03-14 23:39:33 +01009701if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009702 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009703#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009704_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00009705 case $ac_sys_system in
9706 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009707
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009708$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00009709
9710 ;;
9711 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009712fi
9713done
9714
Christian Heimes0d604cf2013-08-21 13:26:05 +02009715 for ac_func in pthread_atfork
9716do :
9717 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
9718if test "x$ac_cv_func_pthread_atfork" = xyes; then :
9719 cat >>confdefs.h <<_ACEOF
9720#define HAVE_PTHREAD_ATFORK 1
9721_ACEOF
9722
9723fi
9724done
9725
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009726fi
9727
9728
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009729# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00009730
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
9732$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009733# Check whether --enable-ipv6 was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009734if test "${enable_ipv6+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009735 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009736 no)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9738$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009739 ipv6=no
9740 ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009741 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9742$as_echo "yes" >&6; }
9743 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009744
9745 ipv6=yes
9746 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009747 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009748else
Martin v. Löwis11437992002-04-12 09:54:03 +00009749
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009750 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009751/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009752 /* AF_INET6 available check */
9753#include <sys/types.h>
9754#include <sys/socket.h>
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009755int
9756main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009757{
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009758int domain = AF_INET6;
9759 ;
9760 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009761}
Martin v. Löwis11437992002-04-12 09:54:03 +00009762_ACEOF
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009763if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +00009764
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9766$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009767 ipv6=yes
Matthias Klosec511b472010-05-08 11:01:39 +00009768
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009769else
Matthias Klosec511b472010-05-08 11:01:39 +00009770
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009771 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9772$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009773 ipv6=no
Matthias Klosec511b472010-05-08 11:01:39 +00009774
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009775fi
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009776rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009777
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009778if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009779 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
9780$as_echo_n "checking if RFC2553 API is available... " >&6; }
9781 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009782/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00009783
9784 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009785#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009786int
9787main ()
9788{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009789struct sockaddr_in6 x;
Matthias Klosec511b472010-05-08 11:01:39 +00009790 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00009791 ;
9792 return 0;
9793}
Matthias Klosec511b472010-05-08 11:01:39 +00009794
Martin v. Löwis11437992002-04-12 09:54:03 +00009795_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009796if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +00009797
9798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009799$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00009800 ipv6=yes
9801
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009802else
Matthias Klosec511b472010-05-08 11:01:39 +00009803
9804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009805$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00009806 ipv6=no
9807
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009808fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009809rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009810fi
9811
9812if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009813 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009814
9815fi
9816
Martin v. Löwiseba40652007-08-30 20:10:57 +00009817fi
9818
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009819
9820ipv6type=unknown
9821ipv6lib=none
9822ipv6trylibc=no
9823
9824if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009825 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
9826$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00009827 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
9828 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009829 case $i in
9830 inria)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009831 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009832/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009833
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009834#include <netinet/in.h>
9835#ifdef IPV6_INRIA_VERSION
9836yes
9837#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009838_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009839if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009840 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009841 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009842fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009843rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009844
9845 ;;
9846 kame)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009847 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009848/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009849
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009850#include <netinet/in.h>
9851#ifdef __KAME__
9852yes
9853#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009854_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009855if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009856 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009857 ipv6type=$i;
9858 ipv6lib=inet6
9859 ipv6libdir=/usr/local/v6/lib
9860 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009861fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009862rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009863
9864 ;;
9865 linux-glibc)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009866 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009867/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009868
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009869#include <features.h>
9870#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
9871yes
9872#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009873_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009874if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009875 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009876 ipv6type=$i;
9877 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009878fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009879rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009880
9881 ;;
9882 linux-inet6)
9883 if test -d /usr/inet6; then
9884 ipv6type=$i
9885 ipv6lib=inet6
9886 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00009887 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009888 fi
9889 ;;
9890 solaris)
9891 if test -f /etc/netconfig; then
Antoine Pitrou31e85952011-01-03 18:57:14 +00009892 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009893 ipv6type=$i
9894 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009895 fi
9896 fi
9897 ;;
9898 toshiba)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009899 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009900/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009901
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009902#include <sys/param.h>
9903#ifdef _TOSHIBA_INET6
9904yes
9905#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009906_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009907if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009908 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009909 ipv6type=$i;
9910 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009911 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009912fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009913rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009914
9915 ;;
9916 v6d)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009917 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009918/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009919
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009920#include </usr/local/v6/include/sys/v6config.h>
9921#ifdef __V6D__
9922yes
9923#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009924_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009925if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009926 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009927 ipv6type=$i;
9928 ipv6lib=v6;
9929 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009930 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009931fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009932rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009933
9934 ;;
9935 zeta)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009936 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009937/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009938
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009939#include <sys/param.h>
9940#ifdef _ZETA_MINAMI_INET6
9941yes
9942#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009943_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009944if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009945 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009946 ipv6type=$i;
9947 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009948 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009949fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009950rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009951
9952 ;;
9953 esac
9954 if test "$ipv6type" != "unknown"; then
9955 break
9956 fi
9957 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
9959$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009960fi
9961
9962if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
9963 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
9964 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
9965 echo "using lib$ipv6lib"
9966 else
9967 if test $ipv6trylibc = "yes"; then
9968 echo "using libc"
9969 else
9970 echo 'Fatal: no $ipv6lib library found. cannot continue.'
9971 echo "You need to fetch lib$ipv6lib.a from appropriate"
9972 echo 'ipv6 kit and compile beforehand.'
9973 exit 1
9974 fi
9975 fi
9976fi
9977
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
9979$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
9980cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009981/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00009982
9983 #include <Carbon/Carbon.h>
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009984int
9985main ()
9986{
9987FSIORefNum fRef = 0
9988 ;
9989 return 0;
9990}
Mark Dickinson0712b562010-05-08 19:13:21 +00009991
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009992_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009993if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +00009994
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009995
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009996$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009997
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9999$as_echo "yes" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010000
Mark Dickinson0712b562010-05-08 19:13:21 +000010001else
10002
10003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10004$as_echo "no" >&6; }
10005
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010006fi
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010007rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10008
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010009# Check for --with-doc-strings
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10011$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010012
Martin v. Löwiseba40652007-08-30 20:10:57 +000010013# Check whether --with-doc-strings was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010014if test "${with_doc_strings+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000010015 withval=$with_doc_strings;
10016fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010017
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010018
10019if test -z "$with_doc_strings"
10020then with_doc_strings="yes"
10021fi
10022if test "$with_doc_strings" != "no"
10023then
10024
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010025$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010026
10027fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010028{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10029$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010030
Neil Schemenauera35c6882001-02-27 04:45:05 +000010031# Check for Python-specific malloc support
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
10033$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010034
Martin v. Löwiseba40652007-08-30 20:10:57 +000010035# Check whether --with-tsc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010036if test "${with_tsc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000010037 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010038if test "$withval" != no
10039then
10040
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010041$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010042
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10044$as_echo "yes" >&6; }
10045else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10046$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010047fi
10048else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10050$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010051fi
10052
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010053
10054# Check for Python-specific malloc support
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10056$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010057
Martin v. Löwiseba40652007-08-30 20:10:57 +000010058# Check whether --with-pymalloc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010059if test "${with_pymalloc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000010060 withval=$with_pymalloc;
10061fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010062
Neil Schemenauera35c6882001-02-27 04:45:05 +000010063
Neil Schemenauer16c22972002-03-22 15:34:49 +000010064if test -z "$with_pymalloc"
10065then with_pymalloc="yes"
10066fi
10067if test "$with_pymalloc" != "no"
10068then
Martin v. Löwis11437992002-04-12 09:54:03 +000010069
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010070$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000010071
10072fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010073{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
10074$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000010075
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010076# Check for Valgrind support
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
10078$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010079
10080# Check whether --with-valgrind was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010081if test "${with_valgrind+set}" = set; then :
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010082 withval=$with_valgrind;
10083else
10084 with_valgrind=no
10085fi
10086
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010087{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
10088$as_echo "$with_valgrind" >&6; }
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010089if test "$with_valgrind" != no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010090 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 +010010091if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010092
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010093$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010094
10095else
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010096 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010097
10098fi
10099
10100
10101fi
10102
Barry Warsawef82cd72000-06-30 16:21:01 +000010103# Check for --with-wctype-functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-wctype-functions" >&5
10105$as_echo_n "checking for --with-wctype-functions... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010106
Martin v. Löwiseba40652007-08-30 20:10:57 +000010107# Check whether --with-wctype-functions was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010108if test "${with_wctype_functions+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000010109 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000010110if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000010111then
10112
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010113$as_echo "#define WANT_WCTYPE_FUNCTIONS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010114
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10116$as_echo "yes" >&6; }
10117else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10118$as_echo "no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000010119fi
10120else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10122$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010123fi
10124
Barry Warsawef82cd72000-06-30 16:21:01 +000010125
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010126# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000010127
Guido van Rossum98935bf2001-09-05 19:13:16 +000010128DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000010129
Guido van Rossume97ee181999-12-20 21:27:22 +000010130# the dlopen() function means we might want to use dynload_shlib.o. some
10131# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000010132for ac_func in dlopen
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010133do :
10134 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010135if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010136 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010137#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010138_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000010139
Guido van Rossume97ee181999-12-20 21:27:22 +000010140fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010141done
Guido van Rossume97ee181999-12-20 21:27:22 +000010142
Michael W. Hudson54241132001-12-07 15:38:26 +000010143
Guido van Rossume97ee181999-12-20 21:27:22 +000010144# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
10145# loading of modules.
10146
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
10148$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010149if test -z "$DYNLOADFILE"
10150then
10151 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000010152 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
10153 if test "$ac_cv_func_dlopen" = yes
10154 then DYNLOADFILE="dynload_shlib.o"
10155 else DYNLOADFILE="dynload_aix.o"
10156 fi
10157 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000010158 BeOS*) DYNLOADFILE="dynload_beos.o";;
10159 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Anthony Baxter82201742006-04-09 15:07:40 +000010160 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
10161 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010162 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000010163 *)
10164 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
10165 # out any dynamic loading
10166 if test "$ac_cv_func_dlopen" = yes
10167 then DYNLOADFILE="dynload_shlib.o"
10168 else DYNLOADFILE="dynload_stub.o"
10169 fi
10170 ;;
10171 esac
10172fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010173{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
10174$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010175if test "$DYNLOADFILE" != "dynload_stub.o"
10176then
Martin v. Löwis11437992002-04-12 09:54:03 +000010177
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010178$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000010179
10180fi
10181
Neil Schemenauer4e425612001-06-19 15:44:15 +000010182# MACHDEP_OBJS can be set to platform-specific object files needed by Python
10183
Michael W. Hudson54241132001-12-07 15:38:26 +000010184
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
10186$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010187if test -z "$MACHDEP_OBJS"
10188then
Jack Jansene578a632001-08-15 01:27:14 +000010189 MACHDEP_OBJS=$extra_machdep_objs
10190else
10191 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000010192fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010193{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
10194$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010195
Guido van Rossum627b2d71993-12-24 10:39:16 +000010196# checks for library functions
Martin v. Löwisaef18b12008-03-24 13:31:16 +000010197for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
10198 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000010199 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis50ea4562009-11-27 13:56:01 +000010200 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Benjamin Petersond16e01c2014-02-04 10:20:26 -050010201 initgroups kill killpg lchmod lchown lstat mkfifo mknod mktime mmap \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000010202 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000010203 putenv readlink realpath \
Jesse Noller355b1262009-04-02 00:03:28 +000010204 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
10205 setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000010206 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Martin v. Löwis50ea4562009-11-27 13:56:01 +000010207 setlocale setregid setreuid setresuid setresgid \
10208 setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +000010209 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000010210 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Neal Norwitz05a45592006-03-20 06:30:08 +000010211 truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010212do :
10213 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10214ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010215if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010216 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010217#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010218_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010219
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010220fi
10221done
10222
Michael W. Hudson54241132001-12-07 15:38:26 +000010223
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010224# For some functions, having a definition is not sufficient, since
10225# we want to take their address.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010226{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
10227$as_echo_n "checking for chroot... " >&6; }
10228cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010229/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010230#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010231int
10232main ()
10233{
10234void *x=chroot
10235 ;
10236 return 0;
10237}
10238_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010239if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010240
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010241$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010242
Matthias Klosec511b472010-05-08 11:01:39 +000010243 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010244$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010245else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010246 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10247$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010248
10249fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010250rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
10252$as_echo_n "checking for link... " >&6; }
10253cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010254/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010255#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010256int
10257main ()
10258{
10259void *x=link
10260 ;
10261 return 0;
10262}
10263_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010264if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010265
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010266$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010267
Matthias Klosec511b472010-05-08 11:01:39 +000010268 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010269$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010270else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010271 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10272$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010273
10274fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010275rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
10277$as_echo_n "checking for symlink... " >&6; }
10278cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010279/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010280#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010281int
10282main ()
10283{
10284void *x=symlink
10285 ;
10286 return 0;
10287}
10288_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010289if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010290
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010291$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010292
Matthias Klosec511b472010-05-08 11:01:39 +000010293 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010294$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010295else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10297$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010298
10299fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010300rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
10302$as_echo_n "checking for fchdir... " >&6; }
10303cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010304/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010305#include <unistd.h>
10306int
10307main ()
10308{
10309void *x=fchdir
10310 ;
10311 return 0;
10312}
10313_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010314if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010315
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010316$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010317
Matthias Klosec511b472010-05-08 11:01:39 +000010318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010319$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010320else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010321 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10322$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010323
10324fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010325rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010326{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
10327$as_echo_n "checking for fsync... " >&6; }
10328cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010329/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010330#include <unistd.h>
10331int
10332main ()
10333{
10334void *x=fsync
10335 ;
10336 return 0;
10337}
10338_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010339if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010340
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010341$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010342
Matthias Klosec511b472010-05-08 11:01:39 +000010343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010344$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010345else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10347$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010348
10349fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010350rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
10352$as_echo_n "checking for fdatasync... " >&6; }
10353cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010354/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010355#include <unistd.h>
10356int
10357main ()
10358{
10359void *x=fdatasync
10360 ;
10361 return 0;
10362}
10363_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010364if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010365
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010366$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010367
Matthias Klosec511b472010-05-08 11:01:39 +000010368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010369$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010370else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010371 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10372$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010373
10374fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010375rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
10377$as_echo_n "checking for epoll... " >&6; }
10378cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010379/* end confdefs.h. */
10380#include <sys/epoll.h>
10381int
10382main ()
10383{
10384void *x=epoll_create
10385 ;
10386 return 0;
10387}
10388_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010389if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010390
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010391$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010392
Matthias Klosec511b472010-05-08 11:01:39 +000010393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010394$as_echo "yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010395else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10397$as_echo "no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010398
10399fi
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010400rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
10402$as_echo_n "checking for kqueue... " >&6; }
10403cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010404/* end confdefs.h. */
10405
10406#include <sys/types.h>
10407#include <sys/event.h>
10408
10409int
10410main ()
10411{
10412int x=kqueue()
10413 ;
10414 return 0;
10415}
10416_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010417if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010418
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010419$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010420
Matthias Klosec511b472010-05-08 11:01:39 +000010421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010422$as_echo "yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010423else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010424 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10425$as_echo "no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010426
10427fi
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010428rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010429# On some systems (eg. FreeBSD 5), we would find a definition of the
10430# functions ctermid_r, setgroups in the library, but no prototype
10431# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
10432# address to avoid compiler warnings and potential miscompilations
10433# because of the missing prototypes.
10434
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
10436$as_echo_n "checking for ctermid_r... " >&6; }
10437cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010438/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010439
Martin v. Löwisd5843682002-11-21 20:41:28 +000010440#include <stdio.h>
10441
Martin v. Löwisd5843682002-11-21 20:41:28 +000010442int
10443main ()
10444{
10445void* p = ctermid_r
10446 ;
10447 return 0;
10448}
10449_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010450if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010451
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010452$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010453
Matthias Klosec511b472010-05-08 11:01:39 +000010454 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010455$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010456else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10458$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010459
10460fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010461rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10462
Antoine Pitroub170f172010-09-10 18:47:36 +000010463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
10464$as_echo_n "checking for flock declaration... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010465if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010466 $as_echo_n "(cached) " >&6
10467else
10468 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010469/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010470#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010471int
10472main ()
10473{
10474void* p = flock
Antoine Pitroub170f172010-09-10 18:47:36 +000010475
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010476 ;
10477 return 0;
10478}
10479_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010480if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010481 ac_cv_flock_decl=yes
10482else
10483 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010484
10485fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010486rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitrou85729812010-09-07 14:55:24 +000010487
Antoine Pitroub170f172010-09-10 18:47:36 +000010488fi
10489{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
10490$as_echo "$ac_cv_flock_decl" >&6; }
10491if test "x${ac_cv_flock_decl}" = xyes; then
10492 for ac_func in flock
10493do :
10494 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010495if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010496 cat >>confdefs.h <<_ACEOF
10497#define HAVE_FLOCK 1
Antoine Pitrou85729812010-09-07 14:55:24 +000010498_ACEOF
Antoine Pitroub170f172010-09-10 18:47:36 +000010499
Antoine Pitrou85729812010-09-07 14:55:24 +000010500else
Antoine Pitroub170f172010-09-10 18:47:36 +000010501 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitrou85729812010-09-07 14:55:24 +000010502$as_echo_n "checking for flock in -lbsd... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010503if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitrou85729812010-09-07 14:55:24 +000010504 $as_echo_n "(cached) " >&6
10505else
10506 ac_check_lib_save_LIBS=$LIBS
10507LIBS="-lbsd $LIBS"
10508cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10509/* end confdefs.h. */
10510
10511/* Override any GCC internal prototype to avoid an error.
10512 Use char because int might match the return type of a GCC
10513 builtin and then its argument prototype would still apply. */
10514#ifdef __cplusplus
10515extern "C"
10516#endif
10517char flock ();
10518int
10519main ()
10520{
10521return flock ();
10522 ;
10523 return 0;
10524}
10525_ACEOF
10526if ac_fn_c_try_link "$LINENO"; then :
10527 ac_cv_lib_bsd_flock=yes
10528else
10529 ac_cv_lib_bsd_flock=no
10530fi
10531rm -f core conftest.err conftest.$ac_objext \
10532 conftest$ac_exeext conftest.$ac_ext
10533LIBS=$ac_check_lib_save_LIBS
10534fi
10535{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
10536$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010537if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010538 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitrou85729812010-09-07 14:55:24 +000010539
10540
10541$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
10542
10543
10544fi
10545
10546
10547fi
Antoine Pitroub170f172010-09-10 18:47:36 +000010548done
10549
Antoine Pitrou85729812010-09-07 14:55:24 +000010550fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010551
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
10553$as_echo_n "checking for getpagesize... " >&6; }
10554cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010555/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010556
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010557#include <unistd.h>
10558
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010559int
10560main ()
10561{
10562void* p = getpagesize
10563 ;
10564 return 0;
10565}
10566_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010567if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010568
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010569$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010570
Matthias Klosec511b472010-05-08 11:01:39 +000010571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010572$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010573else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10575$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010576
10577fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010578rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010579
Charles-François Natali93a11752011-11-27 13:01:35 +010010580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
10581$as_echo_n "checking for broken unsetenv... " >&6; }
10582cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10583/* end confdefs.h. */
10584
10585#include <stdlib.h>
10586
10587int
10588main ()
10589{
10590int res = unsetenv("DUMMY")
10591 ;
10592 return 0;
10593}
10594_ACEOF
10595if ac_fn_c_try_compile "$LINENO"; then :
10596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10597$as_echo "no" >&6; }
10598else
10599
10600$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
10601
10602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10603$as_echo "yes" >&6; }
10604
10605fi
10606rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10607
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010608for ac_prog in true
10609do
10610 # Extract the first word of "$ac_prog", so it can be a program name with args.
10611set dummy $ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10613$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010614if ${ac_cv_prog_TRUE+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010615 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010616else
10617 if test -n "$TRUE"; then
10618 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
10619else
10620as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10621for as_dir in $PATH
10622do
10623 IFS=$as_save_IFS
10624 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010625 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +010010626 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010627 ac_cv_prog_TRUE="$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010628 $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 +000010629 break 2
10630 fi
10631done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010632 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000010633IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010634
10635fi
10636fi
10637TRUE=$ac_cv_prog_TRUE
10638if test -n "$TRUE"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
10640$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010641else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10643$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010644fi
10645
Martin v. Löwiseba40652007-08-30 20:10:57 +000010646
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010647 test -n "$TRUE" && break
10648done
10649test -n "$TRUE" || TRUE="/bin/true"
10650
10651
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
10653$as_echo_n "checking for inet_aton in -lc... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010654if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010655 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010656else
10657 ac_check_lib_save_LIBS=$LIBS
10658LIBS="-lc $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010659cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010660/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010661
Martin v. Löwiseba40652007-08-30 20:10:57 +000010662/* Override any GCC internal prototype to avoid an error.
10663 Use char because int might match the return type of a GCC
10664 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010665#ifdef __cplusplus
10666extern "C"
10667#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010668char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010669int
10670main ()
10671{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010672return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010673 ;
10674 return 0;
10675}
10676_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010677if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010678 ac_cv_lib_c_inet_aton=yes
10679else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010680 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010681fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010682rm -f core conftest.err conftest.$ac_objext \
10683 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010684LIBS=$ac_check_lib_save_LIBS
10685fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010686{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
10687$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010688if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010689 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010690else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010691 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
10692$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010693if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010694 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010695else
10696 ac_check_lib_save_LIBS=$LIBS
10697LIBS="-lresolv $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010698cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010699/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010700
Martin v. Löwiseba40652007-08-30 20:10:57 +000010701/* Override any GCC internal prototype to avoid an error.
10702 Use char because int might match the return type of a GCC
10703 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010704#ifdef __cplusplus
10705extern "C"
10706#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010707char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010708int
10709main ()
10710{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010711return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010712 ;
10713 return 0;
10714}
10715_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010716if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010717 ac_cv_lib_resolv_inet_aton=yes
10718else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010719 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010720fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010721rm -f core conftest.err conftest.$ac_objext \
10722 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010723LIBS=$ac_check_lib_save_LIBS
10724fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010725{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
10726$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010727if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010728 cat >>confdefs.h <<_ACEOF
10729#define HAVE_LIBRESOLV 1
10730_ACEOF
10731
10732 LIBS="-lresolv $LIBS"
10733
10734fi
10735
10736
10737fi
10738
10739
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010740# On Tru64, chflags seems to be present, but calling it will
10741# exit Python
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
10743$as_echo_n "checking for chflags... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010744if ${ac_cv_have_chflags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010745 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010746else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010747 if test "$cross_compiling" = yes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010748 ac_cv_have_chflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010749else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010750 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010751/* end confdefs.h. */
Ned Deily43e10542011-06-27 23:41:53 -070010752
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010753#include <sys/stat.h>
10754#include <unistd.h>
10755int main(int argc, char*argv[])
10756{
10757 if(chflags(argv[0], 0) != 0)
10758 return 1;
10759 return 0;
10760}
Ned Deily43e10542011-06-27 23:41:53 -070010761
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010762_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010763if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010764 ac_cv_have_chflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010765else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010766 ac_cv_have_chflags=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010767fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010768rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10769 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000010770fi
10771
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010772
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010773fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010774{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
10775$as_echo "$ac_cv_have_chflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000010776if test "$ac_cv_have_chflags" = cross ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010777 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010778if test "x$ac_cv_func_chflags" = xyes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010779 ac_cv_have_chflags="yes"
10780else
10781 ac_cv_have_chflags="no"
10782fi
10783
10784fi
10785if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010786
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010787$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010788
10789fi
10790
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
10792$as_echo_n "checking for lchflags... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010793if ${ac_cv_have_lchflags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010794 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010795else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010796 if test "$cross_compiling" = yes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010797 ac_cv_have_lchflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010798else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010799 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010800/* end confdefs.h. */
Ned Deily43e10542011-06-27 23:41:53 -070010801
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010802#include <sys/stat.h>
10803#include <unistd.h>
10804int main(int argc, char*argv[])
10805{
10806 if(lchflags(argv[0], 0) != 0)
10807 return 1;
10808 return 0;
10809}
Ned Deily43e10542011-06-27 23:41:53 -070010810
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010811_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010812if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010813 ac_cv_have_lchflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010814else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010815 ac_cv_have_lchflags=no
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010816fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010817rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10818 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010819fi
10820
10821
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010822fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010823{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
10824$as_echo "$ac_cv_have_lchflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000010825if test "$ac_cv_have_lchflags" = cross ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010826 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010827if test "x$ac_cv_func_lchflags" = xyes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010828 ac_cv_have_lchflags="yes"
10829else
10830 ac_cv_have_lchflags="no"
10831fi
10832
10833fi
10834if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010835
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010836$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010837
10838fi
10839
Ronald Oussorenf8752642006-07-06 10:13:35 +000010840case $ac_sys_system/$ac_sys_release in
10841Darwin/*)
10842 _CUR_CFLAGS="${CFLAGS}"
10843 _CUR_LDFLAGS="${LDFLAGS}"
10844 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
10845 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
10846 ;;
10847esac
10848
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
10850$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010851if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010852 $as_echo_n "(cached) " >&6
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010853else
10854 ac_check_lib_save_LIBS=$LIBS
10855LIBS="-lz $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010856cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010857/* end confdefs.h. */
10858
Martin v. Löwiseba40652007-08-30 20:10:57 +000010859/* Override any GCC internal prototype to avoid an error.
10860 Use char because int might match the return type of a GCC
10861 builtin and then its argument prototype would still apply. */
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010862#ifdef __cplusplus
10863extern "C"
10864#endif
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010865char inflateCopy ();
10866int
10867main ()
10868{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010869return inflateCopy ();
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010870 ;
10871 return 0;
10872}
10873_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010874if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010875 ac_cv_lib_z_inflateCopy=yes
10876else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010877 ac_cv_lib_z_inflateCopy=no
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010878fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010879rm -f core conftest.err conftest.$ac_objext \
10880 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010881LIBS=$ac_check_lib_save_LIBS
10882fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010883{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
10884$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010885if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010886
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010887$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010888
10889fi
10890
10891
Ronald Oussorenf8752642006-07-06 10:13:35 +000010892case $ac_sys_system/$ac_sys_release in
10893Darwin/*)
10894 CFLAGS="${_CUR_CFLAGS}"
10895 LDFLAGS="${_CUR_LDFLAGS}"
10896 ;;
10897esac
10898
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
10900$as_echo_n "checking for hstrerror... " >&6; }
10901cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010902/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010903
Martin v. Löwise9416172003-05-03 10:12:45 +000010904#include <netdb.h>
10905
Martin v. Löwise9416172003-05-03 10:12:45 +000010906int
10907main ()
10908{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010909void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010910 ;
10911 return 0;
10912}
10913_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010914if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010915
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010916$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010917
Matthias Klosec511b472010-05-08 11:01:39 +000010918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010919$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010920else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10922$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010923
10924fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010925rm -f core conftest.err conftest.$ac_objext \
10926 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010927
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
10929$as_echo_n "checking for inet_aton... " >&6; }
10930cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010931/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010932
Martin v. Löwis86d66262006-02-17 08:40:11 +000010933#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010934#include <sys/socket.h>
10935#include <netinet/in.h>
10936#include <arpa/inet.h>
10937
Martin v. Löwise9416172003-05-03 10:12:45 +000010938int
10939main ()
10940{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010941void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010942 ;
10943 return 0;
10944}
10945_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010946if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010947
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010948$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010949
Matthias Klosec511b472010-05-08 11:01:39 +000010950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010951$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010952else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10954$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010955
10956fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010957rm -f core conftest.err conftest.$ac_objext \
10958 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010959
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
10961$as_echo_n "checking for inet_pton... " >&6; }
10962cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010963/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010964
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010965#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010966#include <sys/socket.h>
10967#include <netinet/in.h>
10968#include <arpa/inet.h>
10969
Martin v. Löwise9416172003-05-03 10:12:45 +000010970int
10971main ()
10972{
10973void* p = inet_pton
10974 ;
10975 return 0;
10976}
10977_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010978if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010979
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010980$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010981
Matthias Klosec511b472010-05-08 11:01:39 +000010982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010983$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010984else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10986$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010987
10988fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010989rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000010990
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010991# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
10993$as_echo_n "checking for setgroups... " >&6; }
10994cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010995/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010996
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010997#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010998#ifdef HAVE_GRP_H
10999#include <grp.h>
11000#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000011001
Martin v. Löwisd5843682002-11-21 20:41:28 +000011002int
11003main ()
11004{
11005void* p = setgroups
11006 ;
11007 return 0;
11008}
11009_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011010if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011011
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011012$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011013
Matthias Klosec511b472010-05-08 11:01:39 +000011014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011015$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011016else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11018$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011019
11020fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011021rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000011022
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011023# check for openpty and forkpty
11024
11025for ac_func in openpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011026do :
11027 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011028if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011029 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011030#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011031_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011032
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011033else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011034 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
11035$as_echo_n "checking for openpty in -lutil... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011036if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011037 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011038else
Martin v. Löwis11437992002-04-12 09:54:03 +000011039 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011040LIBS="-lutil $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011041cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011042/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011043
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öwis11437992002-04-12 09:54:03 +000011047#ifdef __cplusplus
11048extern "C"
11049#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011050char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011051int
11052main ()
11053{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011054return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +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öwis11437992002-04-12 09:54:03 +000011060 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011061else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011062 ac_cv_lib_util_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öwis11437992002-04-12 09:54:03 +000011066LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011067fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011068{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
11069$as_echo "$ac_cv_lib_util_openpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011070if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011071 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011072 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011073else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011074 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
11075$as_echo_n "checking for openpty in -lbsd... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011076if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011077 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011078else
11079 ac_check_lib_save_LIBS=$LIBS
11080LIBS="-lbsd $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011081cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011082/* end confdefs.h. */
11083
Martin v. Löwiseba40652007-08-30 20:10:57 +000011084/* Override any GCC internal prototype to avoid an error.
11085 Use char because int might match the return type of a GCC
11086 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011087#ifdef __cplusplus
11088extern "C"
11089#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011090char openpty ();
11091int
11092main ()
11093{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011094return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011095 ;
11096 return 0;
11097}
11098_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011099if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011100 ac_cv_lib_bsd_openpty=yes
11101else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011102 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011103fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011104rm -f core conftest.err conftest.$ac_objext \
11105 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011106LIBS=$ac_check_lib_save_LIBS
11107fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011108{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
11109$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011110if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011111 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011112 LIBS="$LIBS -lbsd"
11113fi
11114
11115
11116fi
11117
Fred Drake8cef4cf2000-06-28 16:40:38 +000011118
11119fi
11120done
11121
11122for ac_func in forkpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011123do :
11124 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011125if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011126 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011127#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011128_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011129
Fred Drake8cef4cf2000-06-28 16:40:38 +000011130else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011131 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
11132$as_echo_n "checking for forkpty in -lutil... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011133if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011134 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011135else
Martin v. Löwis11437992002-04-12 09:54:03 +000011136 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011137LIBS="-lutil $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011138cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011139/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011140
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öwis11437992002-04-12 09:54:03 +000011144#ifdef __cplusplus
11145extern "C"
11146#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011147char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011148int
11149main ()
11150{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011151return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +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öwis11437992002-04-12 09:54:03 +000011157 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011158else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011159 ac_cv_lib_util_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öwis11437992002-04-12 09:54:03 +000011163LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011164fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011165{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
11166$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011167if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011168 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011169 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011170else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011171 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
11172$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011173if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011174 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011175else
11176 ac_check_lib_save_LIBS=$LIBS
11177LIBS="-lbsd $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011178cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011179/* end confdefs.h. */
11180
Martin v. Löwiseba40652007-08-30 20:10:57 +000011181/* Override any GCC internal prototype to avoid an error.
11182 Use char because int might match the return type of a GCC
11183 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011184#ifdef __cplusplus
11185extern "C"
11186#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011187char forkpty ();
11188int
11189main ()
11190{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011191return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011192 ;
11193 return 0;
11194}
11195_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011196if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011197 ac_cv_lib_bsd_forkpty=yes
11198else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011199 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011200fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011201rm -f core conftest.err conftest.$ac_objext \
11202 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011203LIBS=$ac_check_lib_save_LIBS
11204fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011205{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
11206$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011207if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011208 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011209 LIBS="$LIBS -lbsd"
11210fi
11211
11212
11213fi
11214
Fred Drake8cef4cf2000-06-28 16:40:38 +000011215
11216fi
11217done
11218
Jack Jansendd19cf82001-12-06 22:36:17 +000011219
Brett Cannonaa5778d2008-03-18 04:09:00 +000011220# Stuff for expat.
Brett Cannonaa5778d2008-03-18 04:09:00 +000011221for ac_func in memmove
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011222do :
11223 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011224if test "x$ac_cv_func_memmove" = xyes; then :
Brett Cannonaa5778d2008-03-18 04:09:00 +000011225 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011226#define HAVE_MEMMOVE 1
Brett Cannonaa5778d2008-03-18 04:09:00 +000011227_ACEOF
11228
11229fi
11230done
11231
11232
Michael W. Hudson54241132001-12-07 15:38:26 +000011233# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000011234for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011235do :
11236 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11237ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011238if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011239 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011240#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011241_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000011242
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011243fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000011244done
11245
Michael W. Hudson54241132001-12-07 15:38:26 +000011246
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011247ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011248if test "x$ac_cv_func_dup2" = xyes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011249 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000011250
Martin v. Löwis1142de32002-03-29 16:28:31 +000011251else
Martin v. Löwiseba40652007-08-30 20:10:57 +000011252 case " $LIBOBJS " in
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011253 *" dup2.$ac_objext "* ) ;;
11254 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Martin v. Löwiseba40652007-08-30 20:10:57 +000011255 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011256esac
11257
Martin v. Löwis1142de32002-03-29 16:28:31 +000011258fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011259
11260ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011261if test "x$ac_cv_func_getcwd" = xyes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011262 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
11263
11264else
11265 case " $LIBOBJS " in
11266 *" getcwd.$ac_objext "* ) ;;
11267 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
11268 ;;
11269esac
11270
11271fi
11272
11273ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011274if test "x$ac_cv_func_strdup" = xyes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011275 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
11276
11277else
11278 case " $LIBOBJS " in
11279 *" strdup.$ac_objext "* ) ;;
11280 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
11281 ;;
11282esac
11283
11284fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000011285
11286
11287for ac_func in getpgrp
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011288do :
11289 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011290if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011291 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011292#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011293_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011294 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011295/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011296#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011297int
11298main ()
11299{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011300getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011301 ;
11302 return 0;
11303}
11304_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011305if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011306
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011307$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011308
Guido van Rossum627b2d71993-12-24 10:39:16 +000011309fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011310rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011311
Guido van Rossum627b2d71993-12-24 10:39:16 +000011312fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011313done
Guido van Rossum627b2d71993-12-24 10:39:16 +000011314
Jack Jansen150753c2003-03-29 22:07:47 +000011315for ac_func in setpgrp
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011316do :
11317 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011318if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000011319 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011320#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000011321_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011322 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011323/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000011324#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000011325int
11326main ()
11327{
11328setpgrp(0,0);
11329 ;
11330 return 0;
11331}
11332_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011333if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011334
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011335$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011336
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011337fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011338rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000011339
11340fi
11341done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011342
Thomas Wouters3a584202000-08-05 23:28:51 +000011343for ac_func in gettimeofday
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011344do :
11345 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011346if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011347 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011348#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011349_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011350 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011351/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011352#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011353int
11354main ()
11355{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011356gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011357 ;
11358 return 0;
11359}
11360_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011361if ac_fn_c_try_compile "$LINENO"; then :
11362
Guido van Rossum627b2d71993-12-24 10:39:16 +000011363else
Skip Montanaro6dead952003-09-25 14:50:04 +000011364
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011365$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011366
Martin v. Löwis11437992002-04-12 09:54:03 +000011367
Guido van Rossum627b2d71993-12-24 10:39:16 +000011368fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011369rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011370
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011371fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011372done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011373
Michael W. Hudson54241132001-12-07 15:38:26 +000011374
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
11376$as_echo_n "checking for major... " >&6; }
11377cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011378/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011379
Neal Norwitz6eb37f02003-02-23 23:28:15 +000011380#if defined(MAJOR_IN_MKDEV)
11381#include <sys/mkdev.h>
11382#elif defined(MAJOR_IN_SYSMACROS)
11383#include <sys/sysmacros.h>
11384#else
11385#include <sys/types.h>
11386#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011387
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011388int
11389main ()
11390{
11391
11392 makedev(major(0),minor(0));
11393
11394 ;
11395 return 0;
11396}
11397_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011398if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011399
11400
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011401$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011402
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11404$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011405
11406else
Skip Montanaro6dead952003-09-25 14:50:04 +000011407
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11409$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011410
11411fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011412rm -f core conftest.err conftest.$ac_objext \
11413 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011414
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011415# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000011416# for [no]getaddrinfo in netdb.h.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
11418$as_echo_n "checking for getaddrinfo... " >&6; }
11419cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011420/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011421
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011422#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011423#include <sys/socket.h>
11424#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011425#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011426
Martin v. Löwis11437992002-04-12 09:54:03 +000011427int
11428main ()
11429{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011430getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000011431 ;
11432 return 0;
11433}
11434_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011435if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011436 have_getaddrinfo=yes
11437else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011438 have_getaddrinfo=no
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011439fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011440rm -f core conftest.err conftest.$ac_objext \
11441 conftest$ac_exeext conftest.$ac_ext
11442{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
11443$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011444if test $have_getaddrinfo = yes
11445then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011446 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
11447$as_echo_n "checking getaddrinfo bug... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011448 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011449 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011450else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011451 if test "$cross_compiling" = yes; then :
doko@python.orgd65e2ba2013-01-31 23:52:03 +010011452
11453if test "${enable_ipv6+set}" = set; then
11454 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
11455else
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011456 ac_cv_buggy_getaddrinfo=yes
doko@python.orgd65e2ba2013-01-31 23:52:03 +010011457fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011458else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011459 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011460/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011461
Stefan Krah0afe4e42012-11-22 23:56:51 +010011462#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011463#include <sys/types.h>
11464#include <netdb.h>
11465#include <string.h>
11466#include <sys/socket.h>
11467#include <netinet/in.h>
11468
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011469int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011470{
11471 int passive, gaierr, inet4 = 0, inet6 = 0;
11472 struct addrinfo hints, *ai, *aitop;
11473 char straddr[INET6_ADDRSTRLEN], strport[16];
11474
11475 for (passive = 0; passive <= 1; passive++) {
11476 memset(&hints, 0, sizeof(hints));
11477 hints.ai_family = AF_UNSPEC;
11478 hints.ai_flags = passive ? AI_PASSIVE : 0;
11479 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000011480 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011481 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
11482 (void)gai_strerror(gaierr);
11483 goto bad;
11484 }
11485 for (ai = aitop; ai; ai = ai->ai_next) {
11486 if (ai->ai_addr == NULL ||
11487 ai->ai_addrlen == 0 ||
11488 getnameinfo(ai->ai_addr, ai->ai_addrlen,
11489 straddr, sizeof(straddr), strport, sizeof(strport),
11490 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
11491 goto bad;
11492 }
11493 switch (ai->ai_family) {
11494 case AF_INET:
11495 if (strcmp(strport, "54321") != 0) {
11496 goto bad;
11497 }
11498 if (passive) {
11499 if (strcmp(straddr, "0.0.0.0") != 0) {
11500 goto bad;
11501 }
11502 } else {
11503 if (strcmp(straddr, "127.0.0.1") != 0) {
11504 goto bad;
11505 }
11506 }
11507 inet4++;
11508 break;
11509 case AF_INET6:
11510 if (strcmp(strport, "54321") != 0) {
11511 goto bad;
11512 }
11513 if (passive) {
11514 if (strcmp(straddr, "::") != 0) {
11515 goto bad;
11516 }
11517 } else {
11518 if (strcmp(straddr, "::1") != 0) {
11519 goto bad;
11520 }
11521 }
11522 inet6++;
11523 break;
11524 case AF_UNSPEC:
11525 goto bad;
11526 break;
11527 default:
11528 /* another family support? */
11529 break;
11530 }
11531 }
11532 }
11533
11534 if (!(inet4 == 0 || inet4 == 2))
11535 goto bad;
11536 if (!(inet6 == 0 || inet6 == 2))
11537 goto bad;
11538
11539 if (aitop)
11540 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011541 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011542
11543 bad:
11544 if (aitop)
11545 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011546 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011547}
11548
Martin v. Löwis11437992002-04-12 09:54:03 +000011549_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011550if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011551 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011552else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011553 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011554fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011555rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11556 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011557fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011558
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011559fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011560
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011561fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011562
Benjamin Peterson75fed812010-11-01 01:47:19 +000011563{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
11564$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
11565
Mark Dickinson0ef0b912009-12-31 21:11:48 +000011566if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011567then
11568 if test $ipv6 = yes
11569 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011570 echo 'Fatal: You must get working getaddrinfo() function.'
11571 echo ' or you can specify "--disable-ipv6"'.
11572 exit 1
11573 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011574else
Martin v. Löwis11437992002-04-12 09:54:03 +000011575
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011576$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011577
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011578fi
Benjamin Peterson75fed812010-11-01 01:47:19 +000011579
Jack Jansen9a66b6d2001-08-08 13:56:14 +000011580for ac_func in getnameinfo
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011581do :
11582 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011583if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011584 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011585#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011586_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011587
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011588fi
11589done
11590
Michael W. Hudson54241132001-12-07 15:38:26 +000011591
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011592# checks for structures
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
11594$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011595if ${ac_cv_header_time+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011596 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011597else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011598 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011599/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011600#include <sys/types.h>
11601#include <sys/time.h>
11602#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011603
Martin v. Löwis11437992002-04-12 09:54:03 +000011604int
11605main ()
11606{
11607if ((struct tm *) 0)
11608return 0;
11609 ;
11610 return 0;
11611}
11612_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011613if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011614 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011615else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011616 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011617fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011618rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011619fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011620{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
11621$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011622if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011623
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011624$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011625
11626fi
11627
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
11629$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011630if ${ac_cv_struct_tm+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011631 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011632else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011633 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011634/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011635#include <sys/types.h>
11636#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011637
Martin v. Löwis11437992002-04-12 09:54:03 +000011638int
11639main ()
11640{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011641struct tm tm;
11642 int *p = &tm.tm_sec;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011643 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000011644 ;
11645 return 0;
11646}
11647_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011648if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011649 ac_cv_struct_tm=time.h
11650else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011651 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011652fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011653rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011654fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011655{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
11656$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011657if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011658
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011659$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011660
11661fi
11662
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011663ac_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 +000011664#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000011665
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011666"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011667if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011668
11669cat >>confdefs.h <<_ACEOF
11670#define HAVE_STRUCT_TM_TM_ZONE 1
11671_ACEOF
11672
11673
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011674fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011675
Martin v. Löwis11437992002-04-12 09:54:03 +000011676if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
11677
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011678$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011679
11680else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011681 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
11682"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011683if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011684 ac_have_decl=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000011685else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011686 ac_have_decl=0
Martin v. Löwiseba40652007-08-30 20:10:57 +000011687fi
11688
Martin v. Löwiseba40652007-08-30 20:10:57 +000011689cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011690#define HAVE_DECL_TZNAME $ac_have_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +000011691_ACEOF
11692
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011693 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
11694$as_echo_n "checking for tzname... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011695if ${ac_cv_var_tzname+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011696 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000011697else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011698 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011699/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011700#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000011701#if !HAVE_DECL_TZNAME
11702extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000011703#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011704
Martin v. Löwis11437992002-04-12 09:54:03 +000011705int
11706main ()
11707{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011708return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000011709 ;
11710 return 0;
11711}
11712_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011713if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011714 ac_cv_var_tzname=yes
11715else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011716 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011717fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011718rm -f core conftest.err conftest.$ac_objext \
11719 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000011720fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011721{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
11722$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011723 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011724
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011725$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011726
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011727 fi
11728fi
11729
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011730ac_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 +010011731if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011732
11733cat >>confdefs.h <<_ACEOF
11734#define HAVE_STRUCT_STAT_ST_RDEV 1
11735_ACEOF
11736
11737
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011738fi
11739
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011740ac_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 +010011741if test "x$ac_cv_member_struct_stat_st_blksize" = 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_BLKSIZE 1
11745_ACEOF
11746
11747
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011748fi
11749
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011750ac_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 +010011751if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000011752
11753cat >>confdefs.h <<_ACEOF
11754#define HAVE_STRUCT_STAT_ST_FLAGS 1
11755_ACEOF
11756
11757
11758fi
11759
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011760ac_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 +010011761if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011762
11763cat >>confdefs.h <<_ACEOF
11764#define HAVE_STRUCT_STAT_ST_GEN 1
11765_ACEOF
11766
11767
11768fi
11769
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011770ac_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 +010011771if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011772
11773cat >>confdefs.h <<_ACEOF
11774#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
11775_ACEOF
11776
11777
11778fi
11779
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011780ac_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 +010011781if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011782
Martin v. Löwis11437992002-04-12 09:54:03 +000011783cat >>confdefs.h <<_ACEOF
11784#define HAVE_STRUCT_STAT_ST_BLOCKS 1
11785_ACEOF
11786
11787
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011788$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011789
11790else
Martin v. Löwiseba40652007-08-30 20:10:57 +000011791 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000011792 *" fileblocks.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011793 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
11794 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011795esac
11796
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011797fi
11798
Michael W. Hudson54241132001-12-07 15:38:26 +000011799
Martin v. Löwis11437992002-04-12 09:54:03 +000011800
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
11802$as_echo_n "checking for time.h that defines altzone... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011803if ${ac_cv_header_time_altzone+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011804 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011805else
Matthias Klosec511b472010-05-08 11:01:39 +000011806
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011807 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011808/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011809#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011810int
11811main ()
11812{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011813return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000011814 ;
11815 return 0;
11816}
11817_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011818if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011819 ac_cv_header_time_altzone=yes
11820else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011821 ac_cv_header_time_altzone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011822fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011823rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosec511b472010-05-08 11:01:39 +000011824
Martin v. Löwiseba40652007-08-30 20:10:57 +000011825fi
11826
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011827{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
11828$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011829if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011830
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011831$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011832
11833fi
11834
Guido van Rossumda88dad1995-01-26 00:46:29 +000011835was_it_defined=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
11837$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
11838cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011839/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011840
11841#include <sys/types.h>
11842#include <sys/select.h>
11843#include <sys/time.h>
11844
Martin v. Löwis11437992002-04-12 09:54:03 +000011845int
11846main ()
11847{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011848;
Martin v. Löwis11437992002-04-12 09:54:03 +000011849 ;
11850 return 0;
11851}
11852_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011853if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011854
11855
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011856$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011857
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011858 was_it_defined=yes
11859
Martin v. Löwiseba40652007-08-30 20:10:57 +000011860fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011861rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011862{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
11863$as_echo "$was_it_defined" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011864
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
11866$as_echo_n "checking for addrinfo... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011867if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011868 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011869else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011870 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011871/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +000011872#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011873int
11874main ()
11875{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011876struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000011877 ;
11878 return 0;
11879}
11880_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011881if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011882 ac_cv_struct_addrinfo=yes
11883else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011884 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011885fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011886rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11887fi
11888
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011889{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
11890$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011891if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011892
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011893$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011894
11895fi
11896
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
11898$as_echo_n "checking for sockaddr_storage... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011899if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011900 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011901else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011902 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011903/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011904
11905# include <sys/types.h>
11906# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011907int
11908main ()
11909{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011910struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000011911 ;
11912 return 0;
11913}
11914_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011915if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011916 ac_cv_struct_sockaddr_storage=yes
11917else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011918 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011919fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011920rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11921fi
11922
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011923{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
11924$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011925if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011926
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011927$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011928
11929fi
11930
Guido van Rossum627b2d71993-12-24 10:39:16 +000011931# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000011932
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
11934$as_echo_n "checking whether char is unsigned... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011935if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011936 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000011937else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011938 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011939/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011940$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000011941int
11942main ()
11943{
11944static int test_array [1 - 2 * !(((char) -1) < 0)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +010011945test_array [0] = 0;
11946return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000011947
11948 ;
11949 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000011950}
Martin v. Löwis11437992002-04-12 09:54:03 +000011951_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011952if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000011953 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011954else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011955 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011956fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011957rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011958fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011959{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
11960$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011961if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011962 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011963
11964fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000011965
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11967$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011968if ${ac_cv_c_const+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011969 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011970else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011971 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011972/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011973
Martin v. Löwis11437992002-04-12 09:54:03 +000011974int
11975main ()
11976{
Charles-François Natalibe2b9072013-01-08 19:47:00 +010011977
Martin v. Löwis11437992002-04-12 09:54:03 +000011978#ifndef __cplusplus
Charles-François Natalibe2b9072013-01-08 19:47:00 +010011979 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011980 typedef int charset[2];
Charles-François Natalibe2b9072013-01-08 19:47:00 +010011981 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000011982 /* SunOS 4.1.1 cc rejects this. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000011983 char const *const *pcpcc;
11984 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011985 /* NEC SVR4.0.2 mips cc rejects this. */
11986 struct point {int x, y;};
11987 static struct point const zero = {0,0};
11988 /* AIX XL C 1.02.0.0 rejects this.
11989 It does not let you subtract one const X* pointer from another in
11990 an arm of an if-expression whose if-part is not a constant
11991 expression */
11992 const char *g = "string";
Martin v. Löwiseba40652007-08-30 20:10:57 +000011993 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011994 /* HPUX 7.0 cc rejects these. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000011995 ++pcpcc;
11996 ppc = (char**) pcpcc;
11997 pcpcc = (char const *const *) ppc;
Charles-François Natalibe2b9072013-01-08 19:47:00 +010011998 { /* SCO 3.2v4 cc rejects this sort of thing. */
11999 char tx;
12000 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000012001 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012002
Martin v. Löwis11437992002-04-12 09:54:03 +000012003 *t++ = 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012004 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012005 }
12006 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12007 int x[] = {25, 17};
12008 const int *foo = &x[0];
12009 ++foo;
12010 }
12011 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12012 typedef const int *iptr;
12013 iptr p = 0;
12014 ++p;
12015 }
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012016 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000012017 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012018 struct s { int j; const int *ap[3]; } bx;
12019 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000012020 }
12021 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12022 const int foo = 10;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012023 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012024 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012025 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000012026#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000012027
Martin v. Löwis11437992002-04-12 09:54:03 +000012028 ;
12029 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012030}
Martin v. Löwis11437992002-04-12 09:54:03 +000012031_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012032if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012033 ac_cv_c_const=yes
12034else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012035 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012036fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012037rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012038fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012039{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12040$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012041if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012042
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012043$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012044
12045fi
12046
Michael W. Hudson54241132001-12-07 15:38:26 +000012047
Guido van Rossumda88dad1995-01-26 00:46:29 +000012048works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
12050$as_echo_n "checking for working volatile... " >&6; }
12051cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012052/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012053
Martin v. Löwis11437992002-04-12 09:54:03 +000012054int
12055main ()
12056{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012057volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012058 ;
12059 return 0;
12060}
12061_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012062if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012063 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012064else
Skip Montanaro6dead952003-09-25 14:50:04 +000012065
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012066$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012067
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012068
Guido van Rossum627b2d71993-12-24 10:39:16 +000012069fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012070rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012071{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12072$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012073
Guido van Rossumda88dad1995-01-26 00:46:29 +000012074works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
12076$as_echo_n "checking for working signed char... " >&6; }
12077cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012078/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012079
Martin v. Löwis11437992002-04-12 09:54:03 +000012080int
12081main ()
12082{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012083signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000012084 ;
12085 return 0;
12086}
12087_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012088if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012089 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012090else
Skip Montanaro6dead952003-09-25 14:50:04 +000012091
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012092$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000012093
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012094
Guido van Rossum7f43da71994-08-01 12:15:30 +000012095fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012096rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012097{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12098$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012099
Guido van Rossumda88dad1995-01-26 00:46:29 +000012100have_prototypes=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
12102$as_echo_n "checking for prototypes... " >&6; }
12103cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012104/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012105int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012106int
12107main ()
12108{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012109return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000012110 ;
12111 return 0;
12112}
12113_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012114if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012115
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012116$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012117
Matthias Klosec511b472010-05-08 11:01:39 +000012118 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012119fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012120rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012121{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
12122$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012123
Guido van Rossumda88dad1995-01-26 00:46:29 +000012124works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
12126$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
12127cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012128/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012129
12130#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000012131int foo(int x, ...) {
12132 va_list va;
12133 va_start(va, x);
12134 va_arg(va, int);
12135 va_arg(va, char *);
12136 va_arg(va, double);
12137 return 0;
12138}
Guido van Rossum7f43da71994-08-01 12:15:30 +000012139
Martin v. Löwis11437992002-04-12 09:54:03 +000012140int
12141main ()
12142{
Guido van Rossum90eea071996-08-30 20:58:57 +000012143return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000012144 ;
12145 return 0;
12146}
12147_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012148if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012149
12150
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012151$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012152
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012153 works=yes
12154
Guido van Rossum627b2d71993-12-24 10:39:16 +000012155fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012156rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012157{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12158$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012159
Martin v. Löwisd6320502004-08-12 13:45:08 +000012160# check for socketpair
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
12162$as_echo_n "checking for socketpair... " >&6; }
12163cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012164/* end confdefs.h. */
12165
12166#include <sys/types.h>
12167#include <sys/socket.h>
12168
12169int
12170main ()
12171{
12172void *x=socketpair
12173 ;
12174 return 0;
12175}
12176_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012177if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000012178
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012179$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000012180
Matthias Klosec511b472010-05-08 11:01:39 +000012181 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012182$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012183else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012184 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12185$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012186
12187fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012188rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012189
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012190# check if sockaddr has sa_len member
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
12192$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
12193cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012194/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012195#include <sys/types.h>
12196#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012197int
12198main ()
12199{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012200struct sockaddr x;
12201x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012202 ;
12203 return 0;
12204}
12205_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012206if ac_fn_c_try_compile "$LINENO"; then :
12207 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12208$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012209
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012210$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012211
12212else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012213 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12214$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000012215
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012216fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012217rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012218
Guido van Rossumda88dad1995-01-26 00:46:29 +000012219va_list_is_array=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
12221$as_echo_n "checking whether va_list is an array... " >&6; }
12222cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012223/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012224
12225#ifdef HAVE_STDARG_PROTOTYPES
12226#include <stdarg.h>
12227#else
12228#include <varargs.h>
12229#endif
12230
Martin v. Löwis11437992002-04-12 09:54:03 +000012231int
12232main ()
12233{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012234va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000012235 ;
12236 return 0;
12237}
12238_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012239if ac_fn_c_try_compile "$LINENO"; then :
12240
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012241else
Skip Montanaro6dead952003-09-25 14:50:04 +000012242
Martin v. Löwis11437992002-04-12 09:54:03 +000012243
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012244$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012245
Guido van Rossumda88dad1995-01-26 00:46:29 +000012246 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012247
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012248fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012249rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012250{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
12251$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012252
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012253# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000012254
12255
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012256ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012257if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012258
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012259 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000012260
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012261 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
12262$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012263 OLD_CFLAGS=$CFLAGS
12264 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012265 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012266/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012267
12268# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012269
Martin v. Löwis11437992002-04-12 09:54:03 +000012270int
12271main ()
12272{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012273
12274 char *name;
12275 struct hostent *he, *res;
12276 char buffer[2048];
12277 int buflen = 2048;
12278 int h_errnop;
12279
12280 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012281
12282 ;
12283 return 0;
12284}
12285_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012286if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012287
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012288 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012289
Martin v. Löwis11437992002-04-12 09:54:03 +000012290
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012291$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012292
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012293 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12294$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012295
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012296else
Skip Montanaro6dead952003-09-25 14:50:04 +000012297
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12299$as_echo "no" >&6; }
12300 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
12301$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
12302 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012303/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012304
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012305# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012306
Martin v. Löwis11437992002-04-12 09:54:03 +000012307int
12308main ()
12309{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012310
12311 char *name;
12312 struct hostent *he;
Matthias Klosec511b472010-05-08 11:01:39 +000012313 char buffer[2048];
12314 int buflen = 2048;
12315 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012316
Matthias Klosec511b472010-05-08 11:01:39 +000012317 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012318
12319 ;
12320 return 0;
12321}
12322_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012323if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012324
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012325 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012326
Martin v. Löwis11437992002-04-12 09:54:03 +000012327
Matthias Klosec511b472010-05-08 11:01:39 +000012328$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012329
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12331$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012332
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012333else
Skip Montanaro6dead952003-09-25 14:50:04 +000012334
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12336$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000012337 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
12338$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
12339 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12340/* end confdefs.h. */
12341
12342# include <netdb.h>
12343
12344int
12345main ()
12346{
12347
12348 char *name;
12349 struct hostent *he;
12350 struct hostent_data data;
12351
12352 (void) gethostbyname_r(name, he, &data);
12353
12354 ;
12355 return 0;
12356}
12357_ACEOF
12358if ac_fn_c_try_compile "$LINENO"; then :
12359
12360 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
12361
12362
12363$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
12364
12365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12366$as_echo "yes" >&6; }
12367
12368else
12369
12370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12371$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012372
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012373fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012374rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012375
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012376fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012377rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012378
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012379fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012380rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012381 CFLAGS=$OLD_CFLAGS
12382
12383else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012384
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012385 for ac_func in gethostbyname
12386do :
12387 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012388if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012389 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012390#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012391_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012392
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012393fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012394done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012395
Michael W. Hudson54241132001-12-07 15:38:26 +000012396
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012397fi
12398
Michael W. Hudson54241132001-12-07 15:38:26 +000012399
12400
12401
12402
12403
12404
Guido van Rossum627b2d71993-12-24 10:39:16 +000012405# checks for system services
12406# (none yet)
12407
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012408# Linux requires this for correct f.p. operations
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012409ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012410if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012411
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012412else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012413 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
12414$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012415if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012416 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012417else
Martin v. Löwis11437992002-04-12 09:54:03 +000012418 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012419LIBS="-lieee $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012420cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012421/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012422
Martin v. Löwiseba40652007-08-30 20:10:57 +000012423/* Override any GCC internal prototype to avoid an error.
12424 Use char because int might match the return type of a GCC
12425 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012426#ifdef __cplusplus
12427extern "C"
12428#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012429char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012430int
12431main ()
12432{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012433return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012434 ;
12435 return 0;
12436}
12437_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012438if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012439 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012440else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012441 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012442fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012443rm -f core conftest.err conftest.$ac_objext \
12444 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012445LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012446fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012447{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
12448$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012449if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012450 cat >>confdefs.h <<_ACEOF
12451#define HAVE_LIBIEEE 1
12452_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012453
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012454 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012455
Guido van Rossum627b2d71993-12-24 10:39:16 +000012456fi
12457
Michael W. Hudson54241132001-12-07 15:38:26 +000012458
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012459fi
12460
Michael W. Hudson54241132001-12-07 15:38:26 +000012461
Guido van Rossum7f253911997-05-09 02:42:48 +000012462# Check for --with-fpectl
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
12464$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012465
Martin v. Löwiseba40652007-08-30 20:10:57 +000012466# Check whether --with-fpectl was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012467if test "${with_fpectl+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000012468 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000012469if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000012470then
12471
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012472$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012473
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12475$as_echo "yes" >&6; }
12476else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12477$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012478fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000012479else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12481$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012482fi
12483
Guido van Rossum7f253911997-05-09 02:42:48 +000012484
Guido van Rossum7f43da71994-08-01 12:15:30 +000012485# check for --with-libm=...
12486
Guido van Rossum563e7081996-09-10 18:20:48 +000012487case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000012488Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012489BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000012490*) LIBM=-lm
12491esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
12493$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012494
Martin v. Löwiseba40652007-08-30 20:10:57 +000012495# Check whether --with-libm was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012496if test "${with_libm+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000012497 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000012498if test "$withval" = no
12499then LIBM=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012500 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
12501$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012502elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012503then LIBM=$withval
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
12505$as_echo "set LIBM=\"$withval\"" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012506else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012507fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012508else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012509 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
12510$as_echo "default LIBM=\"$LIBM\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012511fi
12512
Guido van Rossum7f43da71994-08-01 12:15:30 +000012513
12514# check for --with-libc=...
12515
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
12517$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012518
Martin v. Löwiseba40652007-08-30 20:10:57 +000012519# Check whether --with-libc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012520if test "${with_libc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000012521 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000012522if test "$withval" = no
12523then LIBC=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
12525$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012526elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012527then LIBC=$withval
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
12529$as_echo "set LIBC=\"$withval\"" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012530else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012531fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012532else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
12534$as_echo "default LIBC=\"$LIBC\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012535fi
12536
Guido van Rossum7f43da71994-08-01 12:15:30 +000012537
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012538# **************************************************
12539# * Check for various properties of floating point *
12540# **************************************************
Mark Dickinson265d7382008-04-21 22:32:24 +000012541
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
12543$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012544if ${ac_cv_little_endian_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012545 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012546else
12547
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012548if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012549 ac_cv_little_endian_double=no
12550else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012551 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012552/* end confdefs.h. */
12553
12554#include <string.h>
12555int main() {
12556 double x = 9006104071832581.0;
12557 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
12558 return 0;
12559 else
12560 return 1;
12561}
12562
12563_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012564if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012565 ac_cv_little_endian_double=yes
12566else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012567 ac_cv_little_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012568fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012569rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12570 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012571fi
12572
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012573fi
12574
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012575{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
12576$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012577if test "$ac_cv_little_endian_double" = yes
12578then
12579
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012580$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012581
12582fi
12583
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
12585$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012586if ${ac_cv_big_endian_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012587 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012588else
12589
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012590if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012591 ac_cv_big_endian_double=no
12592else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012593 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012594/* end confdefs.h. */
12595
12596#include <string.h>
12597int main() {
12598 double x = 9006104071832581.0;
12599 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
12600 return 0;
12601 else
12602 return 1;
12603}
12604
12605_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012606if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012607 ac_cv_big_endian_double=yes
12608else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012609 ac_cv_big_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012610fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012611rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12612 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012613fi
12614
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012615fi
12616
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012617{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
12618$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012619if test "$ac_cv_big_endian_double" = yes
12620then
12621
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012622$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012623
12624fi
12625
12626# Some ARM platforms use a mixed-endian representation for doubles.
12627# While Python doesn't currently have full support for these platforms
12628# (see e.g., issue 1762561), we can at least make sure that float <-> string
12629# conversions work.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
12631$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012632if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012633 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012634else
12635
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012636if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012637 ac_cv_mixed_endian_double=no
12638else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012639 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012640/* end confdefs.h. */
12641
12642#include <string.h>
12643int main() {
12644 double x = 9006104071832581.0;
12645 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
12646 return 0;
12647 else
12648 return 1;
12649}
12650
12651_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012652if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012653 ac_cv_mixed_endian_double=yes
12654else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012655 ac_cv_mixed_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012656fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012657rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12658 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012659fi
12660
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012661fi
12662
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012663{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
12664$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012665if test "$ac_cv_mixed_endian_double" = yes
12666then
12667
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012668$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012669
12670fi
12671
12672# The short float repr introduced in Python 3.1 requires the
12673# correctly-rounded string <-> double conversion functions from
12674# Python/dtoa.c, which in turn require that the FPU uses 53-bit
12675# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsona548dee2009-11-15 13:12:43 +000012676# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012677# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsona548dee2009-11-15 13:12:43 +000012678
12679# This inline assembler syntax may also work for suncc and icc,
12680# so we try it on all platforms.
12681
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
12683$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
12684cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012685/* end confdefs.h. */
12686
12687int
12688main ()
12689{
12690
Mark Dickinsona548dee2009-11-15 13:12:43 +000012691 unsigned short cw;
12692 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
12693 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012694
12695 ;
12696 return 0;
12697}
12698_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012699if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012700 have_gcc_asm_for_x87=yes
12701else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012702 have_gcc_asm_for_x87=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012703fi
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012704rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012705{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
12706$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsona548dee2009-11-15 13:12:43 +000012707if test "$have_gcc_asm_for_x87" = yes
12708then
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012709
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012710$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012711
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012712fi
Mark Dickinson7a3d8642008-04-22 00:54:27 +000012713
Mark Dickinson04b27232009-01-04 12:29:36 +000012714# Detect whether system arithmetic is subject to x87-style double
12715# rounding issues. The result of this test has little meaning on non
12716# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
12717# mode is round-to-nearest and double rounding issues are present, and
12718# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
12720$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinson99abd142009-10-24 13:44:16 +000012721# $BASECFLAGS may affect the result
12722ac_save_cc="$CC"
12723CC="$CC $BASECFLAGS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012724if test "$cross_compiling" = yes; then :
Mark Dickinson04b27232009-01-04 12:29:36 +000012725 ac_cv_x87_double_rounding=no
12726else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012727 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson04b27232009-01-04 12:29:36 +000012728/* end confdefs.h. */
12729
12730#include <stdlib.h>
12731#include <math.h>
12732int main() {
12733 volatile double x, y, z;
12734 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
12735 x = 0.99999999999999989; /* 1-2**-53 */
12736 y = 1./x;
12737 if (y != 1.)
12738 exit(0);
12739 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
12740 x = 1e16;
12741 y = 2.99999;
12742 z = x + y;
12743 if (z != 1e16+4.)
12744 exit(0);
12745 /* both tests show evidence of double rounding */
12746 exit(1);
12747}
12748
12749_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012750if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson04b27232009-01-04 12:29:36 +000012751 ac_cv_x87_double_rounding=no
12752else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012753 ac_cv_x87_double_rounding=yes
Mark Dickinson04b27232009-01-04 12:29:36 +000012754fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012755rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12756 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson04b27232009-01-04 12:29:36 +000012757fi
12758
Mark Dickinson99abd142009-10-24 13:44:16 +000012759CC="$ac_save_cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012760{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
12761$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson04b27232009-01-04 12:29:36 +000012762if test "$ac_cv_x87_double_rounding" = yes
12763then
12764
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012765$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson04b27232009-01-04 12:29:36 +000012766
12767fi
12768
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012769# ************************************
12770# * Check for mathematical functions *
12771# ************************************
12772
12773LIBS_SAVE=$LIBS
12774LIBS="$LIBS $LIBM"
12775
Mark Dickinson265d7382008-04-21 22:32:24 +000012776# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
12777# -0. on some architectures.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
12779$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012780if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012781 $as_echo_n "(cached) " >&6
Mark Dickinson265d7382008-04-21 22:32:24 +000012782else
12783
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012784if test "$cross_compiling" = yes; then :
Mark Dickinson265d7382008-04-21 22:32:24 +000012785 ac_cv_tanh_preserves_zero_sign=no
12786else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012787 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson265d7382008-04-21 22:32:24 +000012788/* end confdefs.h. */
12789
12790#include <math.h>
Mark Dickinson7a3d8642008-04-22 00:54:27 +000012791#include <stdlib.h>
Mark Dickinson265d7382008-04-21 22:32:24 +000012792int main() {
12793 /* return 0 if either negative zeros don't exist
12794 on this platform or if negative zeros exist
12795 and tanh(-0.) == -0. */
12796 if (atan2(0., -1.) == atan2(-0., -1.) ||
12797 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
12798 else exit(1);
12799}
12800
12801_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012802if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson265d7382008-04-21 22:32:24 +000012803 ac_cv_tanh_preserves_zero_sign=yes
12804else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012805 ac_cv_tanh_preserves_zero_sign=no
Mark Dickinson265d7382008-04-21 22:32:24 +000012806fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012807rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12808 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson265d7382008-04-21 22:32:24 +000012809fi
12810
Mark Dickinson265d7382008-04-21 22:32:24 +000012811fi
12812
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012813{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
12814$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Mark Dickinson265d7382008-04-21 22:32:24 +000012815if test "$ac_cv_tanh_preserves_zero_sign" = yes
12816then
12817
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012818$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Mark Dickinson265d7382008-04-21 22:32:24 +000012819
12820fi
12821
Mark Dickinson65898e02009-09-05 10:27:00 +000012822for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012823do :
12824 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12825ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012826if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinson65898e02009-09-05 10:27:00 +000012827 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012828#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Mark Dickinson65898e02009-09-05 10:27:00 +000012829_ACEOF
12830
12831fi
12832done
12833
Mark Dickinson65898e02009-09-05 10:27:00 +000012834for ac_func in hypot lgamma log1p round tgamma
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012835do :
12836 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12837ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012838if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Christian Heimes0a8143f2007-12-18 23:22:54 +000012839 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012840#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes0a8143f2007-12-18 23:22:54 +000012841_ACEOF
12842
12843fi
12844done
12845
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012846ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
12847"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012848if test "x$ac_cv_have_decl_isinf" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012849 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012850else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012851 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012852fi
12853
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012854cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012855#define HAVE_DECL_ISINF $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012856_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012857ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
12858"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012859if test "x$ac_cv_have_decl_isnan" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012860 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012861else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012862 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012863fi
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012864
12865cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012866#define HAVE_DECL_ISNAN $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012867_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012868ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
12869"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012870if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012871 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012872else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012873 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012874fi
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012875
12876cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012877#define HAVE_DECL_ISFINITE $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012878_ACEOF
12879
12880
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000012881LIBS=$LIBS_SAVE
12882
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012883# For multiprocessing module, check that sem_open
12884# actually works. For FreeBSD versions <= 7.2,
12885# the kernel module that provides POSIX semaphores
12886# isn't loaded by default, so an attempt to call
12887# sem_open results in a 'Signal 12' error.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
12889$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012890if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012891 $as_echo_n "(cached) " >&6
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012892else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012893 if test "$cross_compiling" = yes; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012894 ac_cv_posix_semaphores_enabled=yes
12895else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012896 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012897/* end confdefs.h. */
12898
12899#include <unistd.h>
12900#include <fcntl.h>
12901#include <stdio.h>
12902#include <semaphore.h>
12903#include <sys/stat.h>
12904
12905int main(void) {
12906 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
12907 if (a == SEM_FAILED) {
12908 perror("sem_open");
12909 return 1;
12910 }
12911 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000012912 sem_unlink("/autoconf");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012913 return 0;
12914}
12915
12916_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012917if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012918 ac_cv_posix_semaphores_enabled=yes
12919else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012920 ac_cv_posix_semaphores_enabled=no
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012921fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012922rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12923 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012924fi
12925
12926
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012927fi
12928
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012929{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
12930$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012931if test $ac_cv_posix_semaphores_enabled = no
12932then
12933
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012934$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012935
12936fi
12937
12938# Multiprocessing check for broken sem_getvalue
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
12940$as_echo_n "checking for broken sem_getvalue... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012941if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012942 $as_echo_n "(cached) " >&6
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012943else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012944 if test "$cross_compiling" = yes; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012945 ac_cv_broken_sem_getvalue=yes
12946else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012947 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012948/* end confdefs.h. */
12949
12950#include <unistd.h>
12951#include <fcntl.h>
12952#include <stdio.h>
12953#include <semaphore.h>
12954#include <sys/stat.h>
12955
12956int main(void){
Mark Dickinson59dc89e2009-12-13 21:06:06 +000012957 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012958 int count;
12959 int res;
12960 if(a==SEM_FAILED){
12961 perror("sem_open");
12962 return 1;
12963
12964 }
12965 res = sem_getvalue(a, &count);
12966 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000012967 sem_unlink("/autocftw");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012968 return res==-1 ? 1 : 0;
12969}
12970
12971_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012972if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012973 ac_cv_broken_sem_getvalue=no
12974else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012975 ac_cv_broken_sem_getvalue=yes
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012976fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012977rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12978 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012979fi
12980
12981
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012982fi
12983
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012984{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
12985$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012986if test $ac_cv_broken_sem_getvalue = yes
12987then
12988
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012989$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012990
12991fi
12992
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012993# determine what size digit to use for Python's longs
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
12995$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012996# Check whether --enable-big-digits was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012997if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012998 enableval=$enable_big_digits; case $enable_big_digits in
12999yes)
13000 enable_big_digits=30 ;;
13001no)
13002 enable_big_digits=15 ;;
1300315|30)
13004 ;;
13005*)
Matthias Klose3cef2a92012-03-14 23:39:33 +010013006 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 +000013007esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013008{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
13009$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000013010
13011cat >>confdefs.h <<_ACEOF
13012#define PYLONG_BITS_IN_DIGIT $enable_big_digits
13013_ACEOF
13014
13015
13016else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13018$as_echo "no value specified" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000013019fi
13020
13021
Guido van Rossumef2255b2000-03-10 22:30:29 +000013022# check for wchar.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013023ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +010013024if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013025
13026
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013027$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013028
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013029 wchar_h="yes"
13030
Guido van Rossumef2255b2000-03-10 22:30:29 +000013031else
Martin v. Löwis11437992002-04-12 09:54:03 +000013032 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000013033
13034fi
13035
Michael W. Hudson54241132001-12-07 15:38:26 +000013036
Martin v. Löwis11437992002-04-12 09:54:03 +000013037
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013038# determine wchar_t size
13039if test "$wchar_h" = yes
13040then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013041 # The cast to long int works around a bug in the HP C Compiler
Martin v. Löwiseba40652007-08-30 20:10:57 +000013042# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13043# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13044# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
13046$as_echo_n "checking size of wchar_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013047if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013048 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013049else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013050 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
13051"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013052
Martin v. Löwis11437992002-04-12 09:54:03 +000013053else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013054 if test "$ac_cv_type_wchar_t" = yes; then
13055 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13056$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013057as_fn_error 77 "cannot compute sizeof (wchar_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +010013058See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013059 else
13060 ac_cv_sizeof_wchar_t=0
13061 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013062fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013063
Martin v. Löwis11437992002-04-12 09:54:03 +000013064fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013065{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
13066$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013067
13068
13069
Martin v. Löwis11437992002-04-12 09:54:03 +000013070cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013071#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013072_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013073
Michael W. Hudson54241132001-12-07 15:38:26 +000013074
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013075fi
13076
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
13078$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013079have_ucs4_tcl=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013080cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013081/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013082
13083#include <tcl.h>
13084#if TCL_UTF_MAX != 6
13085# error "NOT UCS4_TCL"
13086#endif
13087int
13088main ()
13089{
13090
13091 ;
13092 return 0;
13093}
13094_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013095if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013096
13097
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013098$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013099
13100 have_ucs4_tcl=yes
13101
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013102fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013103rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013104{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
13105$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013106
Skip Montanaro6dead952003-09-25 14:50:04 +000013107# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013108if test "$wchar_h" = yes
13109then
13110 # check whether wchar_t is signed or not
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013111 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
13112$as_echo_n "checking whether wchar_t is signed... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013113 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013114 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013115else
13116
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013117 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013118 ac_cv_wchar_t_signed=yes
13119else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013120 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013121/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013122
13123 #include <wchar.h>
13124 int main()
13125 {
Martin v. Löwis44fe0e42006-04-11 07:15:30 +000013126 /* Success: exit code 0 */
13127 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013128 }
13129
13130_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013131if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013132 ac_cv_wchar_t_signed=yes
13133else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013134 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013135fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013136rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13137 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013138fi
13139
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013140fi
13141
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
13143$as_echo "$ac_cv_wchar_t_signed" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013144fi
13145
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what type to use for unicode" >&5
13147$as_echo_n "checking what type to use for unicode... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013148# Check whether --enable-unicode was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013149if test "${enable_unicode+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000013150 enableval=$enable_unicode;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013151else
13152 enable_unicode=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +000013153fi
13154
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013155
13156if test $enable_unicode = yes
13157then
Martin v. Löwisfd917792001-06-27 20:22:04 +000013158 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013159 case "$have_ucs4_tcl" in
13160 yes) enable_unicode="ucs4"
13161 ;;
13162 *) enable_unicode="ucs2"
13163 ;;
13164 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013165fi
13166
Martin v. Löwis0036cba2002-04-12 09:58:45 +000013167
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013168case "$enable_unicode" in
13169ucs2) unicode_size="2"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013170 $as_echo "#define Py_UNICODE_SIZE 2" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013171
13172 ;;
13173ucs4) unicode_size="4"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013174 $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013175
13176 ;;
Martin v. Löwised11a5d2012-05-20 10:42:17 +020013177no) ;; # To allow --disable-unicode
Matthias Klose3cef2a92012-03-14 23:39:33 +010013178*) 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 +000013179esac
13180
Michael W. Hudson54241132001-12-07 15:38:26 +000013181
Martin v. Löwis11437992002-04-12 09:54:03 +000013182
13183
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013184if test "$enable_unicode" = "no"
13185then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000013186 UNICODE_OBJS=""
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not used" >&5
13188$as_echo "not used" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013189else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000013190 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000013191
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013192$as_echo "#define Py_USING_UNICODE 1" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013193
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013194
13195 # wchar_t is only usable if it maps to an unsigned type
13196 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000013197 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013198 then
13199 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013200
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013201$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013202
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013203 $as_echo "#define PY_UNICODE_TYPE wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013204
13205 elif test "$ac_cv_sizeof_short" = "$unicode_size"
13206 then
13207 PY_UNICODE_TYPE="unsigned short"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013208 $as_echo "#define PY_UNICODE_TYPE unsigned short" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013209
13210 elif test "$ac_cv_sizeof_long" = "$unicode_size"
13211 then
13212 PY_UNICODE_TYPE="unsigned long"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013213 $as_echo "#define PY_UNICODE_TYPE unsigned long" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013214
13215 else
13216 PY_UNICODE_TYPE="no type found"
13217 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013218 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PY_UNICODE_TYPE" >&5
13219$as_echo "$PY_UNICODE_TYPE" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013220fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000013221
13222# check for endianness
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013223 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13224$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013225if ${ac_cv_c_bigendian+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013226 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000013227else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013228 ac_cv_c_bigendian=unknown
13229 # See if we're dealing with a universal compiler.
13230 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13231/* end confdefs.h. */
13232#ifndef __APPLE_CC__
13233 not a universal capable compiler
13234 #endif
13235 typedef int dummy;
13236
Skip Montanaro6dead952003-09-25 14:50:04 +000013237_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013238if ac_fn_c_try_compile "$LINENO"; then :
13239
13240 # Check for potential -arch flags. It is not universal unless
13241 # there are at least two -arch flags with different values.
13242 ac_arch=
13243 ac_prev=
13244 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13245 if test -n "$ac_prev"; then
13246 case $ac_word in
13247 i?86 | x86_64 | ppc | ppc64)
13248 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13249 ac_arch=$ac_word
13250 else
13251 ac_cv_c_bigendian=universal
13252 break
13253 fi
13254 ;;
13255 esac
13256 ac_prev=
13257 elif test "x$ac_word" = "x-arch"; then
13258 ac_prev=arch
13259 fi
13260 done
13261fi
13262rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13263 if test $ac_cv_c_bigendian = unknown; then
13264 # See if sys/param.h defines the BYTE_ORDER macro.
13265 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013266/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013267#include <sys/types.h>
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013268 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013269
Martin v. Löwis11437992002-04-12 09:54:03 +000013270int
13271main ()
13272{
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013273#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13274 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13275 && LITTLE_ENDIAN)
13276 bogus endian macros
13277 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013278
13279 ;
13280 return 0;
13281}
13282_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013283if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013284 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013285 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013286/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013287#include <sys/types.h>
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013288 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013289
Martin v. Löwis11437992002-04-12 09:54:03 +000013290int
13291main ()
13292{
Guido van Rossumef2255b2000-03-10 22:30:29 +000013293#if BYTE_ORDER != BIG_ENDIAN
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013294 not big endian
13295 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013296
13297 ;
13298 return 0;
13299}
13300_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013301if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013302 ac_cv_c_bigendian=yes
13303else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013304 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000013305fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013306rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013307fi
13308rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13309 fi
13310 if test $ac_cv_c_bigendian = unknown; then
13311 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13312 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013313/* end confdefs.h. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013314#include <limits.h>
13315
Martin v. Löwis11437992002-04-12 09:54:03 +000013316int
13317main ()
13318{
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013319#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13320 bogus endian macros
13321 #endif
13322
Martin v. Löwis11437992002-04-12 09:54:03 +000013323 ;
13324 return 0;
13325}
13326_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013327if ac_fn_c_try_compile "$LINENO"; then :
13328 # It does; now see whether it defined to _BIG_ENDIAN or not.
13329 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13330/* end confdefs.h. */
13331#include <limits.h>
13332
13333int
13334main ()
13335{
13336#ifndef _BIG_ENDIAN
13337 not big endian
13338 #endif
13339
13340 ;
13341 return 0;
13342}
13343_ACEOF
13344if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013345 ac_cv_c_bigendian=yes
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000013346else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013347 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013348fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013349rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13350fi
13351rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13352 fi
13353 if test $ac_cv_c_bigendian = unknown; then
13354 # Compile a test program.
13355 if test "$cross_compiling" = yes; then :
13356 # Try to guess by grepping values from an object file.
13357 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13358/* end confdefs.h. */
13359short int ascii_mm[] =
13360 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13361 short int ascii_ii[] =
13362 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13363 int use_ascii (int i) {
13364 return ascii_mm[i] + ascii_ii[i];
13365 }
13366 short int ebcdic_ii[] =
13367 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13368 short int ebcdic_mm[] =
13369 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13370 int use_ebcdic (int i) {
13371 return ebcdic_mm[i] + ebcdic_ii[i];
13372 }
13373 extern int foo;
Martin v. Löwiseba40652007-08-30 20:10:57 +000013374
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013375int
13376main ()
13377{
13378return use_ascii (foo) == use_ebcdic (foo);
13379 ;
13380 return 0;
13381}
13382_ACEOF
13383if ac_fn_c_try_compile "$LINENO"; then :
13384 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
13385 ac_cv_c_bigendian=yes
13386 fi
13387 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
13388 if test "$ac_cv_c_bigendian" = unknown; then
13389 ac_cv_c_bigendian=no
13390 else
13391 # finding both strings is unlikely to happen, but who knows?
13392 ac_cv_c_bigendian=unknown
13393 fi
13394 fi
13395fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013396rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013397else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013398 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013399/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000013400$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013401int
13402main ()
13403{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013404
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013405 /* Are we little or big endian? From Harbison&Steele. */
13406 union
13407 {
13408 long int l;
13409 char c[sizeof (long int)];
13410 } u;
13411 u.l = 1;
13412 return u.c[sizeof (long int) - 1] == 1;
Martin v. Löwiseba40652007-08-30 20:10:57 +000013413
13414 ;
13415 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000013416}
Martin v. Löwis11437992002-04-12 09:54:03 +000013417_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013418if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013419 ac_cv_c_bigendian=no
13420else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013421 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000013422fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013423rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13424 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000013425fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013426
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013427 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013428fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013429{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
13430$as_echo "$ac_cv_c_bigendian" >&6; }
13431 case $ac_cv_c_bigendian in #(
13432 yes)
13433 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
13434;; #(
13435 no)
13436 ;; #(
13437 universal)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013438
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013439$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000013440
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013441 ;; #(
13442 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013443 as_fn_error $? "unknown endianness
Matthias Klose3cef2a92012-03-14 23:39:33 +010013444 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013445 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000013446
Michael W. Hudson54241132001-12-07 15:38:26 +000013447
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013448# Check whether right shifting a negative integer extends the sign bit
13449# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
13451$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013452if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013453 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000013454else
Martin v. Löwis11437992002-04-12 09:54:03 +000013455
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013456if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013457 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013458else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013459 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013460/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013461
13462int main()
13463{
Vladimir Marangozova6180282000-07-12 05:05:06 +000013464 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013465}
13466
Martin v. Löwis11437992002-04-12 09:54:03 +000013467_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013468if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000013469 ac_cv_rshift_extends_sign=yes
13470else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013471 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000013472fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013473rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13474 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000013475fi
13476
Martin v. Löwiseba40652007-08-30 20:10:57 +000013477fi
13478
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013479{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
13480$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000013481if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013482then
Martin v. Löwis11437992002-04-12 09:54:03 +000013483
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013484$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013485
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013486fi
13487
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013488# check for getc_unlocked and related locking functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
13490$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013491if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013492 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013493else
Martin v. Löwis11437992002-04-12 09:54:03 +000013494
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013495cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013496/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013497#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013498int
13499main ()
13500{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013501
13502 FILE *f = fopen("/dev/null", "r");
13503 flockfile(f);
13504 getc_unlocked(f);
13505 funlockfile(f);
13506
Martin v. Löwis11437992002-04-12 09:54:03 +000013507 ;
13508 return 0;
13509}
13510_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013511if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013512 ac_cv_have_getc_unlocked=yes
13513else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013514 ac_cv_have_getc_unlocked=no
13515fi
13516rm -f core conftest.err conftest.$ac_objext \
13517 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013518fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013519
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013520{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
13521$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013522if test "$ac_cv_have_getc_unlocked" = yes
13523then
Martin v. Löwis11437992002-04-12 09:54:03 +000013524
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013525$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013526
13527fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013528
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013529# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000013530# save the value of LIBS so we don't actually link Python with readline
13531LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013532
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013533# On some systems we need to link readline to a termcap compatible
13534# library. NOTE: Keep the precedence of listed libraries synchronised
13535# with setup.py.
13536py_cv_lib_readline=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
13538$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013539for py_libtermcap in "" ncursesw ncurses curses termcap; do
13540 if test -z "$py_libtermcap"; then
13541 READLINE_LIBS="-lreadline"
13542 else
13543 READLINE_LIBS="-lreadline -l$py_libtermcap"
13544 fi
13545 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013546 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013547/* end confdefs.h. */
13548
Martin v. Löwiseba40652007-08-30 20:10:57 +000013549/* Override any GCC internal prototype to avoid an error.
13550 Use char because int might match the return type of a GCC
13551 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013552#ifdef __cplusplus
13553extern "C"
13554#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013555char readline ();
13556int
13557main ()
13558{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013559return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013560 ;
13561 return 0;
13562}
13563_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013564if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013565 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013566fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013567rm -f core conftest.err conftest.$ac_objext \
13568 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013569 if test $py_cv_lib_readline = yes; then
13570 break
13571 fi
13572done
13573# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
13574#AC_SUBST([READLINE_LIBS])
Gregory P. Smithe080cdf2008-09-07 19:19:04 +000013575if test $py_cv_lib_readline = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
13577$as_echo "none" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013578else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013579 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
13580$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013581
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013582$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013583
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013584fi
13585
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013586# check for readline 2.1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
13588$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013589if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013590 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013591else
13592 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013593LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013594cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013595/* end confdefs.h. */
13596
Martin v. Löwiseba40652007-08-30 20:10:57 +000013597/* Override any GCC internal prototype to avoid an error.
13598 Use char because int might match the return type of a GCC
13599 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013600#ifdef __cplusplus
13601extern "C"
13602#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013603char rl_callback_handler_install ();
13604int
13605main ()
13606{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013607return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013608 ;
13609 return 0;
13610}
13611_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013612if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013613 ac_cv_lib_readline_rl_callback_handler_install=yes
13614else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013615 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013616fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013617rm -f core conftest.err conftest.$ac_objext \
13618 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013619LIBS=$ac_check_lib_save_LIBS
13620fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013621{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
13622$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013623if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013624
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013625$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013626
13627fi
13628
13629
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013630# check for readline 2.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013631cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013632/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013633#include <readline/readline.h>
13634_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013635if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013636 have_readline=yes
13637else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013638 have_readline=no
Matthias Klosec511b472010-05-08 11:01:39 +000013639
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013640fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013641rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013642if test $have_readline = yes
13643then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013644 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013645/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013646#include <readline/readline.h>
13647
13648_ACEOF
13649if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013650 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013651
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013652$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013653
13654fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000013655rm -f conftest*
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000013656
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013657 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000013658/* end confdefs.h. */
13659#include <readline/readline.h>
13660
13661_ACEOF
13662if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013663 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000013664
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013665$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000013666
13667fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000013668rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013669
13670fi
13671
Martin v. Löwis0daad592001-09-30 21:09:59 +000013672# check for readline 4.0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
13674$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013675if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013676 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000013677else
Martin v. Löwis11437992002-04-12 09:54:03 +000013678 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013679LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013680cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013681/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013682
Martin v. Löwiseba40652007-08-30 20:10:57 +000013683/* Override any GCC internal prototype to avoid an error.
13684 Use char because int might match the return type of a GCC
13685 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013686#ifdef __cplusplus
13687extern "C"
13688#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013689char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013690int
13691main ()
13692{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013693return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013694 ;
13695 return 0;
13696}
13697_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013698if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013699 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000013700else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013701 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000013702fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013703rm -f core conftest.err conftest.$ac_objext \
13704 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013705LIBS=$ac_check_lib_save_LIBS
13706fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013707{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
13708$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013709if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013710
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013711$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000013712
Martin v. Löwis0daad592001-09-30 21:09:59 +000013713fi
13714
Michael W. Hudson54241132001-12-07 15:38:26 +000013715
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013716# also in 4.0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
13718$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013719if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013720 $as_echo_n "(cached) " >&6
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013721else
13722 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013723LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013724cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013725/* end confdefs.h. */
13726
13727/* Override any GCC internal prototype to avoid an error.
13728 Use char because int might match the return type of a GCC
13729 builtin and then its argument prototype would still apply. */
13730#ifdef __cplusplus
13731extern "C"
13732#endif
13733char rl_completion_display_matches_hook ();
13734int
13735main ()
13736{
13737return rl_completion_display_matches_hook ();
13738 ;
13739 return 0;
13740}
13741_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013742if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013743 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
13744else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013745 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013746fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013747rm -f core conftest.err conftest.$ac_objext \
13748 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013749LIBS=$ac_check_lib_save_LIBS
13750fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013751{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
13752$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013753if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013754
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013755$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013756
13757fi
13758
13759
Martin v. Löwis0daad592001-09-30 21:09:59 +000013760# check for readline 4.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
13762$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013763if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013764 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000013765else
Martin v. Löwis11437992002-04-12 09:54:03 +000013766 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013767LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013768cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013769/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013770
Martin v. Löwiseba40652007-08-30 20:10:57 +000013771/* Override any GCC internal prototype to avoid an error.
13772 Use char because int might match the return type of a GCC
13773 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013774#ifdef __cplusplus
13775extern "C"
13776#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013777char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013778int
13779main ()
13780{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013781return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013782 ;
13783 return 0;
13784}
13785_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013786if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013787 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000013788else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013789 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000013790fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013791rm -f core conftest.err conftest.$ac_objext \
13792 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013793LIBS=$ac_check_lib_save_LIBS
13794fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013795{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
13796$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013797if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013798
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013799$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000013800
Guido van Rossum353ae582001-07-10 16:45:32 +000013801fi
13802
Jack Jansendd19cf82001-12-06 22:36:17 +000013803
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013804# also in readline 4.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013805cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013806/* end confdefs.h. */
13807#include <readline/readline.h>
13808_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013809if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013810 have_readline=yes
13811else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013812 have_readline=no
Matthias Klosec511b472010-05-08 11:01:39 +000013813
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013814fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013815rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013816if test $have_readline = yes
13817then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013818 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013819/* end confdefs.h. */
13820#include <readline/readline.h>
13821
13822_ACEOF
13823if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013824 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013825
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013826$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013827
13828fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000013829rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013830
13831fi
13832
Martin v. Löwis82bca632006-02-10 20:49:30 +000013833# End of readline checks: restore LIBS
13834LIBS=$LIBS_no_readline
13835
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
13837$as_echo_n "checking for broken nice()... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013838if ${ac_cv_broken_nice+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013839 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013840else
Martin v. Löwis11437992002-04-12 09:54:03 +000013841
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013842if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013843 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013844else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013845 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013846/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013847
13848int main()
13849{
13850 int val1 = nice(1);
13851 if (val1 != -1 && val1 == nice(2))
13852 exit(0);
13853 exit(1);
13854}
13855
Martin v. Löwis11437992002-04-12 09:54:03 +000013856_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013857if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013858 ac_cv_broken_nice=yes
13859else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013860 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013861fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013862rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13863 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013864fi
13865
Martin v. Löwiseba40652007-08-30 20:10:57 +000013866fi
13867
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013868{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
13869$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013870if test "$ac_cv_broken_nice" = yes
13871then
Martin v. Löwis11437992002-04-12 09:54:03 +000013872
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013873$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013874
13875fi
13876
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
13878$as_echo_n "checking for broken poll()... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013879if ${ac_cv_broken_poll+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013880 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013881else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013882 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013883 ac_cv_broken_poll=no
13884else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013885 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013886/* end confdefs.h. */
13887
13888#include <poll.h>
13889
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013890int main()
13891{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013892 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013893 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013894
13895 close (42);
13896
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013897 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013898 if (poll_test < 0)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013899 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013900 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013901 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013902 else
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013903 return 1;
13904}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013905
13906_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013907if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013908 ac_cv_broken_poll=yes
13909else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013910 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013911fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013912rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13913 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013914fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013915
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013916fi
13917
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013918{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
13919$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013920if test "$ac_cv_broken_poll" = yes
13921then
13922
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013923$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013924
13925fi
13926
Brett Cannon43802422005-02-10 20:48:03 +000013927# 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 +000013928# (which is not required by ISO C or UNIX spec) and/or if we support
13929# tzname[]
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013930ac_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 +000013931#include <$ac_cv_struct_tm>
13932
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013933"
Matthias Klose3cef2a92012-03-14 23:39:33 +010013934if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000013935
13936cat >>confdefs.h <<_ACEOF
13937#define HAVE_STRUCT_TM_TM_ZONE 1
13938_ACEOF
13939
13940
13941fi
13942
13943if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13944
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013945$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013946
13947else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013948 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13949"
Matthias Klose3cef2a92012-03-14 23:39:33 +010013950if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013951 ac_have_decl=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000013952else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013953 ac_have_decl=0
Martin v. Löwiseba40652007-08-30 20:10:57 +000013954fi
13955
Martin v. Löwiseba40652007-08-30 20:10:57 +000013956cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013957#define HAVE_DECL_TZNAME $ac_have_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +000013958_ACEOF
13959
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013960 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13961$as_echo_n "checking for tzname... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013962if ${ac_cv_var_tzname+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013963 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000013964else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013965 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013966/* end confdefs.h. */
13967#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000013968#if !HAVE_DECL_TZNAME
13969extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000013970#endif
13971
13972int
13973main ()
13974{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013975return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000013976 ;
13977 return 0;
13978}
13979_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013980if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000013981 ac_cv_var_tzname=yes
13982else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013983 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000013984fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013985rm -f core conftest.err conftest.$ac_objext \
13986 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013987fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013988{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13989$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000013990 if test $ac_cv_var_tzname = yes; then
13991
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013992$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013993
13994 fi
13995fi
13996
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013997
Martin v. Löwis1d459062005-03-14 21:23:33 +000013998# check tzset(3) exists and works like we expect it to
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
14000$as_echo_n "checking for working tzset()... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014001if ${ac_cv_working_tzset+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014002 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014003else
14004
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014005if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014006 ac_cv_working_tzset=no
14007else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014008 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014009/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014010
14011#include <stdlib.h>
14012#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000014013#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000014014
14015#if HAVE_TZNAME
14016extern char *tzname[];
14017#endif
14018
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014019int main()
14020{
Brett Cannon18367812003-09-19 00:59:16 +000014021 /* Note that we need to ensure that not only does tzset(3)
14022 do 'something' with localtime, but it works as documented
14023 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000014024 This includes making sure that tzname is set properly if
14025 tm->tm_zone does not exist since it is the alternative way
14026 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000014027
14028 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000014029 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000014030 */
14031
Martin v. Löwis1d459062005-03-14 21:23:33 +000014032 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000014033 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
14034
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014035 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014036 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014037 if (localtime(&groundhogday)->tm_hour != 0)
14038 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014039#if HAVE_TZNAME
14040 /* For UTC, tzname[1] is sometimes "", sometimes " " */
14041 if (strcmp(tzname[0], "UTC") ||
14042 (tzname[1][0] != 0 && tzname[1][0] != ' '))
14043 exit(1);
14044#endif
Brett Cannon18367812003-09-19 00:59:16 +000014045
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014046 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014047 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014048 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014049 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014050#if HAVE_TZNAME
14051 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
14052 exit(1);
14053#endif
Brett Cannon18367812003-09-19 00:59:16 +000014054
14055 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
14056 tzset();
14057 if (localtime(&groundhogday)->tm_hour != 11)
14058 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014059#if HAVE_TZNAME
14060 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
14061 exit(1);
14062#endif
14063
14064#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000014065 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
14066 exit(1);
14067 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
14068 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014069#endif
Brett Cannon18367812003-09-19 00:59:16 +000014070
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014071 exit(0);
14072}
14073
14074_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014075if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014076 ac_cv_working_tzset=yes
14077else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014078 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014079fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014080rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14081 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014082fi
14083
Martin v. Löwiseba40652007-08-30 20:10:57 +000014084fi
14085
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014086{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
14087$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014088if test "$ac_cv_working_tzset" = yes
14089then
14090
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014091$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014092
14093fi
14094
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014095# Look for subsecond timestamps in struct stat
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
14097$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014098if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014099 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014100else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014101 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014102/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014103#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014104int
14105main ()
14106{
14107
14108struct stat st;
14109st.st_mtim.tv_nsec = 1;
14110
14111 ;
14112 return 0;
14113}
14114_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014115if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000014116 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014117else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014118 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014119fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014120rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14121fi
14122
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014123{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
14124$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014125if test "$ac_cv_stat_tv_nsec" = yes
14126then
14127
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014128$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014129
14130fi
14131
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014132# Look for BSD style subsecond timestamps in struct stat
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
14134$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014135if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014136 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014137else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014138 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014139/* end confdefs.h. */
14140#include <sys/stat.h>
14141int
14142main ()
14143{
14144
14145struct stat st;
14146st.st_mtimespec.tv_nsec = 1;
14147
14148 ;
14149 return 0;
14150}
14151_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014152if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014153 ac_cv_stat_tv_nsec2=yes
14154else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014155 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014156fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014157rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14158fi
14159
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014160{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
14161$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014162if test "$ac_cv_stat_tv_nsec2" = yes
14163then
14164
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014165$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014166
14167fi
14168
doko@ubuntu.comf27ec3e2014-04-17 20:11:19 +020014169# first curses configure check
14170ac_save_cppflags="$CPPFLAGS"
14171CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
14172
14173for ac_header in curses.h ncurses.h
14174do :
14175 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14176ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
14177if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
14178 cat >>confdefs.h <<_ACEOF
14179#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14180_ACEOF
14181
14182fi
14183
14184done
14185
14186
14187# On Solaris, term.h requires curses.h
14188for ac_header in term.h
14189do :
14190 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
14191#ifdef HAVE_CURSES_H
14192#include <curses.h>
14193#endif
14194
14195"
14196if test "x$ac_cv_header_term_h" = xyes; then :
14197 cat >>confdefs.h <<_ACEOF
14198#define HAVE_TERM_H 1
14199_ACEOF
14200
14201fi
14202
14203done
14204
14205
Jack Jansen666b1e72001-10-31 12:11:48 +000014206# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
14208$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014209if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014210 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014211else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014212 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014213/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014214#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014215int
14216main ()
14217{
Jack Jansen666b1e72001-10-31 12:11:48 +000014218
14219 int rtn;
14220 rtn = mvwdelch(0,0,0);
14221
Martin v. Löwis11437992002-04-12 09:54:03 +000014222 ;
14223 return 0;
14224}
14225_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014226if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014227 ac_cv_mvwdelch_is_expression=yes
14228else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014229 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014230fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014231rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14232fi
14233
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014234{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
14235$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000014236
14237if test "$ac_cv_mvwdelch_is_expression" = yes
14238then
Martin v. Löwis11437992002-04-12 09:54:03 +000014239
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014240$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014241
14242fi
14243
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
14245$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014246if ${ac_cv_window_has_flags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014247 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014248else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014249 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014250/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014251#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014252int
14253main ()
14254{
Jack Jansen666b1e72001-10-31 12:11:48 +000014255
14256 WINDOW *w;
14257 w->_flags = 0;
14258
Martin v. Löwis11437992002-04-12 09:54:03 +000014259 ;
14260 return 0;
14261}
14262_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014263if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014264 ac_cv_window_has_flags=yes
14265else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014266 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014267fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014268rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14269fi
14270
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014271{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
14272$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000014273
Jack Jansen666b1e72001-10-31 12:11:48 +000014274
14275if test "$ac_cv_window_has_flags" = yes
14276then
Martin v. Löwis11437992002-04-12 09:54:03 +000014277
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014278$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014279
14280fi
14281
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014282{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
14283$as_echo_n "checking for is_term_resized... " >&6; }
14284cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000014285/* end confdefs.h. */
14286#include <curses.h>
14287int
14288main ()
14289{
14290void *x=is_term_resized
14291 ;
14292 return 0;
14293}
14294_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014295if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000014296
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014297$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000014298
Matthias Klosec511b472010-05-08 11:01:39 +000014299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014300$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014301else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14303$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014304
14305fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014306rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14307
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
14309$as_echo_n "checking for resize_term... " >&6; }
14310cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000014311/* end confdefs.h. */
14312#include <curses.h>
14313int
14314main ()
14315{
14316void *x=resize_term
14317 ;
14318 return 0;
14319}
14320_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014321if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000014322
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014323$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000014324
Matthias Klosec511b472010-05-08 11:01:39 +000014325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014326$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014327else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14329$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014330
14331fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014332rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14333
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
14335$as_echo_n "checking for resizeterm... " >&6; }
14336cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000014337/* end confdefs.h. */
14338#include <curses.h>
14339int
14340main ()
14341{
14342void *x=resizeterm
14343 ;
14344 return 0;
14345}
14346_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014347if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000014348
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014349$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000014350
Matthias Klosec511b472010-05-08 11:01:39 +000014351 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014352$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014353else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14355$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014356
14357fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014358rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.comf27ec3e2014-04-17 20:11:19 +020014359# last curses configure check
14360CPPFLAGS=$ac_save_cppflags
Martin v. Löwiseba40652007-08-30 20:10:57 +000014361
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
14363$as_echo "$as_me: checking for device files" >&6;}
14364
14365if test "x$cross_compiling" = xyes; then
14366 if test "${ac_cv_file__dev_ptmx+set}" != set; then
14367 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14368$as_echo_n "checking for /dev/ptmx... " >&6; }
14369 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14370$as_echo "not set" >&6; }
14371 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14372 fi
14373 if test "${ac_cv_file__dev_ptc+set}" != set; then
14374 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14375$as_echo_n "checking for /dev/ptc... " >&6; }
14376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14377$as_echo "not set" >&6; }
14378 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14379 fi
14380fi
14381
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14383$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014384if ${ac_cv_file__dev_ptmx+:} false; then :
14385 $as_echo_n "(cached) " >&6
14386else
14387 test "$cross_compiling" = yes &&
14388 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14389if test -r "/dev/ptmx"; then
14390 ac_cv_file__dev_ptmx=yes
14391else
14392 ac_cv_file__dev_ptmx=no
14393fi
14394fi
14395{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
14396$as_echo "$ac_cv_file__dev_ptmx" >&6; }
14397if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Martin v. Löwisfefbc202006-10-17 18:59:23 +000014398
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014399fi
14400
14401if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014402
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014403$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014404
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014405fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14407$as_echo_n "checking for /dev/ptc... " >&6; }
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014408if ${ac_cv_file__dev_ptc+:} false; then :
14409 $as_echo_n "(cached) " >&6
14410else
14411 test "$cross_compiling" = yes &&
14412 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14413if test -r "/dev/ptc"; then
14414 ac_cv_file__dev_ptc=yes
14415else
14416 ac_cv_file__dev_ptc=no
14417fi
14418fi
14419{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
14420$as_echo "$ac_cv_file__dev_ptc" >&6; }
14421if test "x$ac_cv_file__dev_ptc" = xyes; then :
Martin v. Löwisfefbc202006-10-17 18:59:23 +000014422
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014423fi
14424
14425if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000014426
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014427$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000014428
Neal Norwitz865400f2003-03-21 01:42:58 +000014429fi
14430
Mark Dickinson82864d12009-11-15 16:18:58 +000014431if test "$have_long_long" = yes
14432then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014433 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
14434$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014435 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014436 $as_echo_n "(cached) " >&6
Mark Dickinson82864d12009-11-15 16:18:58 +000014437else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014438 if test "$cross_compiling" = yes; then :
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014439 ac_cv_have_long_long_format="cross -- assuming no"
14440 if test x$GCC = xyes; then
14441 save_CFLAGS=$CFLAGS
14442 CFLAGS="$CFLAGS -Werror -Wformat"
14443 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14444/* end confdefs.h. */
14445
14446 #include <stdio.h>
14447 #include <stddef.h>
14448
14449int
14450main ()
14451{
14452
14453 char *buffer;
14454 sprintf(buffer, "%lld", (long long)123);
14455 sprintf(buffer, "%lld", (long long)-123);
14456 sprintf(buffer, "%llu", (unsigned long long)123);
14457
14458 ;
14459 return 0;
14460}
14461_ACEOF
14462if ac_fn_c_try_compile "$LINENO"; then :
14463 ac_cv_have_long_long_format=yes
14464
14465fi
14466rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14467 CFLAGS=$save_CFLAGS
14468 fi
Mark Dickinson82864d12009-11-15 16:18:58 +000014469else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014470 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson82864d12009-11-15 16:18:58 +000014471/* end confdefs.h. */
14472
14473 #include <stdio.h>
14474 #include <stddef.h>
14475 #include <string.h>
14476
14477 #ifdef HAVE_SYS_TYPES_H
14478 #include <sys/types.h>
14479 #endif
14480
14481 int main()
14482 {
14483 char buffer[256];
14484
14485 if (sprintf(buffer, "%lld", (long long)123) < 0)
14486 return 1;
14487 if (strcmp(buffer, "123"))
14488 return 1;
14489
14490 if (sprintf(buffer, "%lld", (long long)-123) < 0)
14491 return 1;
14492 if (strcmp(buffer, "-123"))
14493 return 1;
14494
14495 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
14496 return 1;
14497 if (strcmp(buffer, "123"))
14498 return 1;
14499
14500 return 0;
14501 }
14502
14503_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014504if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson82864d12009-11-15 16:18:58 +000014505 ac_cv_have_long_long_format=yes
14506else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014507 ac_cv_have_long_long_format=no
Mark Dickinson82864d12009-11-15 16:18:58 +000014508fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014509rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14510 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson82864d12009-11-15 16:18:58 +000014511fi
14512
14513
Mark Dickinson82864d12009-11-15 16:18:58 +000014514fi
14515
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
14517$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson82864d12009-11-15 16:18:58 +000014518fi
14519
Mark Dickinson5ce84742009-12-31 20:48:04 +000014520if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson82864d12009-11-15 16:18:58 +000014521then
14522
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014523$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson82864d12009-11-15 16:18:58 +000014524
14525fi
14526
Ronald Oussoren315cd0c2009-11-19 16:25:21 +000014527if test $ac_sys_system = Darwin
14528then
14529 LIBS="$LIBS -framework CoreFoundation"
14530fi
14531
Mark Dickinson82864d12009-11-15 16:18:58 +000014532
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
14534$as_echo_n "checking for %zd printf() format support... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014535if ${ac_cv_have_size_t_format+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014536 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014537else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014538 if test "$cross_compiling" = yes; then :
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000014539 ac_cv_have_size_t_format="cross -- assuming yes"
14540
Brett Cannon09d12362006-05-11 05:11:33 +000014541else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014542 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon09d12362006-05-11 05:11:33 +000014543/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014544
Brett Cannon09d12362006-05-11 05:11:33 +000014545#include <stdio.h>
14546#include <stddef.h>
14547#include <string.h>
14548
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000014549#ifdef HAVE_SYS_TYPES_H
14550#include <sys/types.h>
14551#endif
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000014552
14553#ifdef HAVE_SSIZE_T
14554typedef ssize_t Py_ssize_t;
14555#elif SIZEOF_VOID_P == SIZEOF_LONG
14556typedef long Py_ssize_t;
14557#else
14558typedef int Py_ssize_t;
14559#endif
Brett Cannon09d12362006-05-11 05:11:33 +000014560
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000014561int main()
14562{
14563 char buffer[256];
14564
Brett Cannon09d12362006-05-11 05:11:33 +000014565 if(sprintf(buffer, "%zd", (size_t)123) < 0)
14566 return 1;
14567
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000014568 if (strcmp(buffer, "123"))
14569 return 1;
14570
14571 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
14572 return 1;
14573
14574 if (strcmp(buffer, "-123"))
Brett Cannon09d12362006-05-11 05:11:33 +000014575 return 1;
14576
14577 return 0;
14578}
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014579
Brett Cannon09d12362006-05-11 05:11:33 +000014580_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014581if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014582 ac_cv_have_size_t_format=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014583else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014584 ac_cv_have_size_t_format=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014585fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014586rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14587 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000014588fi
14589
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014590fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014591{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
14592$as_echo "$ac_cv_have_size_t_format" >&6; }
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000014593if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014594
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014595$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014596
14597fi
14598
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014599ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000014600#ifdef HAVE_SYS_TYPES_H
14601#include <sys/types.h>
14602#endif
14603#ifdef HAVE_SYS_SOCKET_H
14604#include <sys/socket.h>
14605#endif
14606
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014607"
Matthias Klose3cef2a92012-03-14 23:39:33 +010014608if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000014609
Martin v. Löwis11437992002-04-12 09:54:03 +000014610else
Guido van Rossum95713eb2000-05-18 20:53:31 +000014611
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014612$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000014613
14614fi
14615
Michael W. Hudson54241132001-12-07 15:38:26 +000014616
Benjamin Peterson7497e912010-10-16 00:53:39 +000014617case $ac_sys_system in
14618AIX*)
14619
14620$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
14621 ;;
14622esac
14623
14624
Michael W. Hudson54241132001-12-07 15:38:26 +000014625
14626
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000014627for h in `(cd $srcdir;echo Python/thread_*.h)`
14628do
14629 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
14630done
14631
Michael W. Hudson54241132001-12-07 15:38:26 +000014632
Neal Norwitzd24499d2005-12-18 21:36:39 +000014633SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
14635$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014636for dir in $SRCDIRS; do
14637 if test ! -d $dir; then
14638 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000014639 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014640done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014641{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
14642$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000014643
Ned Deily3f1d0b32014-11-20 02:11:03 -080014644# ensurepip option
14645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
14646$as_echo_n "checking for ensurepip... " >&6; }
14647
14648# Check whether --with-ensurepip was given.
14649if test "${with_ensurepip+set}" = set; then :
14650 withval=$with_ensurepip;
14651else
14652 with_ensurepip=no
14653fi
14654
14655case $with_ensurepip in #(
14656 yes|upgrade) :
14657 ENSUREPIP=upgrade ;; #(
14658 install) :
14659 ENSUREPIP=install ;; #(
14660 no) :
14661 ENSUREPIP=no ;; #(
14662 *) :
14663 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
14664esac
14665{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
14666$as_echo "$ENSUREPIP" >&6; }
14667
14668
Guido van Rossum627b2d71993-12-24 10:39:16 +000014669# generate output files
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000014670ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000014671
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000014672ac_config_files="$ac_config_files Modules/ld_so_aix"
14673
Martin v. Löwis11437992002-04-12 09:54:03 +000014674cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014675# This file is a shell script that caches the results of configure
14676# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000014677# scripts and configure runs, see configure's option --config-cache.
14678# It is not useful on other systems. If it contains results you don't
14679# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014680#
Martin v. Löwis11437992002-04-12 09:54:03 +000014681# config.status only pays attention to the cache file if you give it
14682# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014683#
Skip Montanaro6dead952003-09-25 14:50:04 +000014684# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000014685# loading this file, other *unset* `ac_cv_foo' will be assigned the
14686# following values.
14687
14688_ACEOF
14689
Guido van Rossumf78abae1997-01-21 22:02:36 +000014690# The following way of writing the cache mishandles newlines in values,
14691# but we know of no workaround that is simple, portable, and efficient.
Martin v. Löwiseba40652007-08-30 20:10:57 +000014692# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014693# Ultrix sh set writes to stderr and can't be redirected directly,
14694# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwiseba40652007-08-30 20:10:57 +000014695(
14696 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
14697 eval ac_val=\$$ac_var
14698 case $ac_val in #(
14699 *${as_nl}*)
14700 case $ac_var in #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014701 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
14702$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014703 esac
14704 case $ac_var in #(
14705 _ | IFS | as_nl) ;; #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014706 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
14707 *) { eval $ac_var=; unset $ac_var;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014708 esac ;;
14709 esac
14710 done
14711
Martin v. Löwis11437992002-04-12 09:54:03 +000014712 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +000014713 case $as_nl`(ac_space=' '; set) 2>&1` in #(
14714 *${as_nl}ac_space=\ *)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014715 # `set' does not quote correctly, so add quotes: double-quote
14716 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000014717 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014718 "s/'/'\\\\''/g;
14719 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Martin v. Löwiseba40652007-08-30 20:10:57 +000014720 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000014721 *)
14722 # `set' quotes correctly as required by POSIX, so do not add quotes.
Martin v. Löwiseba40652007-08-30 20:10:57 +000014723 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000014724 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014725 esac |
14726 sort
14727) |
Martin v. Löwis11437992002-04-12 09:54:03 +000014728 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000014729 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000014730 t clear
Martin v. Löwiseba40652007-08-30 20:10:57 +000014731 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000014732 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
14733 t end
Martin v. Löwiseba40652007-08-30 20:10:57 +000014734 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
14735 :end' >>confcache
14736if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
14737 if test -w "$cache_file"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +010014738 if test "x$cache_file" != "x/dev/null"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014739 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
14740$as_echo "$as_me: updating cache $cache_file" >&6;}
Matthias Klose3cef2a92012-03-14 23:39:33 +010014741 if test ! -f "$cache_file" || test -h "$cache_file"; then
14742 cat confcache >"$cache_file"
14743 else
14744 case $cache_file in #(
14745 */* | ?:*)
14746 mv -f confcache "$cache_file"$$ &&
14747 mv -f "$cache_file"$$ "$cache_file" ;; #(
14748 *)
14749 mv -f confcache "$cache_file" ;;
14750 esac
14751 fi
14752 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014753 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014754 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
14755$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014756 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014757fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014758rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000014759
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014760test "x$prefix" = xNONE && prefix=$ac_default_prefix
14761# Let make expand exec_prefix.
14762test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000014763
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014764DEFS=-DHAVE_CONFIG_H
14765
Skip Montanaro6dead952003-09-25 14:50:04 +000014766ac_libobjs=
14767ac_ltlibobjs=
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014768U=
Skip Montanaro6dead952003-09-25 14:50:04 +000014769for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
14770 # 1. Remove the extension, and $U if already installed.
Martin v. Löwiseba40652007-08-30 20:10:57 +000014771 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014772 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Martin v. Löwiseba40652007-08-30 20:10:57 +000014773 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
14774 # will be set to the directory where LIBOBJS objects are built.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014775 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
14776 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000014777done
14778LIBOBJS=$ac_libobjs
14779
14780LTLIBOBJS=$ac_ltlibobjs
14781
14782
Martin v. Löwis11437992002-04-12 09:54:03 +000014783
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014784
Matthias Klose3cef2a92012-03-14 23:39:33 +010014785: "${CONFIG_STATUS=./config.status}"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014786ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000014787ac_clean_files_save=$ac_clean_files
14788ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014789{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
14790$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
14791as_write_fail=0
14792cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014793#! $SHELL
14794# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000014795# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014796# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000014797# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000014798
Martin v. Löwis11437992002-04-12 09:54:03 +000014799debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000014800ac_cs_recheck=false
14801ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000014802
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014803SHELL=\${CONFIG_SHELL-$SHELL}
14804export SHELL
14805_ASEOF
14806cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
14807## -------------------- ##
14808## M4sh Initialization. ##
14809## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000014810
Martin v. Löwiseba40652007-08-30 20:10:57 +000014811# Be more Bourne compatible
14812DUALCASE=1; export DUALCASE # for MKS sh
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014813if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014814 emulate sh
14815 NULLCMD=:
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014816 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000014817 # is contrary to our usage. Disable this feature.
14818 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000014819 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000014820else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014821 case `(set -o) 2>/dev/null` in #(
14822 *posix*) :
14823 set -o posix ;; #(
14824 *) :
14825 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014826esac
Martin v. Löwis11437992002-04-12 09:54:03 +000014827fi
Michael W. Hudson54241132001-12-07 15:38:26 +000014828
Skip Montanaro6dead952003-09-25 14:50:04 +000014829
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014830as_nl='
14831'
14832export as_nl
14833# Printing a long string crashes Solaris 7 /usr/bin/printf.
14834as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
14835as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
14836as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
14837# Prefer a ksh shell builtin over an external printf program on Solaris,
14838# but without wasting forks for bash or zsh.
14839if test -z "$BASH_VERSION$ZSH_VERSION" \
14840 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
14841 as_echo='print -r --'
14842 as_echo_n='print -rn --'
14843elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
14844 as_echo='printf %s\n'
14845 as_echo_n='printf %s'
14846else
14847 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
14848 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
14849 as_echo_n='/usr/ucb/echo -n'
14850 else
14851 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
14852 as_echo_n_body='eval
14853 arg=$1;
14854 case $arg in #(
14855 *"$as_nl"*)
14856 expr "X$arg" : "X\\(.*\\)$as_nl";
14857 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
14858 esac;
14859 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
14860 '
14861 export as_echo_n_body
14862 as_echo_n='sh -c $as_echo_n_body as_echo'
14863 fi
14864 export as_echo_body
14865 as_echo='sh -c $as_echo_body as_echo'
14866fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014867
14868# The user is always right.
14869if test "${PATH_SEPARATOR+set}" != set; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014870 PATH_SEPARATOR=:
14871 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
14872 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
14873 PATH_SEPARATOR=';'
14874 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000014875fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014876
Martin v. Löwiseba40652007-08-30 20:10:57 +000014877
14878# IFS
14879# We need space, tab and new line, in precisely that order. Quoting is
14880# there to prevent editors from complaining about space-tab.
14881# (If _AS_PATH_WALK were called with IFS unset, it would disable word
14882# splitting by setting IFS to empty value.)
Martin v. Löwiseba40652007-08-30 20:10:57 +000014883IFS=" "" $as_nl"
14884
14885# Find who we are. Look in the path if we contain no directory separator.
Matthias Klose3cef2a92012-03-14 23:39:33 +010014886as_myself=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014887case $0 in #((
Martin v. Löwiseba40652007-08-30 20:10:57 +000014888 *[\\/]* ) as_myself=$0 ;;
14889 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000014890for as_dir in $PATH
14891do
14892 IFS=$as_save_IFS
14893 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014894 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
14895 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000014896IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000014897
Martin v. Löwiseba40652007-08-30 20:10:57 +000014898 ;;
14899esac
14900# We did not find ourselves, most probably we were run as `sh COMMAND'
14901# in which case we are not to be found in the path.
14902if test "x$as_myself" = x; then
14903 as_myself=$0
14904fi
14905if test ! -f "$as_myself"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014906 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
14907 exit 1
Martin v. Löwiseba40652007-08-30 20:10:57 +000014908fi
14909
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014910# Unset variables that we do not need and which cause bugs (e.g. in
14911# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
14912# suppresses any "Segmentation fault" message there. '((' could
14913# trigger a bug in pdksh 5.2.14.
14914for as_var in BASH_ENV ENV MAIL MAILPATH
14915do eval test x\${$as_var+set} = xset \
14916 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Martin v. Löwiseba40652007-08-30 20:10:57 +000014917done
14918PS1='$ '
14919PS2='> '
14920PS4='+ '
14921
14922# NLS nuisances.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014923LC_ALL=C
14924export LC_ALL
14925LANGUAGE=C
14926export LANGUAGE
Martin v. Löwiseba40652007-08-30 20:10:57 +000014927
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014928# CDPATH.
14929(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
14930
14931
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014932# as_fn_error STATUS ERROR [LINENO LOG_FD]
14933# ----------------------------------------
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014934# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
14935# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014936# script with STATUS, using 1 if that was 0.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014937as_fn_error ()
14938{
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014939 as_status=$1; test $as_status -eq 0 && as_status=1
14940 if test "$4"; then
14941 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
14942 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014943 fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014944 $as_echo "$as_me: error: $2" >&2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014945 as_fn_exit $as_status
14946} # as_fn_error
14947
14948
14949# as_fn_set_status STATUS
14950# -----------------------
14951# Set $? to STATUS, without forking.
14952as_fn_set_status ()
14953{
14954 return $1
14955} # as_fn_set_status
14956
14957# as_fn_exit STATUS
14958# -----------------
14959# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
14960as_fn_exit ()
14961{
14962 set +e
14963 as_fn_set_status $1
14964 exit $1
14965} # as_fn_exit
14966
14967# as_fn_unset VAR
14968# ---------------
14969# Portably unset VAR.
14970as_fn_unset ()
14971{
14972 { eval $1=; unset $1;}
14973}
14974as_unset=as_fn_unset
14975# as_fn_append VAR VALUE
14976# ----------------------
14977# Append the text in VALUE to the end of the definition contained in VAR. Take
14978# advantage of any shell optimizations that allow amortized linear growth over
14979# repeated appends, instead of the typical quadratic growth present in naive
14980# implementations.
14981if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
14982 eval 'as_fn_append ()
14983 {
14984 eval $1+=\$2
14985 }'
14986else
14987 as_fn_append ()
14988 {
14989 eval $1=\$$1\$2
14990 }
14991fi # as_fn_append
14992
14993# as_fn_arith ARG...
14994# ------------------
14995# Perform arithmetic evaluation on the ARGs, and store the result in the
14996# global $as_val. Take advantage of shells that can avoid forks. The arguments
14997# must be portable across $(()) and expr.
14998if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
14999 eval 'as_fn_arith ()
15000 {
15001 as_val=$(( $* ))
15002 }'
15003else
15004 as_fn_arith ()
15005 {
15006 as_val=`expr "$@" || test $? -eq 1`
15007 }
15008fi # as_fn_arith
15009
15010
Martin v. Löwiseba40652007-08-30 20:10:57 +000015011if expr a : '\(a\)' >/dev/null 2>&1 &&
15012 test "X`expr 00001 : '.*\(...\)'`" = X001; then
15013 as_expr=expr
15014else
15015 as_expr=false
15016fi
15017
15018if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
15019 as_basename=basename
15020else
15021 as_basename=false
15022fi
15023
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015024if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
15025 as_dirname=dirname
15026else
15027 as_dirname=false
15028fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015029
Martin v. Löwiseba40652007-08-30 20:10:57 +000015030as_me=`$as_basename -- "$0" ||
15031$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15032 X"$0" : 'X\(//\)$' \| \
15033 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015034$as_echo X/"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000015035 sed '/^.*\/\([^/][^/]*\)\/*$/{
15036 s//\1/
15037 q
15038 }
15039 /^X\/\(\/\/\)$/{
15040 s//\1/
15041 q
15042 }
15043 /^X\/\(\/\).*/{
15044 s//\1/
15045 q
15046 }
15047 s/.*/./; q'`
15048
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015049# Avoid depending upon Character Ranges.
15050as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15051as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15052as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15053as_cr_digits='0123456789'
15054as_cr_alnum=$as_cr_Letters$as_cr_digits
Martin v. Löwiseba40652007-08-30 20:10:57 +000015055
15056ECHO_C= ECHO_N= ECHO_T=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015057case `echo -n x` in #(((((
Martin v. Löwiseba40652007-08-30 20:10:57 +000015058-n*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015059 case `echo 'xy\c'` in
Martin v. Löwiseba40652007-08-30 20:10:57 +000015060 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015061 xy) ECHO_C='\c';;
15062 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
15063 ECHO_T=' ';;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015064 esac;;
15065*)
15066 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000015067esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015068
Martin v. Löwis11437992002-04-12 09:54:03 +000015069rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +000015070if test -d conf$$.dir; then
15071 rm -f conf$$.dir/conf$$.file
15072else
15073 rm -f conf$$.dir
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015074 mkdir conf$$.dir 2>/dev/null
Martin v. Löwiseba40652007-08-30 20:10:57 +000015075fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015076if (echo >conf$$.file) 2>/dev/null; then
15077 if ln -s conf$$.file conf$$ 2>/dev/null; then
15078 as_ln_s='ln -s'
15079 # ... but there are two gotchas:
15080 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
15081 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015082 # In both cases, we have to default to `cp -pR'.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015083 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015084 as_ln_s='cp -pR'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015085 elif ln conf$$.file conf$$ 2>/dev/null; then
15086 as_ln_s=ln
15087 else
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015088 as_ln_s='cp -pR'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015089 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015090else
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015091 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000015092fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015093rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
15094rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000015095
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015096
15097# as_fn_mkdir_p
15098# -------------
15099# Create "$as_dir" as a directory, including parents if necessary.
15100as_fn_mkdir_p ()
15101{
15102
15103 case $as_dir in #(
15104 -*) as_dir=./$as_dir;;
15105 esac
15106 test -d "$as_dir" || eval $as_mkdir_p || {
15107 as_dirs=
15108 while :; do
15109 case $as_dir in #(
15110 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
15111 *) as_qdir=$as_dir;;
15112 esac
15113 as_dirs="'$as_qdir' $as_dirs"
15114 as_dir=`$as_dirname -- "$as_dir" ||
15115$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15116 X"$as_dir" : 'X\(//\)[^/]' \| \
15117 X"$as_dir" : 'X\(//\)$' \| \
15118 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
15119$as_echo X"$as_dir" |
15120 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15121 s//\1/
15122 q
15123 }
15124 /^X\(\/\/\)[^/].*/{
15125 s//\1/
15126 q
15127 }
15128 /^X\(\/\/\)$/{
15129 s//\1/
15130 q
15131 }
15132 /^X\(\/\).*/{
15133 s//\1/
15134 q
15135 }
15136 s/.*/./; q'`
15137 test -d "$as_dir" && break
15138 done
15139 test -z "$as_dirs" || eval "mkdir $as_dirs"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015140 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015141
15142
15143} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000015144if mkdir -p . 2>/dev/null; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015145 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000015146else
Skip Montanarof0d5f792004-08-15 14:08:23 +000015147 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000015148 as_mkdir_p=false
15149fi
15150
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015151
15152# as_fn_executable_p FILE
15153# -----------------------
15154# Test if FILE is an executable regular file.
15155as_fn_executable_p ()
15156{
15157 test -f "$1" && test -x "$1"
15158} # as_fn_executable_p
15159as_test_x='test -x'
15160as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000015161
15162# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015163as_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 +000015164
15165# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015166as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015167
15168
Martin v. Löwis11437992002-04-12 09:54:03 +000015169exec 6>&1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015170## ----------------------------------- ##
15171## Main body of $CONFIG_STATUS script. ##
15172## ----------------------------------- ##
15173_ASEOF
15174test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015175
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015176cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15177# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000015178# report actual input values of CONFIG_FILES etc. instead of their
Martin v. Löwiseba40652007-08-30 20:10:57 +000015179# values after options handling.
15180ac_log="
Martin v. Löwis174440b2008-10-03 08:59:41 +000015181This file was extended by python $as_me 2.7, which was
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015182generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000015183
15184 CONFIG_FILES = $CONFIG_FILES
15185 CONFIG_HEADERS = $CONFIG_HEADERS
15186 CONFIG_LINKS = $CONFIG_LINKS
15187 CONFIG_COMMANDS = $CONFIG_COMMANDS
15188 $ $0 $@
15189
Martin v. Löwiseba40652007-08-30 20:10:57 +000015190on `(hostname || uname -n) 2>/dev/null | sed 1q`
15191"
15192
Martin v. Löwis11437992002-04-12 09:54:03 +000015193_ACEOF
15194
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015195case $ac_config_files in *"
15196"*) set x $ac_config_files; shift; ac_config_files=$*;;
15197esac
15198
15199case $ac_config_headers in *"
15200"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
15201esac
15202
15203
15204cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015205# Files that config.status was made for.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015206config_files="$ac_config_files"
15207config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000015208
Martin v. Löwiseba40652007-08-30 20:10:57 +000015209_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015210
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015211cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015212ac_cs_usage="\
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015213\`$as_me' instantiates files and other configuration actions
15214from templates according to the current configuration. Unless the files
15215and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000015216
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015217Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000015218
15219 -h, --help print this help, then exit
Martin v. Löwiseba40652007-08-30 20:10:57 +000015220 -V, --version print version number and configuration settings, then exit
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015221 --config print configuration, then exit
15222 -q, --quiet, --silent
15223 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000015224 -d, --debug don't remove temporary files
15225 --recheck update $as_me by reconfiguring in the same conditions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015226 --file=FILE[:TEMPLATE]
15227 instantiate the configuration file FILE
15228 --header=FILE[:TEMPLATE]
15229 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000015230
15231Configuration files:
15232$config_files
15233
15234Configuration headers:
15235$config_headers
15236
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015237Report bugs to <http://bugs.python.org/>."
Skip Montanaro89e975f2007-08-22 19:05:21 +000015238
Martin v. Löwiseba40652007-08-30 20:10:57 +000015239_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015240cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15241ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000015242ac_cs_version="\\
Martin v. Löwis174440b2008-10-03 08:59:41 +000015243python config.status 2.7
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015244configured by $0, generated by GNU Autoconf 2.69,
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015245 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000015246
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015247Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000015248This config.status script is free software; the Free Software Foundation
15249gives unlimited permission to copy, distribute and modify it."
Martin v. Löwiseba40652007-08-30 20:10:57 +000015250
15251ac_pwd='$ac_pwd'
15252srcdir='$srcdir'
15253INSTALL='$INSTALL'
Trent Nelsonf6407a12012-08-30 14:56:13 +000015254MKDIR_P='$MKDIR_P'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015255test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000015256_ACEOF
15257
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015258cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15259# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000015260ac_need_defaults=:
15261while test $# != 0
15262do
15263 case $1 in
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015264 --*=?*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000015265 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15266 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000015267 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000015268 ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015269 --*=)
15270 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15271 ac_optarg=
15272 ac_shift=:
15273 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015274 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000015275 ac_option=$1
15276 ac_optarg=$2
15277 ac_shift=shift
15278 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015279 esac
15280
Skip Montanaro6dead952003-09-25 14:50:04 +000015281 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000015282 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000015283 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15284 ac_cs_recheck=: ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015285 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015286 $as_echo "$ac_cs_version"; exit ;;
15287 --config | --confi | --conf | --con | --co | --c )
15288 $as_echo "$ac_cs_config"; exit ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015289 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000015290 debug=: ;;
15291 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000015292 $ac_shift
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015293 case $ac_optarg in
15294 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015295 '') as_fn_error $? "missing file argument" ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015296 esac
15297 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015298 ac_need_defaults=false;;
15299 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000015300 $ac_shift
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015301 case $ac_optarg in
15302 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15303 esac
15304 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015305 ac_need_defaults=false;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015306 --he | --h)
15307 # Conflict between --help and --header
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015308 as_fn_error $? "ambiguous option: \`$1'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015309Try \`$0 --help' for more information.";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015310 --help | --hel | -h )
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015311 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000015312 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
15313 | -silent | --silent | --silen | --sile | --sil | --si | --s)
15314 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015315
15316 # This is an error.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015317 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015318Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015319
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015320 *) as_fn_append ac_config_targets " $1"
Martin v. Löwiseba40652007-08-30 20:10:57 +000015321 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015322
15323 esac
15324 shift
15325done
15326
Skip Montanaro6dead952003-09-25 14:50:04 +000015327ac_configure_extra_args=
15328
15329if $ac_cs_silent; then
15330 exec 6>/dev/null
15331 ac_configure_extra_args="$ac_configure_extra_args --silent"
15332fi
15333
15334_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015335cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000015336if \$ac_cs_recheck; then
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015337 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015338 shift
15339 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
15340 CONFIG_SHELL='$SHELL'
Martin v. Löwiseba40652007-08-30 20:10:57 +000015341 export CONFIG_SHELL
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015342 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000015343fi
15344
Martin v. Löwis11437992002-04-12 09:54:03 +000015345_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015346cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015347exec 5>>config.log
15348{
15349 echo
15350 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
15351## Running $as_me. ##
15352_ASBOX
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015353 $as_echo "$ac_log"
Martin v. Löwiseba40652007-08-30 20:10:57 +000015354} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015355
Martin v. Löwiseba40652007-08-30 20:10:57 +000015356_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015357cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015358_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015359
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015360cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015361
15362# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000015363for ac_config_target in $ac_config_targets
15364do
Martin v. Löwiseba40652007-08-30 20:10:57 +000015365 case $ac_config_target in
15366 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
15367 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
15368 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
15369 "Mac/IDLE/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/IDLE/Makefile" ;;
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000015370 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
15371 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015372 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
15373 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000015374 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000015375 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015376
Matthias Klose3cef2a92012-03-14 23:39:33 +010015377 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015378 esac
15379done
15380
Martin v. Löwiseba40652007-08-30 20:10:57 +000015381
Martin v. Löwis11437992002-04-12 09:54:03 +000015382# If the user did not use the arguments to specify the items to instantiate,
15383# then the envvar interface is used. Set only those that are not.
15384# We use the long form for the default assignment because of an extremely
15385# bizarre bug on SunOS 4.1.3.
15386if $ac_need_defaults; then
15387 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15388 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
15389fi
15390
Skip Montanaro6dead952003-09-25 14:50:04 +000015391# Have a temporary directory for convenience. Make it in the build tree
Martin v. Löwiseba40652007-08-30 20:10:57 +000015392# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000015393# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015394# Hook for its removal unless debugging.
15395# Note that there is a small window in which the directory will not be cleaned:
15396# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000015397$debug ||
15398{
Matthias Klose3cef2a92012-03-14 23:39:33 +010015399 tmp= ac_tmp=
Martin v. Löwiseba40652007-08-30 20:10:57 +000015400 trap 'exit_status=$?
Matthias Klose3cef2a92012-03-14 23:39:33 +010015401 : "${ac_tmp:=$tmp}"
15402 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +000015403' 0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015404 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000015405}
Martin v. Löwis11437992002-04-12 09:54:03 +000015406# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000015407
Martin v. Löwis11437992002-04-12 09:54:03 +000015408{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015409 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Matthias Klose3cef2a92012-03-14 23:39:33 +010015410 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000015411} ||
15412{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015413 tmp=./conf$$-$RANDOM
15414 (umask 077 && mkdir "$tmp")
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015415} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Matthias Klose3cef2a92012-03-14 23:39:33 +010015416ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000015417
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015418# Set up the scripts for CONFIG_FILES section.
15419# No need to generate them if there are no CONFIG_FILES.
15420# This happens for instance with `./config.status config.h'.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015421if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015422
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015423
15424ac_cr=`echo X | tr X '\015'`
15425# On cygwin, bash can eat \r inside `` if the user requested igncr.
15426# But we know of no other shell where ac_cr would be empty at this
15427# point, so we can use a bashism as a fallback.
15428if test "x$ac_cr" = x; then
15429 eval ac_cr=\$\'\\r\'
15430fi
15431ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
15432if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015433 ac_cs_awk_cr='\\r'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015434else
15435 ac_cs_awk_cr=$ac_cr
15436fi
15437
Matthias Klose3cef2a92012-03-14 23:39:33 +010015438echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000015439_ACEOF
15440
Martin v. Löwiseba40652007-08-30 20:10:57 +000015441
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015442{
15443 echo "cat >conf$$subs.awk <<_ACEOF" &&
15444 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
15445 echo "_ACEOF"
15446} >conf$$subs.sh ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015447 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15448ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015449ac_delim='%!_!# '
15450for ac_last_try in false false false false false :; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015451 . ./conf$$subs.sh ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015452 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015453
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015454 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
15455 if test $ac_delim_n = $ac_delim_num; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015456 break
15457 elif $ac_last_try; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015458 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015459 else
15460 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000015461 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015462done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015463rm -f conf$$subs.sh
Martin v. Löwiseba40652007-08-30 20:10:57 +000015464
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015465cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Matthias Klose3cef2a92012-03-14 23:39:33 +010015466cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000015467_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015468sed -n '
15469h
15470s/^/S["/; s/!.*/"]=/
15471p
15472g
15473s/^[^!]*!//
15474:repl
15475t repl
15476s/'"$ac_delim"'$//
15477t delim
15478:nl
15479h
15480s/\(.\{148\}\)..*/\1/
15481t more1
15482s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
15483p
15484n
15485b repl
15486:more1
15487s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15488p
15489g
15490s/.\{148\}//
15491t nl
15492:delim
15493h
15494s/\(.\{148\}\)..*/\1/
15495t more2
15496s/["\\]/\\&/g; s/^/"/; s/$/"/
15497p
15498b
15499:more2
15500s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15501p
15502g
15503s/.\{148\}//
15504t delim
15505' <conf$$subs.awk | sed '
15506/^[^""]/{
15507 N
15508 s/\n//
15509}
15510' >>$CONFIG_STATUS || ac_write_fail=1
15511rm -f conf$$subs.awk
15512cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15513_ACAWK
Matthias Klose3cef2a92012-03-14 23:39:33 +010015514cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015515 for (key in S) S_is_set[key] = 1
15516 FS = ""
15517
15518}
15519{
15520 line = $ 0
15521 nfields = split(line, field, "@")
15522 substed = 0
15523 len = length(field[1])
15524 for (i = 2; i < nfields; i++) {
15525 key = field[i]
15526 keylen = length(key)
15527 if (S_is_set[key]) {
15528 value = S[key]
15529 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
15530 len += length(value) + length(field[++i])
15531 substed = 1
15532 } else
15533 len += 1 + keylen
15534 }
15535
15536 print line
15537}
15538
15539_ACAWK
Martin v. Löwiseba40652007-08-30 20:10:57 +000015540_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015541cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15542if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
15543 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
15544else
15545 cat
Matthias Klose3cef2a92012-03-14 23:39:33 +010015546fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015547 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015548_ACEOF
15549
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015550# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
15551# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Martin v. Löwiseba40652007-08-30 20:10:57 +000015552# trailing colons and then remove the whole line if VPATH becomes empty
15553# (actually we leave an empty line to preserve line numbers).
15554if test "x$srcdir" = x.; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015555 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
15556h
15557s///
15558s/^/:/
15559s/[ ]*$/:/
15560s/:\$(srcdir):/:/g
15561s/:\${srcdir}:/:/g
15562s/:@srcdir@:/:/g
15563s/^:*//
Martin v. Löwiseba40652007-08-30 20:10:57 +000015564s/:*$//
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015565x
15566s/\(=[ ]*\).*/\1/
15567G
15568s/\n//
Martin v. Löwiseba40652007-08-30 20:10:57 +000015569s/^[^=]*=[ ]*$//
15570}'
15571fi
15572
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015573cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015574fi # test -n "$CONFIG_FILES"
15575
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015576# Set up the scripts for CONFIG_HEADERS section.
15577# No need to generate them if there are no CONFIG_HEADERS.
15578# This happens for instance with `./config.status Makefile'.
15579if test -n "$CONFIG_HEADERS"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +010015580cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015581BEGIN {
15582_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000015583
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015584# Transform confdefs.h into an awk script `defines.awk', embedded as
15585# here-document in config.status, that substitutes the proper values into
15586# config.h.in to produce config.h.
15587
15588# Create a delimiter string that does not exist in confdefs.h, to ease
15589# handling of long lines.
15590ac_delim='%!_!# '
15591for ac_last_try in false false :; do
Matthias Klose3cef2a92012-03-14 23:39:33 +010015592 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
15593 if test -z "$ac_tt"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015594 break
15595 elif $ac_last_try; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015596 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015597 else
15598 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
15599 fi
15600done
15601
15602# For the awk script, D is an array of macro values keyed by name,
15603# likewise P contains macro parameters if any. Preserve backslash
15604# newline sequences.
15605
15606ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
15607sed -n '
15608s/.\{148\}/&'"$ac_delim"'/g
15609t rset
15610:rset
15611s/^[ ]*#[ ]*define[ ][ ]*/ /
15612t def
15613d
15614:def
15615s/\\$//
15616t bsnl
15617s/["\\]/\\&/g
15618s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
15619D["\1"]=" \3"/p
15620s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
15621d
15622:bsnl
15623s/["\\]/\\&/g
15624s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
15625D["\1"]=" \3\\\\\\n"\\/p
15626t cont
15627s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
15628t cont
15629d
15630:cont
15631n
15632s/.\{148\}/&'"$ac_delim"'/g
15633t clear
15634:clear
15635s/\\$//
15636t bsnlc
15637s/["\\]/\\&/g; s/^/"/; s/$/"/p
15638d
15639:bsnlc
15640s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
15641b cont
15642' <confdefs.h | sed '
15643s/'"$ac_delim"'/"\\\
15644"/g' >>$CONFIG_STATUS || ac_write_fail=1
15645
15646cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15647 for (key in D) D_is_set[key] = 1
15648 FS = ""
15649}
15650/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
15651 line = \$ 0
15652 split(line, arg, " ")
15653 if (arg[1] == "#") {
15654 defundef = arg[2]
15655 mac1 = arg[3]
15656 } else {
15657 defundef = substr(arg[1], 2)
15658 mac1 = arg[2]
15659 }
15660 split(mac1, mac2, "(") #)
15661 macro = mac2[1]
15662 prefix = substr(line, 1, index(line, defundef) - 1)
15663 if (D_is_set[macro]) {
15664 # Preserve the white space surrounding the "#".
15665 print prefix "define", macro P[macro] D[macro]
15666 next
15667 } else {
15668 # Replace #undef with comments. This is necessary, for example,
15669 # in the case of _POSIX_SOURCE, which is predefined and required
15670 # on some systems where configure will not decide to define it.
15671 if (defundef == "undef") {
15672 print "/*", prefix defundef, macro, "*/"
15673 next
15674 }
15675 }
15676}
15677{ print }
15678_ACAWK
15679_ACEOF
15680cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015681 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015682fi # test -n "$CONFIG_HEADERS"
15683
15684
15685eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
15686shift
15687for ac_tag
Martin v. Löwiseba40652007-08-30 20:10:57 +000015688do
15689 case $ac_tag in
15690 :[FHLC]) ac_mode=$ac_tag; continue;;
15691 esac
15692 case $ac_mode$ac_tag in
15693 :[FHL]*:*);;
Matthias Klose3cef2a92012-03-14 23:39:33 +010015694 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015695 :[FH]-) ac_tag=-:-;;
15696 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
15697 esac
15698 ac_save_IFS=$IFS
15699 IFS=:
15700 set x $ac_tag
15701 IFS=$ac_save_IFS
15702 shift
15703 ac_file=$1
15704 shift
15705
15706 case $ac_mode in
15707 :L) ac_source=$1;;
15708 :[FH])
15709 ac_file_inputs=
15710 for ac_f
15711 do
15712 case $ac_f in
Matthias Klose3cef2a92012-03-14 23:39:33 +010015713 -) ac_f="$ac_tmp/stdin";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015714 *) # Look for the file first in the build tree, then in the source tree
15715 # (if the path is not absolute). The absolute path cannot be DOS-style,
15716 # because $ac_f cannot contain `:'.
15717 test -f "$ac_f" ||
15718 case $ac_f in
15719 [\\/$]*) false;;
15720 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
15721 esac ||
Matthias Klose3cef2a92012-03-14 23:39:33 +010015722 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015723 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015724 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
15725 as_fn_append ac_file_inputs " '$ac_f'"
Martin v. Löwiseba40652007-08-30 20:10:57 +000015726 done
15727
15728 # Let's still pretend it is `configure' which instantiates (i.e., don't
15729 # use $as_me), people would be surprised to read:
15730 # /* config.h. Generated by config.status. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015731 configure_input='Generated from '`
15732 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
15733 `' by configure.'
Martin v. Löwiseba40652007-08-30 20:10:57 +000015734 if test x"$ac_file" != x-; then
15735 configure_input="$ac_file. $configure_input"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015736 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
15737$as_echo "$as_me: creating $ac_file" >&6;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000015738 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015739 # Neutralize special characters interpreted by sed in replacement strings.
15740 case $configure_input in #(
15741 *\&* | *\|* | *\\* )
15742 ac_sed_conf_input=`$as_echo "$configure_input" |
15743 sed 's/[\\\\&|]/\\\\&/g'`;; #(
15744 *) ac_sed_conf_input=$configure_input;;
15745 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000015746
15747 case $ac_tag in
Matthias Klose3cef2a92012-03-14 23:39:33 +010015748 *:-:* | *:-) cat >"$ac_tmp/stdin" \
15749 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015750 esac
15751 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015752 esac
15753
Martin v. Löwiseba40652007-08-30 20:10:57 +000015754 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000015755$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015756 X"$ac_file" : 'X\(//\)[^/]' \| \
15757 X"$ac_file" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000015758 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015759$as_echo X"$ac_file" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000015760 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15761 s//\1/
15762 q
15763 }
15764 /^X\(\/\/\)[^/].*/{
15765 s//\1/
15766 q
15767 }
15768 /^X\(\/\/\)$/{
15769 s//\1/
15770 q
15771 }
15772 /^X\(\/\).*/{
15773 s//\1/
15774 q
15775 }
15776 s/.*/./; q'`
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015777 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000015778 ac_builddir=.
15779
Martin v. Löwiseba40652007-08-30 20:10:57 +000015780case "$ac_dir" in
15781.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
15782*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015783 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015784 # A ".." for each directory in $ac_dir_suffix.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015785 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015786 case $ac_top_builddir_sub in
15787 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
15788 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
15789 esac ;;
15790esac
15791ac_abs_top_builddir=$ac_pwd
15792ac_abs_builddir=$ac_pwd$ac_dir_suffix
15793# for backward compatibility:
15794ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000015795
15796case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +000015797 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000015798 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015799 ac_top_srcdir=$ac_top_builddir_sub
15800 ac_abs_top_srcdir=$ac_pwd ;;
15801 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000015802 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015803 ac_top_srcdir=$srcdir
15804 ac_abs_top_srcdir=$srcdir ;;
15805 *) # Relative name.
15806 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
15807 ac_top_srcdir=$ac_top_build_prefix$srcdir
15808 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015809esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000015810ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000015811
Martin v. Löwis11437992002-04-12 09:54:03 +000015812
Martin v. Löwiseba40652007-08-30 20:10:57 +000015813 case $ac_mode in
15814 :F)
15815 #
15816 # CONFIG_FILE
15817 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015818
15819 case $INSTALL in
15820 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015821 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015822 esac
Trent Nelsonf6407a12012-08-30 14:56:13 +000015823 ac_MKDIR_P=$MKDIR_P
15824 case $MKDIR_P in
15825 [\\/$]* | ?:[\\/]* ) ;;
15826 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
15827 esac
Brett Cannon19fab762007-06-02 03:02:29 +000015828_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000015829
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015830cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015831# If the template does not know about datarootdir, expand it.
15832# FIXME: This hack should be removed a few years after 2.60.
15833ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015834ac_sed_dataroot='
15835/datarootdir/ {
Martin v. Löwiseba40652007-08-30 20:10:57 +000015836 p
15837 q
15838}
15839/@datadir@/p
15840/@docdir@/p
15841/@infodir@/p
15842/@localedir@/p
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015843/@mandir@/p'
15844case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Martin v. Löwiseba40652007-08-30 20:10:57 +000015845*datarootdir*) ac_datarootdir_seen=yes;;
15846*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015847 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
15848$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000015849_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015850cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015851 ac_datarootdir_hack='
15852 s&@datadir@&$datadir&g
15853 s&@docdir@&$docdir&g
15854 s&@infodir@&$infodir&g
15855 s&@localedir@&$localedir&g
15856 s&@mandir@&$mandir&g
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015857 s&\\\${datarootdir}&$datarootdir&g' ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015858esac
15859_ACEOF
15860
15861# Neutralize VPATH when `$srcdir' = `.'.
15862# Shell code in configure.ac might set extrasub.
15863# FIXME: do we really want to maintain this feature?
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015864cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15865ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000015866$extrasub
15867_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015868cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015869:t
15870/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015871s|@configure_input@|$ac_sed_conf_input|;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000015872s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015873s&@top_build_prefix@&$ac_top_build_prefix&;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000015874s&@srcdir@&$ac_srcdir&;t t
15875s&@abs_srcdir@&$ac_abs_srcdir&;t t
15876s&@top_srcdir@&$ac_top_srcdir&;t t
15877s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
15878s&@builddir@&$ac_builddir&;t t
15879s&@abs_builddir@&$ac_abs_builddir&;t t
15880s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
15881s&@INSTALL@&$ac_INSTALL&;t t
Trent Nelsonf6407a12012-08-30 14:56:13 +000015882s&@MKDIR_P@&$ac_MKDIR_P&;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000015883$ac_datarootdir_hack
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015884"
Matthias Klose3cef2a92012-03-14 23:39:33 +010015885eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
15886 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015887
Martin v. Löwiseba40652007-08-30 20:10:57 +000015888test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Matthias Klose3cef2a92012-03-14 23:39:33 +010015889 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
15890 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
15891 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015892 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015893which seems to be undefined. Please make sure it is defined" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015894$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015895which seems to be undefined. Please make sure it is defined" >&2;}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015896
Matthias Klose3cef2a92012-03-14 23:39:33 +010015897 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000015898 case $ac_file in
Matthias Klose3cef2a92012-03-14 23:39:33 +010015899 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
15900 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015901 esac \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015902 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015903 ;;
15904 :H)
15905 #
15906 # CONFIG_HEADER
15907 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015908 if test x"$ac_file" != x-; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015909 {
15910 $as_echo "/* $configure_input */" \
Matthias Klose3cef2a92012-03-14 23:39:33 +010015911 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
15912 } >"$ac_tmp/config.h" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015913 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Matthias Klose3cef2a92012-03-14 23:39:33 +010015914 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015915 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
15916$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015917 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015918 rm -f "$ac_file"
Matthias Klose3cef2a92012-03-14 23:39:33 +010015919 mv "$ac_tmp/config.h" "$ac_file" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015920 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015921 fi
15922 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015923 $as_echo "/* $configure_input */" \
Matthias Klose3cef2a92012-03-14 23:39:33 +010015924 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015925 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015926 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015927 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015928
Martin v. Löwiseba40652007-08-30 20:10:57 +000015929
15930 esac
15931
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000015932
15933 case $ac_file$ac_mode in
15934 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
15935
15936 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000015937done # for ac_tag
15938
Guido van Rossum627b2d71993-12-24 10:39:16 +000015939
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015940as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000015941_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015942ac_clean_files=$ac_clean_files_save
15943
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015944test $ac_write_fail = 0 ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015945 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015946
Martin v. Löwis11437992002-04-12 09:54:03 +000015947
15948# configure is writing to config.log, and then calls config.status.
15949# config.status does its own redirection, appending to config.log.
15950# Unfortunately, on DOS this fails, as config.log is still kept open
15951# by configure, so config.status won't be able to write to it; its
15952# output is simply discarded. So we exec the FD to /dev/null,
15953# effectively closing config.log, so it can be properly (re)opened and
15954# appended to by config.status. When coming back to configure, we
15955# need to make the FD available again.
15956if test "$no_create" != yes; then
15957 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000015958 ac_config_status_args=
15959 test "$silent" = yes &&
15960 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000015961 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000015962 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000015963 exec 5>>config.log
15964 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
15965 # would make configure fail if this is the last instruction.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015966 $ac_cs_success || as_fn_exit 1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015967fi
15968if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
15969 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
15970$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015971fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000015972
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015973
Martin v. Löwisf7afe952006-04-14 15:16:15 +000015974echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015975if test ! -f Modules/Setup
15976then
15977 cp $srcdir/Modules/Setup.dist Modules/Setup
15978fi
15979
Martin v. Löwisf7afe952006-04-14 15:16:15 +000015980echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015981if test ! -f Modules/Setup.local
15982then
15983 echo "# Edit this file for local setup changes" >Modules/Setup.local
15984fi
15985
15986echo "creating Makefile"
15987$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
15988 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000015989 Modules/Setup.local Modules/Setup
Skip Montanaro89e975f2007-08-22 19:05:21 +000015990
15991case $ac_sys_system in
15992BeOS)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015993 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000015994
15995 Support for BeOS is deprecated as of Python 2.6.
15996 See PEP 11 for the gory details.
15997 " >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015998$as_echo "$as_me: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000015999
16000 Support for BeOS is deprecated as of Python 2.6.
16001 See PEP 11 for the gory details.
16002 " >&2;}
16003 ;;
16004*) ;;
16005esac
16006
Neil Schemenauerc761fc82001-02-19 04:50:49 +000016007mv config.c Modules