blob: 133c88b59593e383d33d0f8c2e42e2a586cccc1c [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 \
Benjamin Peterson27c269a2014-12-26 11:09:00 -060010199 gai_strerror getentropy getgroups getlogin getloadavg getpeername getpgid \
10200 getpid \
Martin v. Löwis50ea4562009-11-27 13:56:01 +000010201 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Benjamin Petersond16e01c2014-02-04 10:20:26 -050010202 initgroups kill killpg lchmod lchown lstat mkfifo mknod mktime mmap \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000010203 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000010204 putenv readlink realpath \
Jesse Noller355b1262009-04-02 00:03:28 +000010205 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
10206 setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000010207 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Martin v. Löwis50ea4562009-11-27 13:56:01 +000010208 setlocale setregid setreuid setresuid setresgid \
10209 setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +000010210 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000010211 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Neal Norwitz05a45592006-03-20 06:30:08 +000010212 truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010213do :
10214 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10215ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010216if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010217 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010218#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010219_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010220
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010221fi
10222done
10223
Michael W. Hudson54241132001-12-07 15:38:26 +000010224
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010225# For some functions, having a definition is not sufficient, since
10226# we want to take their address.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
10228$as_echo_n "checking for chroot... " >&6; }
10229cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010230/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010231#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010232int
10233main ()
10234{
10235void *x=chroot
10236 ;
10237 return 0;
10238}
10239_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010240if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010241
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010242$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010243
Matthias Klosec511b472010-05-08 11:01:39 +000010244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010245$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010246else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10248$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010249
10250fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010251rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
10253$as_echo_n "checking for link... " >&6; }
10254cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010255/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010256#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010257int
10258main ()
10259{
10260void *x=link
10261 ;
10262 return 0;
10263}
10264_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010265if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010266
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010267$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010268
Matthias Klosec511b472010-05-08 11:01:39 +000010269 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010270$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010271else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10273$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010274
10275fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010276rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
10278$as_echo_n "checking for symlink... " >&6; }
10279cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010280/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010281#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010282int
10283main ()
10284{
10285void *x=symlink
10286 ;
10287 return 0;
10288}
10289_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010290if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010291
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010292$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010293
Matthias Klosec511b472010-05-08 11:01:39 +000010294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010295$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010296else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10298$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010299
10300fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010301rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
10303$as_echo_n "checking for fchdir... " >&6; }
10304cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010305/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010306#include <unistd.h>
10307int
10308main ()
10309{
10310void *x=fchdir
10311 ;
10312 return 0;
10313}
10314_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010315if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010316
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010317$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010318
Matthias Klosec511b472010-05-08 11:01:39 +000010319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010320$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010321else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10323$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010324
10325fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010326rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
10328$as_echo_n "checking for fsync... " >&6; }
10329cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010330/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010331#include <unistd.h>
10332int
10333main ()
10334{
10335void *x=fsync
10336 ;
10337 return 0;
10338}
10339_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010340if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010341
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010342$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010343
Matthias Klosec511b472010-05-08 11:01:39 +000010344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010345$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010346else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10348$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010349
10350fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010351rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
10353$as_echo_n "checking for fdatasync... " >&6; }
10354cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010355/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010356#include <unistd.h>
10357int
10358main ()
10359{
10360void *x=fdatasync
10361 ;
10362 return 0;
10363}
10364_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010365if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010366
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010367$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010368
Matthias Klosec511b472010-05-08 11:01:39 +000010369 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010370$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010371else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10373$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010374
10375fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010376rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
10378$as_echo_n "checking for epoll... " >&6; }
10379cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010380/* end confdefs.h. */
10381#include <sys/epoll.h>
10382int
10383main ()
10384{
10385void *x=epoll_create
10386 ;
10387 return 0;
10388}
10389_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010390if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010391
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010392$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010393
Matthias Klosec511b472010-05-08 11:01:39 +000010394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010395$as_echo "yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010396else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10398$as_echo "no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010399
10400fi
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010401rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010402{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
10403$as_echo_n "checking for kqueue... " >&6; }
10404cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010405/* end confdefs.h. */
10406
10407#include <sys/types.h>
10408#include <sys/event.h>
10409
10410int
10411main ()
10412{
10413int x=kqueue()
10414 ;
10415 return 0;
10416}
10417_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010418if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010419
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010420$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010421
Matthias Klosec511b472010-05-08 11:01:39 +000010422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010423$as_echo "yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010424else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10426$as_echo "no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010427
10428fi
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010429rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010430# On some systems (eg. FreeBSD 5), we would find a definition of the
10431# functions ctermid_r, setgroups in the library, but no prototype
10432# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
10433# address to avoid compiler warnings and potential miscompilations
10434# because of the missing prototypes.
10435
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
10437$as_echo_n "checking for ctermid_r... " >&6; }
10438cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010439/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010440
Martin v. Löwisd5843682002-11-21 20:41:28 +000010441#include <stdio.h>
10442
Martin v. Löwisd5843682002-11-21 20:41:28 +000010443int
10444main ()
10445{
10446void* p = ctermid_r
10447 ;
10448 return 0;
10449}
10450_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010451if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010452
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010453$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010454
Matthias Klosec511b472010-05-08 11:01:39 +000010455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010456$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010457else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10459$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010460
10461fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010462rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10463
Antoine Pitroub170f172010-09-10 18:47:36 +000010464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
10465$as_echo_n "checking for flock declaration... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010466if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010467 $as_echo_n "(cached) " >&6
10468else
10469 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010470/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010471#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010472int
10473main ()
10474{
10475void* p = flock
Antoine Pitroub170f172010-09-10 18:47:36 +000010476
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010477 ;
10478 return 0;
10479}
10480_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010481if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010482 ac_cv_flock_decl=yes
10483else
10484 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010485
10486fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010487rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitrou85729812010-09-07 14:55:24 +000010488
Antoine Pitroub170f172010-09-10 18:47:36 +000010489fi
10490{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
10491$as_echo "$ac_cv_flock_decl" >&6; }
10492if test "x${ac_cv_flock_decl}" = xyes; then
10493 for ac_func in flock
10494do :
10495 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010496if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010497 cat >>confdefs.h <<_ACEOF
10498#define HAVE_FLOCK 1
Antoine Pitrou85729812010-09-07 14:55:24 +000010499_ACEOF
Antoine Pitroub170f172010-09-10 18:47:36 +000010500
Antoine Pitrou85729812010-09-07 14:55:24 +000010501else
Antoine Pitroub170f172010-09-10 18:47:36 +000010502 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitrou85729812010-09-07 14:55:24 +000010503$as_echo_n "checking for flock in -lbsd... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010504if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitrou85729812010-09-07 14:55:24 +000010505 $as_echo_n "(cached) " >&6
10506else
10507 ac_check_lib_save_LIBS=$LIBS
10508LIBS="-lbsd $LIBS"
10509cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10510/* end confdefs.h. */
10511
10512/* Override any GCC internal prototype to avoid an error.
10513 Use char because int might match the return type of a GCC
10514 builtin and then its argument prototype would still apply. */
10515#ifdef __cplusplus
10516extern "C"
10517#endif
10518char flock ();
10519int
10520main ()
10521{
10522return flock ();
10523 ;
10524 return 0;
10525}
10526_ACEOF
10527if ac_fn_c_try_link "$LINENO"; then :
10528 ac_cv_lib_bsd_flock=yes
10529else
10530 ac_cv_lib_bsd_flock=no
10531fi
10532rm -f core conftest.err conftest.$ac_objext \
10533 conftest$ac_exeext conftest.$ac_ext
10534LIBS=$ac_check_lib_save_LIBS
10535fi
10536{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
10537$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010538if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010539 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitrou85729812010-09-07 14:55:24 +000010540
10541
10542$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
10543
10544
10545fi
10546
10547
10548fi
Antoine Pitroub170f172010-09-10 18:47:36 +000010549done
10550
Antoine Pitrou85729812010-09-07 14:55:24 +000010551fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010552
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010553{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
10554$as_echo_n "checking for getpagesize... " >&6; }
10555cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010556/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010557
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010558#include <unistd.h>
10559
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010560int
10561main ()
10562{
10563void* p = getpagesize
10564 ;
10565 return 0;
10566}
10567_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010568if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010569
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010570$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010571
Matthias Klosec511b472010-05-08 11:01:39 +000010572 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010573$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010574else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10576$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010577
10578fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010579rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010580
Charles-François Natali93a11752011-11-27 13:01:35 +010010581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
10582$as_echo_n "checking for broken unsetenv... " >&6; }
10583cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10584/* end confdefs.h. */
10585
10586#include <stdlib.h>
10587
10588int
10589main ()
10590{
10591int res = unsetenv("DUMMY")
10592 ;
10593 return 0;
10594}
10595_ACEOF
10596if ac_fn_c_try_compile "$LINENO"; then :
10597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10598$as_echo "no" >&6; }
10599else
10600
10601$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
10602
10603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10604$as_echo "yes" >&6; }
10605
10606fi
10607rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10608
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010609for ac_prog in true
10610do
10611 # Extract the first word of "$ac_prog", so it can be a program name with args.
10612set dummy $ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10614$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010615if ${ac_cv_prog_TRUE+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010616 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010617else
10618 if test -n "$TRUE"; then
10619 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
10620else
10621as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10622for as_dir in $PATH
10623do
10624 IFS=$as_save_IFS
10625 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010626 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +010010627 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010628 ac_cv_prog_TRUE="$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010629 $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 +000010630 break 2
10631 fi
10632done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010633 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000010634IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010635
10636fi
10637fi
10638TRUE=$ac_cv_prog_TRUE
10639if test -n "$TRUE"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
10641$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010642else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10644$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010645fi
10646
Martin v. Löwiseba40652007-08-30 20:10:57 +000010647
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010648 test -n "$TRUE" && break
10649done
10650test -n "$TRUE" || TRUE="/bin/true"
10651
10652
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
10654$as_echo_n "checking for inet_aton in -lc... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010655if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010656 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010657else
10658 ac_check_lib_save_LIBS=$LIBS
10659LIBS="-lc $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010660cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010661/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010662
Martin v. Löwiseba40652007-08-30 20:10:57 +000010663/* Override any GCC internal prototype to avoid an error.
10664 Use char because int might match the return type of a GCC
10665 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010666#ifdef __cplusplus
10667extern "C"
10668#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010669char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010670int
10671main ()
10672{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010673return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010674 ;
10675 return 0;
10676}
10677_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010678if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010679 ac_cv_lib_c_inet_aton=yes
10680else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010681 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010682fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010683rm -f core conftest.err conftest.$ac_objext \
10684 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010685LIBS=$ac_check_lib_save_LIBS
10686fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010687{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
10688$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010689if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010690 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010691else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010692 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
10693$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010694if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010695 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010696else
10697 ac_check_lib_save_LIBS=$LIBS
10698LIBS="-lresolv $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010699cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010700/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010701
Martin v. Löwiseba40652007-08-30 20:10:57 +000010702/* Override any GCC internal prototype to avoid an error.
10703 Use char because int might match the return type of a GCC
10704 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010705#ifdef __cplusplus
10706extern "C"
10707#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010708char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010709int
10710main ()
10711{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010712return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010713 ;
10714 return 0;
10715}
10716_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010717if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010718 ac_cv_lib_resolv_inet_aton=yes
10719else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010720 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010721fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010722rm -f core conftest.err conftest.$ac_objext \
10723 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010724LIBS=$ac_check_lib_save_LIBS
10725fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010726{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
10727$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010728if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010729 cat >>confdefs.h <<_ACEOF
10730#define HAVE_LIBRESOLV 1
10731_ACEOF
10732
10733 LIBS="-lresolv $LIBS"
10734
10735fi
10736
10737
10738fi
10739
10740
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010741# On Tru64, chflags seems to be present, but calling it will
10742# exit Python
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
10744$as_echo_n "checking for chflags... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010745if ${ac_cv_have_chflags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010746 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010747else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010748 if test "$cross_compiling" = yes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010749 ac_cv_have_chflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010750else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010751 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010752/* end confdefs.h. */
Ned Deily43e10542011-06-27 23:41:53 -070010753
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010754#include <sys/stat.h>
10755#include <unistd.h>
10756int main(int argc, char*argv[])
10757{
10758 if(chflags(argv[0], 0) != 0)
10759 return 1;
10760 return 0;
10761}
Ned Deily43e10542011-06-27 23:41:53 -070010762
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010763_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010764if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010765 ac_cv_have_chflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010766else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010767 ac_cv_have_chflags=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010768fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010769rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10770 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000010771fi
10772
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010773
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010774fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010775{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
10776$as_echo "$ac_cv_have_chflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000010777if test "$ac_cv_have_chflags" = cross ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010778 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010779if test "x$ac_cv_func_chflags" = xyes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010780 ac_cv_have_chflags="yes"
10781else
10782 ac_cv_have_chflags="no"
10783fi
10784
10785fi
10786if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010787
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010788$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010789
10790fi
10791
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
10793$as_echo_n "checking for lchflags... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010794if ${ac_cv_have_lchflags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010795 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010796else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010797 if test "$cross_compiling" = yes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010798 ac_cv_have_lchflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010799else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010800 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010801/* end confdefs.h. */
Ned Deily43e10542011-06-27 23:41:53 -070010802
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010803#include <sys/stat.h>
10804#include <unistd.h>
10805int main(int argc, char*argv[])
10806{
10807 if(lchflags(argv[0], 0) != 0)
10808 return 1;
10809 return 0;
10810}
Ned Deily43e10542011-06-27 23:41:53 -070010811
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010812_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010813if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010814 ac_cv_have_lchflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010815else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010816 ac_cv_have_lchflags=no
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010817fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010818rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10819 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010820fi
10821
10822
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010823fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010824{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
10825$as_echo "$ac_cv_have_lchflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000010826if test "$ac_cv_have_lchflags" = cross ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010827 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010828if test "x$ac_cv_func_lchflags" = xyes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010829 ac_cv_have_lchflags="yes"
10830else
10831 ac_cv_have_lchflags="no"
10832fi
10833
10834fi
10835if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010836
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010837$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010838
10839fi
10840
Ronald Oussorenf8752642006-07-06 10:13:35 +000010841case $ac_sys_system/$ac_sys_release in
10842Darwin/*)
10843 _CUR_CFLAGS="${CFLAGS}"
10844 _CUR_LDFLAGS="${LDFLAGS}"
10845 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
10846 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
10847 ;;
10848esac
10849
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
10851$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010852if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010853 $as_echo_n "(cached) " >&6
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010854else
10855 ac_check_lib_save_LIBS=$LIBS
10856LIBS="-lz $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010857cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010858/* end confdefs.h. */
10859
Martin v. Löwiseba40652007-08-30 20:10:57 +000010860/* Override any GCC internal prototype to avoid an error.
10861 Use char because int might match the return type of a GCC
10862 builtin and then its argument prototype would still apply. */
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010863#ifdef __cplusplus
10864extern "C"
10865#endif
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010866char inflateCopy ();
10867int
10868main ()
10869{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010870return inflateCopy ();
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010871 ;
10872 return 0;
10873}
10874_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010875if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010876 ac_cv_lib_z_inflateCopy=yes
10877else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010878 ac_cv_lib_z_inflateCopy=no
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010879fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010880rm -f core conftest.err conftest.$ac_objext \
10881 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010882LIBS=$ac_check_lib_save_LIBS
10883fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010884{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
10885$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010886if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010887
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010888$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010889
10890fi
10891
10892
Ronald Oussorenf8752642006-07-06 10:13:35 +000010893case $ac_sys_system/$ac_sys_release in
10894Darwin/*)
10895 CFLAGS="${_CUR_CFLAGS}"
10896 LDFLAGS="${_CUR_LDFLAGS}"
10897 ;;
10898esac
10899
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
10901$as_echo_n "checking for hstrerror... " >&6; }
10902cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010903/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010904
Martin v. Löwise9416172003-05-03 10:12:45 +000010905#include <netdb.h>
10906
Martin v. Löwise9416172003-05-03 10:12:45 +000010907int
10908main ()
10909{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010910void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010911 ;
10912 return 0;
10913}
10914_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010915if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010916
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010917$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010918
Matthias Klosec511b472010-05-08 11:01:39 +000010919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010920$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010921else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10923$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010924
10925fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010926rm -f core conftest.err conftest.$ac_objext \
10927 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010928
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010929{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
10930$as_echo_n "checking for inet_aton... " >&6; }
10931cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010932/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010933
Martin v. Löwis86d66262006-02-17 08:40:11 +000010934#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010935#include <sys/socket.h>
10936#include <netinet/in.h>
10937#include <arpa/inet.h>
10938
Martin v. Löwise9416172003-05-03 10:12:45 +000010939int
10940main ()
10941{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010942void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010943 ;
10944 return 0;
10945}
10946_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010947if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010948
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010949$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010950
Matthias Klosec511b472010-05-08 11:01:39 +000010951 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010952$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010953else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10955$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010956
10957fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010958rm -f core conftest.err conftest.$ac_objext \
10959 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010960
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
10962$as_echo_n "checking for inet_pton... " >&6; }
10963cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010964/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010965
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010966#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010967#include <sys/socket.h>
10968#include <netinet/in.h>
10969#include <arpa/inet.h>
10970
Martin v. Löwise9416172003-05-03 10:12:45 +000010971int
10972main ()
10973{
10974void* p = inet_pton
10975 ;
10976 return 0;
10977}
10978_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010979if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010980
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010981$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010982
Matthias Klosec511b472010-05-08 11:01:39 +000010983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010984$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010985else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10987$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010988
10989fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010990rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000010991
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010992# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
10994$as_echo_n "checking for setgroups... " >&6; }
10995cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010996/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010997
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010998#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010999#ifdef HAVE_GRP_H
11000#include <grp.h>
11001#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000011002
Martin v. Löwisd5843682002-11-21 20:41:28 +000011003int
11004main ()
11005{
11006void* p = setgroups
11007 ;
11008 return 0;
11009}
11010_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011011if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011012
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011013$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011014
Matthias Klosec511b472010-05-08 11:01:39 +000011015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011016$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011017else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11019$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011020
11021fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011022rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000011023
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011024# check for openpty and forkpty
11025
11026for ac_func in openpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011027do :
11028 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011029if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011030 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011031#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011032_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011033
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011034else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011035 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
11036$as_echo_n "checking for openpty in -lutil... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011037if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011038 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011039else
Martin v. Löwis11437992002-04-12 09:54:03 +000011040 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011041LIBS="-lutil $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011042cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011043/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011044
Martin v. Löwiseba40652007-08-30 20:10:57 +000011045/* Override any GCC internal prototype to avoid an error.
11046 Use char because int might match the return type of a GCC
11047 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011048#ifdef __cplusplus
11049extern "C"
11050#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011051char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011052int
11053main ()
11054{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011055return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011056 ;
11057 return 0;
11058}
11059_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011060if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011061 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011062else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011063 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011064fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011065rm -f core conftest.err conftest.$ac_objext \
11066 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011067LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011068fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011069{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
11070$as_echo "$ac_cv_lib_util_openpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011071if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011072 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011073 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011074else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011075 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
11076$as_echo_n "checking for openpty in -lbsd... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011077if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011078 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011079else
11080 ac_check_lib_save_LIBS=$LIBS
11081LIBS="-lbsd $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011082cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011083/* end confdefs.h. */
11084
Martin v. Löwiseba40652007-08-30 20:10:57 +000011085/* Override any GCC internal prototype to avoid an error.
11086 Use char because int might match the return type of a GCC
11087 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011088#ifdef __cplusplus
11089extern "C"
11090#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011091char openpty ();
11092int
11093main ()
11094{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011095return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011096 ;
11097 return 0;
11098}
11099_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011100if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011101 ac_cv_lib_bsd_openpty=yes
11102else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011103 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011104fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011105rm -f core conftest.err conftest.$ac_objext \
11106 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011107LIBS=$ac_check_lib_save_LIBS
11108fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011109{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
11110$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011111if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011112 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011113 LIBS="$LIBS -lbsd"
11114fi
11115
11116
11117fi
11118
Fred Drake8cef4cf2000-06-28 16:40:38 +000011119
11120fi
11121done
11122
11123for ac_func in forkpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011124do :
11125 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011126if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011127 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011128#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011129_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011130
Fred Drake8cef4cf2000-06-28 16:40:38 +000011131else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011132 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
11133$as_echo_n "checking for forkpty in -lutil... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011134if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011135 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011136else
Martin v. Löwis11437992002-04-12 09:54:03 +000011137 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011138LIBS="-lutil $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011139cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011140/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011141
Martin v. Löwiseba40652007-08-30 20:10:57 +000011142/* Override any GCC internal prototype to avoid an error.
11143 Use char because int might match the return type of a GCC
11144 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011145#ifdef __cplusplus
11146extern "C"
11147#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011148char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011149int
11150main ()
11151{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011152return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011153 ;
11154 return 0;
11155}
11156_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011157if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011158 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011159else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011160 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011161fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011162rm -f core conftest.err conftest.$ac_objext \
11163 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011164LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011165fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011166{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
11167$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011168if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011169 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011170 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011171else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011172 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
11173$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011174if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011175 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011176else
11177 ac_check_lib_save_LIBS=$LIBS
11178LIBS="-lbsd $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011179cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011180/* end confdefs.h. */
11181
Martin v. Löwiseba40652007-08-30 20:10:57 +000011182/* Override any GCC internal prototype to avoid an error.
11183 Use char because int might match the return type of a GCC
11184 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011185#ifdef __cplusplus
11186extern "C"
11187#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011188char forkpty ();
11189int
11190main ()
11191{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011192return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011193 ;
11194 return 0;
11195}
11196_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011197if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011198 ac_cv_lib_bsd_forkpty=yes
11199else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011200 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011201fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011202rm -f core conftest.err conftest.$ac_objext \
11203 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011204LIBS=$ac_check_lib_save_LIBS
11205fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011206{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
11207$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011208if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011209 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011210 LIBS="$LIBS -lbsd"
11211fi
11212
11213
11214fi
11215
Fred Drake8cef4cf2000-06-28 16:40:38 +000011216
11217fi
11218done
11219
Jack Jansendd19cf82001-12-06 22:36:17 +000011220
Brett Cannonaa5778d2008-03-18 04:09:00 +000011221# Stuff for expat.
Brett Cannonaa5778d2008-03-18 04:09:00 +000011222for ac_func in memmove
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011223do :
11224 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011225if test "x$ac_cv_func_memmove" = xyes; then :
Brett Cannonaa5778d2008-03-18 04:09:00 +000011226 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011227#define HAVE_MEMMOVE 1
Brett Cannonaa5778d2008-03-18 04:09:00 +000011228_ACEOF
11229
11230fi
11231done
11232
11233
Michael W. Hudson54241132001-12-07 15:38:26 +000011234# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000011235for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011236do :
11237 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11238ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011239if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011240 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011241#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011242_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000011243
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011244fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000011245done
11246
Michael W. Hudson54241132001-12-07 15:38:26 +000011247
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011248ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011249if test "x$ac_cv_func_dup2" = xyes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011250 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000011251
Martin v. Löwis1142de32002-03-29 16:28:31 +000011252else
Martin v. Löwiseba40652007-08-30 20:10:57 +000011253 case " $LIBOBJS " in
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011254 *" dup2.$ac_objext "* ) ;;
11255 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Martin v. Löwiseba40652007-08-30 20:10:57 +000011256 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011257esac
11258
Martin v. Löwis1142de32002-03-29 16:28:31 +000011259fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011260
11261ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011262if test "x$ac_cv_func_getcwd" = xyes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011263 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
11264
11265else
11266 case " $LIBOBJS " in
11267 *" getcwd.$ac_objext "* ) ;;
11268 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
11269 ;;
11270esac
11271
11272fi
11273
11274ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011275if test "x$ac_cv_func_strdup" = xyes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011276 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
11277
11278else
11279 case " $LIBOBJS " in
11280 *" strdup.$ac_objext "* ) ;;
11281 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
11282 ;;
11283esac
11284
11285fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000011286
11287
11288for ac_func in getpgrp
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011289do :
11290 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011291if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011292 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011293#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011294_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011295 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011296/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011297#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011298int
11299main ()
11300{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011301getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011302 ;
11303 return 0;
11304}
11305_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011306if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011307
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011308$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011309
Guido van Rossum627b2d71993-12-24 10:39:16 +000011310fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011311rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011312
Guido van Rossum627b2d71993-12-24 10:39:16 +000011313fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011314done
Guido van Rossum627b2d71993-12-24 10:39:16 +000011315
Jack Jansen150753c2003-03-29 22:07:47 +000011316for ac_func in setpgrp
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011317do :
11318 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011319if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000011320 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011321#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000011322_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011323 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011324/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000011325#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000011326int
11327main ()
11328{
11329setpgrp(0,0);
11330 ;
11331 return 0;
11332}
11333_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011334if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011335
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011336$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011337
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011338fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011339rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000011340
11341fi
11342done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011343
Thomas Wouters3a584202000-08-05 23:28:51 +000011344for ac_func in gettimeofday
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011345do :
11346 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011347if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011348 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011349#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011350_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011351 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011352/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011353#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011354int
11355main ()
11356{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011357gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011358 ;
11359 return 0;
11360}
11361_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011362if ac_fn_c_try_compile "$LINENO"; then :
11363
Guido van Rossum627b2d71993-12-24 10:39:16 +000011364else
Skip Montanaro6dead952003-09-25 14:50:04 +000011365
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011366$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011367
Martin v. Löwis11437992002-04-12 09:54:03 +000011368
Guido van Rossum627b2d71993-12-24 10:39:16 +000011369fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011370rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011371
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011372fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011373done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011374
Michael W. Hudson54241132001-12-07 15:38:26 +000011375
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
11377$as_echo_n "checking for major... " >&6; }
11378cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011379/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011380
Neal Norwitz6eb37f02003-02-23 23:28:15 +000011381#if defined(MAJOR_IN_MKDEV)
11382#include <sys/mkdev.h>
11383#elif defined(MAJOR_IN_SYSMACROS)
11384#include <sys/sysmacros.h>
11385#else
11386#include <sys/types.h>
11387#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011388
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011389int
11390main ()
11391{
11392
11393 makedev(major(0),minor(0));
11394
11395 ;
11396 return 0;
11397}
11398_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011399if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011400
11401
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011402$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011403
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11405$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011406
11407else
Skip Montanaro6dead952003-09-25 14:50:04 +000011408
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11410$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011411
11412fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011413rm -f core conftest.err conftest.$ac_objext \
11414 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011415
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011416# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000011417# for [no]getaddrinfo in netdb.h.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
11419$as_echo_n "checking for getaddrinfo... " >&6; }
11420cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011421/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011422
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011423#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011424#include <sys/socket.h>
11425#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011426#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011427
Martin v. Löwis11437992002-04-12 09:54:03 +000011428int
11429main ()
11430{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011431getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000011432 ;
11433 return 0;
11434}
11435_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011436if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011437 have_getaddrinfo=yes
11438else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011439 have_getaddrinfo=no
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011440fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011441rm -f core conftest.err conftest.$ac_objext \
11442 conftest$ac_exeext conftest.$ac_ext
11443{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
11444$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011445if test $have_getaddrinfo = yes
11446then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011447 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
11448$as_echo_n "checking getaddrinfo bug... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011449 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011450 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011451else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011452 if test "$cross_compiling" = yes; then :
doko@python.orgd65e2ba2013-01-31 23:52:03 +010011453
11454if test "${enable_ipv6+set}" = set; then
11455 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
11456else
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011457 ac_cv_buggy_getaddrinfo=yes
doko@python.orgd65e2ba2013-01-31 23:52:03 +010011458fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011459else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011460 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011461/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011462
Stefan Krah0afe4e42012-11-22 23:56:51 +010011463#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011464#include <sys/types.h>
11465#include <netdb.h>
11466#include <string.h>
11467#include <sys/socket.h>
11468#include <netinet/in.h>
11469
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011470int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011471{
11472 int passive, gaierr, inet4 = 0, inet6 = 0;
11473 struct addrinfo hints, *ai, *aitop;
11474 char straddr[INET6_ADDRSTRLEN], strport[16];
11475
11476 for (passive = 0; passive <= 1; passive++) {
11477 memset(&hints, 0, sizeof(hints));
11478 hints.ai_family = AF_UNSPEC;
11479 hints.ai_flags = passive ? AI_PASSIVE : 0;
11480 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000011481 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011482 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
11483 (void)gai_strerror(gaierr);
11484 goto bad;
11485 }
11486 for (ai = aitop; ai; ai = ai->ai_next) {
11487 if (ai->ai_addr == NULL ||
11488 ai->ai_addrlen == 0 ||
11489 getnameinfo(ai->ai_addr, ai->ai_addrlen,
11490 straddr, sizeof(straddr), strport, sizeof(strport),
11491 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
11492 goto bad;
11493 }
11494 switch (ai->ai_family) {
11495 case AF_INET:
11496 if (strcmp(strport, "54321") != 0) {
11497 goto bad;
11498 }
11499 if (passive) {
11500 if (strcmp(straddr, "0.0.0.0") != 0) {
11501 goto bad;
11502 }
11503 } else {
11504 if (strcmp(straddr, "127.0.0.1") != 0) {
11505 goto bad;
11506 }
11507 }
11508 inet4++;
11509 break;
11510 case AF_INET6:
11511 if (strcmp(strport, "54321") != 0) {
11512 goto bad;
11513 }
11514 if (passive) {
11515 if (strcmp(straddr, "::") != 0) {
11516 goto bad;
11517 }
11518 } else {
11519 if (strcmp(straddr, "::1") != 0) {
11520 goto bad;
11521 }
11522 }
11523 inet6++;
11524 break;
11525 case AF_UNSPEC:
11526 goto bad;
11527 break;
11528 default:
11529 /* another family support? */
11530 break;
11531 }
11532 }
11533 }
11534
11535 if (!(inet4 == 0 || inet4 == 2))
11536 goto bad;
11537 if (!(inet6 == 0 || inet6 == 2))
11538 goto bad;
11539
11540 if (aitop)
11541 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011542 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011543
11544 bad:
11545 if (aitop)
11546 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011547 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011548}
11549
Martin v. Löwis11437992002-04-12 09:54:03 +000011550_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011551if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011552 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011553else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011554 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011555fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011556rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11557 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011558fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011559
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011560fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011561
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011562fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011563
Benjamin Peterson75fed812010-11-01 01:47:19 +000011564{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
11565$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
11566
Mark Dickinson0ef0b912009-12-31 21:11:48 +000011567if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011568then
11569 if test $ipv6 = yes
11570 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011571 echo 'Fatal: You must get working getaddrinfo() function.'
11572 echo ' or you can specify "--disable-ipv6"'.
11573 exit 1
11574 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011575else
Martin v. Löwis11437992002-04-12 09:54:03 +000011576
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011577$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011578
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011579fi
Benjamin Peterson75fed812010-11-01 01:47:19 +000011580
Jack Jansen9a66b6d2001-08-08 13:56:14 +000011581for ac_func in getnameinfo
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011582do :
11583 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011584if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011585 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011586#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011587_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011588
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011589fi
11590done
11591
Michael W. Hudson54241132001-12-07 15:38:26 +000011592
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011593# checks for structures
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
11595$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011596if ${ac_cv_header_time+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011597 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011598else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011599 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011600/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011601#include <sys/types.h>
11602#include <sys/time.h>
11603#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011604
Martin v. Löwis11437992002-04-12 09:54:03 +000011605int
11606main ()
11607{
11608if ((struct tm *) 0)
11609return 0;
11610 ;
11611 return 0;
11612}
11613_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011614if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011615 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011616else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011617 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011618fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011619rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011620fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011621{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
11622$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011623if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011624
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011625$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011626
11627fi
11628
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
11630$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011631if ${ac_cv_struct_tm+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011632 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011633else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011634 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011635/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011636#include <sys/types.h>
11637#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011638
Martin v. Löwis11437992002-04-12 09:54:03 +000011639int
11640main ()
11641{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011642struct tm tm;
11643 int *p = &tm.tm_sec;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011644 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000011645 ;
11646 return 0;
11647}
11648_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011649if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011650 ac_cv_struct_tm=time.h
11651else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011652 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011653fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011654rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011655fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011656{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
11657$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011658if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011659
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011660$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011661
11662fi
11663
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011664ac_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 +000011665#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000011666
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011667"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011668if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011669
11670cat >>confdefs.h <<_ACEOF
11671#define HAVE_STRUCT_TM_TM_ZONE 1
11672_ACEOF
11673
11674
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011675fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011676
Martin v. Löwis11437992002-04-12 09:54:03 +000011677if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
11678
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011679$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011680
11681else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011682 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
11683"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011684if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011685 ac_have_decl=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000011686else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011687 ac_have_decl=0
Martin v. Löwiseba40652007-08-30 20:10:57 +000011688fi
11689
Martin v. Löwiseba40652007-08-30 20:10:57 +000011690cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011691#define HAVE_DECL_TZNAME $ac_have_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +000011692_ACEOF
11693
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011694 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
11695$as_echo_n "checking for tzname... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011696if ${ac_cv_var_tzname+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011697 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000011698else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011699 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011700/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011701#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000011702#if !HAVE_DECL_TZNAME
11703extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000011704#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011705
Martin v. Löwis11437992002-04-12 09:54:03 +000011706int
11707main ()
11708{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011709return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000011710 ;
11711 return 0;
11712}
11713_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011714if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011715 ac_cv_var_tzname=yes
11716else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011717 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011718fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011719rm -f core conftest.err conftest.$ac_objext \
11720 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000011721fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011722{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
11723$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011724 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011725
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011726$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011727
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011728 fi
11729fi
11730
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011731ac_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 +010011732if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011733
11734cat >>confdefs.h <<_ACEOF
11735#define HAVE_STRUCT_STAT_ST_RDEV 1
11736_ACEOF
11737
11738
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011739fi
11740
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011741ac_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 +010011742if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011743
Martin v. Löwis11437992002-04-12 09:54:03 +000011744cat >>confdefs.h <<_ACEOF
11745#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
11746_ACEOF
11747
11748
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011749fi
11750
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011751ac_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 +010011752if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000011753
11754cat >>confdefs.h <<_ACEOF
11755#define HAVE_STRUCT_STAT_ST_FLAGS 1
11756_ACEOF
11757
11758
11759fi
11760
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011761ac_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 +010011762if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011763
11764cat >>confdefs.h <<_ACEOF
11765#define HAVE_STRUCT_STAT_ST_GEN 1
11766_ACEOF
11767
11768
11769fi
11770
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011771ac_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 +010011772if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011773
11774cat >>confdefs.h <<_ACEOF
11775#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
11776_ACEOF
11777
11778
11779fi
11780
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011781ac_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 +010011782if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011783
Martin v. Löwis11437992002-04-12 09:54:03 +000011784cat >>confdefs.h <<_ACEOF
11785#define HAVE_STRUCT_STAT_ST_BLOCKS 1
11786_ACEOF
11787
11788
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011789$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011790
11791else
Martin v. Löwiseba40652007-08-30 20:10:57 +000011792 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000011793 *" fileblocks.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011794 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
11795 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011796esac
11797
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011798fi
11799
Michael W. Hudson54241132001-12-07 15:38:26 +000011800
Martin v. Löwis11437992002-04-12 09:54:03 +000011801
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
11803$as_echo_n "checking for time.h that defines altzone... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011804if ${ac_cv_header_time_altzone+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011805 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011806else
Matthias Klosec511b472010-05-08 11:01:39 +000011807
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011808 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011809/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011810#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011811int
11812main ()
11813{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011814return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000011815 ;
11816 return 0;
11817}
11818_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011819if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011820 ac_cv_header_time_altzone=yes
11821else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011822 ac_cv_header_time_altzone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011823fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011824rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosec511b472010-05-08 11:01:39 +000011825
Martin v. Löwiseba40652007-08-30 20:10:57 +000011826fi
11827
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011828{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
11829$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011830if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011831
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011832$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011833
11834fi
11835
Guido van Rossumda88dad1995-01-26 00:46:29 +000011836was_it_defined=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
11838$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
11839cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011840/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011841
11842#include <sys/types.h>
11843#include <sys/select.h>
11844#include <sys/time.h>
11845
Martin v. Löwis11437992002-04-12 09:54:03 +000011846int
11847main ()
11848{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011849;
Martin v. Löwis11437992002-04-12 09:54:03 +000011850 ;
11851 return 0;
11852}
11853_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011854if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011855
11856
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011857$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011858
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011859 was_it_defined=yes
11860
Martin v. Löwiseba40652007-08-30 20:10:57 +000011861fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011862rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011863{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
11864$as_echo "$was_it_defined" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011865
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
11867$as_echo_n "checking for addrinfo... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011868if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011869 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011870else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011871 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011872/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +000011873#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011874int
11875main ()
11876{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011877struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000011878 ;
11879 return 0;
11880}
11881_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011882if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011883 ac_cv_struct_addrinfo=yes
11884else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011885 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011886fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011887rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11888fi
11889
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011890{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
11891$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011892if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011893
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011894$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011895
11896fi
11897
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
11899$as_echo_n "checking for sockaddr_storage... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011900if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011901 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011902else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011903 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011904/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011905
11906# include <sys/types.h>
11907# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011908int
11909main ()
11910{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011911struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000011912 ;
11913 return 0;
11914}
11915_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011916if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011917 ac_cv_struct_sockaddr_storage=yes
11918else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011919 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011920fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011921rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11922fi
11923
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011924{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
11925$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011926if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011927
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011928$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011929
11930fi
11931
Guido van Rossum627b2d71993-12-24 10:39:16 +000011932# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000011933
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
11935$as_echo_n "checking whether char is unsigned... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011936if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011937 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000011938else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011939 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011940/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011941$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000011942int
11943main ()
11944{
11945static int test_array [1 - 2 * !(((char) -1) < 0)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +010011946test_array [0] = 0;
11947return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000011948
11949 ;
11950 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000011951}
Martin v. Löwis11437992002-04-12 09:54:03 +000011952_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011953if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000011954 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011955else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011956 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011957fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011958rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011959fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011960{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
11961$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011962if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011963 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011964
11965fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000011966
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11968$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011969if ${ac_cv_c_const+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011970 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011971else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011972 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011973/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011974
Martin v. Löwis11437992002-04-12 09:54:03 +000011975int
11976main ()
11977{
Charles-François Natalibe2b9072013-01-08 19:47:00 +010011978
Martin v. Löwis11437992002-04-12 09:54:03 +000011979#ifndef __cplusplus
Charles-François Natalibe2b9072013-01-08 19:47:00 +010011980 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011981 typedef int charset[2];
Charles-François Natalibe2b9072013-01-08 19:47:00 +010011982 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000011983 /* SunOS 4.1.1 cc rejects this. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000011984 char const *const *pcpcc;
11985 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011986 /* NEC SVR4.0.2 mips cc rejects this. */
11987 struct point {int x, y;};
11988 static struct point const zero = {0,0};
11989 /* AIX XL C 1.02.0.0 rejects this.
11990 It does not let you subtract one const X* pointer from another in
11991 an arm of an if-expression whose if-part is not a constant
11992 expression */
11993 const char *g = "string";
Martin v. Löwiseba40652007-08-30 20:10:57 +000011994 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011995 /* HPUX 7.0 cc rejects these. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000011996 ++pcpcc;
11997 ppc = (char**) pcpcc;
11998 pcpcc = (char const *const *) ppc;
Charles-François Natalibe2b9072013-01-08 19:47:00 +010011999 { /* SCO 3.2v4 cc rejects this sort of thing. */
12000 char tx;
12001 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000012002 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012003
Martin v. Löwis11437992002-04-12 09:54:03 +000012004 *t++ = 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012005 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012006 }
12007 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12008 int x[] = {25, 17};
12009 const int *foo = &x[0];
12010 ++foo;
12011 }
12012 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12013 typedef const int *iptr;
12014 iptr p = 0;
12015 ++p;
12016 }
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012017 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000012018 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012019 struct s { int j; const int *ap[3]; } bx;
12020 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000012021 }
12022 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12023 const int foo = 10;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012024 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012025 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012026 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000012027#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000012028
Martin v. Löwis11437992002-04-12 09:54:03 +000012029 ;
12030 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012031}
Martin v. Löwis11437992002-04-12 09:54:03 +000012032_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012033if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012034 ac_cv_c_const=yes
12035else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012036 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012037fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012038rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012039fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012040{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12041$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012042if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012043
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012044$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012045
12046fi
12047
Michael W. Hudson54241132001-12-07 15:38:26 +000012048
Guido van Rossumda88dad1995-01-26 00:46:29 +000012049works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
12051$as_echo_n "checking for working volatile... " >&6; }
12052cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012053/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012054
Martin v. Löwis11437992002-04-12 09:54:03 +000012055int
12056main ()
12057{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012058volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012059 ;
12060 return 0;
12061}
12062_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012063if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012064 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012065else
Skip Montanaro6dead952003-09-25 14:50:04 +000012066
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012067$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012068
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012069
Guido van Rossum627b2d71993-12-24 10:39:16 +000012070fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012071rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012072{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12073$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012074
Guido van Rossumda88dad1995-01-26 00:46:29 +000012075works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
12077$as_echo_n "checking for working signed char... " >&6; }
12078cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012079/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012080
Martin v. Löwis11437992002-04-12 09:54:03 +000012081int
12082main ()
12083{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012084signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000012085 ;
12086 return 0;
12087}
12088_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012089if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012090 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012091else
Skip Montanaro6dead952003-09-25 14:50:04 +000012092
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012093$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000012094
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012095
Guido van Rossum7f43da71994-08-01 12:15:30 +000012096fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012097rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012098{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12099$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012100
Guido van Rossumda88dad1995-01-26 00:46:29 +000012101have_prototypes=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
12103$as_echo_n "checking for prototypes... " >&6; }
12104cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012105/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012106int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012107int
12108main ()
12109{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012110return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000012111 ;
12112 return 0;
12113}
12114_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012115if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012116
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012117$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012118
Matthias Klosec511b472010-05-08 11:01:39 +000012119 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012120fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012121rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012122{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
12123$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012124
Guido van Rossumda88dad1995-01-26 00:46:29 +000012125works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
12127$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
12128cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012129/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012130
12131#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000012132int foo(int x, ...) {
12133 va_list va;
12134 va_start(va, x);
12135 va_arg(va, int);
12136 va_arg(va, char *);
12137 va_arg(va, double);
12138 return 0;
12139}
Guido van Rossum7f43da71994-08-01 12:15:30 +000012140
Martin v. Löwis11437992002-04-12 09:54:03 +000012141int
12142main ()
12143{
Guido van Rossum90eea071996-08-30 20:58:57 +000012144return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000012145 ;
12146 return 0;
12147}
12148_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012149if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012150
12151
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012152$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012153
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012154 works=yes
12155
Guido van Rossum627b2d71993-12-24 10:39:16 +000012156fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012157rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012158{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12159$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012160
Martin v. Löwisd6320502004-08-12 13:45:08 +000012161# check for socketpair
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
12163$as_echo_n "checking for socketpair... " >&6; }
12164cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012165/* end confdefs.h. */
12166
12167#include <sys/types.h>
12168#include <sys/socket.h>
12169
12170int
12171main ()
12172{
12173void *x=socketpair
12174 ;
12175 return 0;
12176}
12177_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012178if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000012179
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012180$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000012181
Matthias Klosec511b472010-05-08 11:01:39 +000012182 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012183$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012184else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012185 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12186$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012187
12188fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012189rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012190
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012191# check if sockaddr has sa_len member
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012192{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
12193$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
12194cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012195/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012196#include <sys/types.h>
12197#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012198int
12199main ()
12200{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012201struct sockaddr x;
12202x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012203 ;
12204 return 0;
12205}
12206_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012207if ac_fn_c_try_compile "$LINENO"; then :
12208 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12209$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012210
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012211$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012212
12213else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12215$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000012216
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012217fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012218rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012219
Guido van Rossumda88dad1995-01-26 00:46:29 +000012220va_list_is_array=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
12222$as_echo_n "checking whether va_list is an array... " >&6; }
12223cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012224/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012225
12226#ifdef HAVE_STDARG_PROTOTYPES
12227#include <stdarg.h>
12228#else
12229#include <varargs.h>
12230#endif
12231
Martin v. Löwis11437992002-04-12 09:54:03 +000012232int
12233main ()
12234{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012235va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000012236 ;
12237 return 0;
12238}
12239_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012240if ac_fn_c_try_compile "$LINENO"; then :
12241
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012242else
Skip Montanaro6dead952003-09-25 14:50:04 +000012243
Martin v. Löwis11437992002-04-12 09:54:03 +000012244
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012245$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012246
Guido van Rossumda88dad1995-01-26 00:46:29 +000012247 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012248
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012249fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012250rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012251{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
12252$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012253
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012254# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000012255
12256
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012257ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012258if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012259
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012260 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000012261
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012262 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
12263$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012264 OLD_CFLAGS=$CFLAGS
12265 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012266 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012267/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012268
12269# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012270
Martin v. Löwis11437992002-04-12 09:54:03 +000012271int
12272main ()
12273{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012274
12275 char *name;
12276 struct hostent *he, *res;
12277 char buffer[2048];
12278 int buflen = 2048;
12279 int h_errnop;
12280
12281 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012282
12283 ;
12284 return 0;
12285}
12286_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012287if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012288
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012289 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012290
Martin v. Löwis11437992002-04-12 09:54:03 +000012291
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012292$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012293
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12295$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012296
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012297else
Skip Montanaro6dead952003-09-25 14:50:04 +000012298
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12300$as_echo "no" >&6; }
12301 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
12302$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
12303 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012304/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012305
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012306# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012307
Martin v. Löwis11437992002-04-12 09:54:03 +000012308int
12309main ()
12310{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012311
12312 char *name;
12313 struct hostent *he;
Matthias Klosec511b472010-05-08 11:01:39 +000012314 char buffer[2048];
12315 int buflen = 2048;
12316 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012317
Matthias Klosec511b472010-05-08 11:01:39 +000012318 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012319
12320 ;
12321 return 0;
12322}
12323_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012324if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012325
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012326 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012327
Martin v. Löwis11437992002-04-12 09:54:03 +000012328
Matthias Klosec511b472010-05-08 11:01:39 +000012329$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012330
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12332$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012333
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012334else
Skip Montanaro6dead952003-09-25 14:50:04 +000012335
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12337$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000012338 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
12339$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
12340 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12341/* end confdefs.h. */
12342
12343# include <netdb.h>
12344
12345int
12346main ()
12347{
12348
12349 char *name;
12350 struct hostent *he;
12351 struct hostent_data data;
12352
12353 (void) gethostbyname_r(name, he, &data);
12354
12355 ;
12356 return 0;
12357}
12358_ACEOF
12359if ac_fn_c_try_compile "$LINENO"; then :
12360
12361 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
12362
12363
12364$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
12365
12366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12367$as_echo "yes" >&6; }
12368
12369else
12370
12371 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12372$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012373
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012374fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012375rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012376
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012377fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012378rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012379
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012380fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012381rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012382 CFLAGS=$OLD_CFLAGS
12383
12384else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012385
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012386 for ac_func in gethostbyname
12387do :
12388 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012389if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012390 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012391#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012392_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012393
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012394fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012395done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012396
Michael W. Hudson54241132001-12-07 15:38:26 +000012397
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012398fi
12399
Michael W. Hudson54241132001-12-07 15:38:26 +000012400
12401
12402
12403
12404
12405
Guido van Rossum627b2d71993-12-24 10:39:16 +000012406# checks for system services
12407# (none yet)
12408
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012409# Linux requires this for correct f.p. operations
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012410ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012411if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012412
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012413else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012414 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
12415$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012416if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012417 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012418else
Martin v. Löwis11437992002-04-12 09:54:03 +000012419 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012420LIBS="-lieee $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012421cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012422/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012423
Martin v. Löwiseba40652007-08-30 20:10:57 +000012424/* Override any GCC internal prototype to avoid an error.
12425 Use char because int might match the return type of a GCC
12426 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012427#ifdef __cplusplus
12428extern "C"
12429#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012430char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012431int
12432main ()
12433{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012434return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012435 ;
12436 return 0;
12437}
12438_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012439if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012440 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012441else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012442 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012443fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012444rm -f core conftest.err conftest.$ac_objext \
12445 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012446LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012447fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012448{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
12449$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012450if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012451 cat >>confdefs.h <<_ACEOF
12452#define HAVE_LIBIEEE 1
12453_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012454
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012455 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012456
Guido van Rossum627b2d71993-12-24 10:39:16 +000012457fi
12458
Michael W. Hudson54241132001-12-07 15:38:26 +000012459
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012460fi
12461
Michael W. Hudson54241132001-12-07 15:38:26 +000012462
Guido van Rossum7f253911997-05-09 02:42:48 +000012463# Check for --with-fpectl
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
12465$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012466
Martin v. Löwiseba40652007-08-30 20:10:57 +000012467# Check whether --with-fpectl was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012468if test "${with_fpectl+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000012469 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000012470if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000012471then
12472
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012473$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012474
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12476$as_echo "yes" >&6; }
12477else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12478$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012479fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000012480else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012481 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12482$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012483fi
12484
Guido van Rossum7f253911997-05-09 02:42:48 +000012485
Guido van Rossum7f43da71994-08-01 12:15:30 +000012486# check for --with-libm=...
12487
Guido van Rossum563e7081996-09-10 18:20:48 +000012488case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000012489Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012490BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000012491*) LIBM=-lm
12492esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
12494$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012495
Martin v. Löwiseba40652007-08-30 20:10:57 +000012496# Check whether --with-libm was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012497if test "${with_libm+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000012498 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000012499if test "$withval" = no
12500then LIBM=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
12502$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012503elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012504then LIBM=$withval
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012505 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
12506$as_echo "set LIBM=\"$withval\"" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012507else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012508fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012509else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012510 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
12511$as_echo "default LIBM=\"$LIBM\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012512fi
12513
Guido van Rossum7f43da71994-08-01 12:15:30 +000012514
12515# check for --with-libc=...
12516
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
12518$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012519
Martin v. Löwiseba40652007-08-30 20:10:57 +000012520# Check whether --with-libc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012521if test "${with_libc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000012522 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000012523if test "$withval" = no
12524then LIBC=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
12526$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012527elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012528then LIBC=$withval
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
12530$as_echo "set LIBC=\"$withval\"" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012531else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012532fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012533else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
12535$as_echo "default LIBC=\"$LIBC\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012536fi
12537
Guido van Rossum7f43da71994-08-01 12:15:30 +000012538
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012539# **************************************************
12540# * Check for various properties of floating point *
12541# **************************************************
Mark Dickinson265d7382008-04-21 22:32:24 +000012542
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
12544$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012545if ${ac_cv_little_endian_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012546 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012547else
12548
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012549if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012550 ac_cv_little_endian_double=no
12551else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012552 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012553/* end confdefs.h. */
12554
12555#include <string.h>
12556int main() {
12557 double x = 9006104071832581.0;
12558 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
12559 return 0;
12560 else
12561 return 1;
12562}
12563
12564_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012565if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012566 ac_cv_little_endian_double=yes
12567else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012568 ac_cv_little_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012569fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012570rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12571 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012572fi
12573
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012574fi
12575
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012576{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
12577$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012578if test "$ac_cv_little_endian_double" = yes
12579then
12580
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012581$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012582
12583fi
12584
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
12586$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012587if ${ac_cv_big_endian_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012588 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012589else
12590
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012591if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012592 ac_cv_big_endian_double=no
12593else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012594 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012595/* end confdefs.h. */
12596
12597#include <string.h>
12598int main() {
12599 double x = 9006104071832581.0;
12600 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
12601 return 0;
12602 else
12603 return 1;
12604}
12605
12606_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012607if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012608 ac_cv_big_endian_double=yes
12609else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012610 ac_cv_big_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012611fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012612rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12613 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012614fi
12615
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012616fi
12617
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012618{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
12619$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012620if test "$ac_cv_big_endian_double" = yes
12621then
12622
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012623$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012624
12625fi
12626
12627# Some ARM platforms use a mixed-endian representation for doubles.
12628# While Python doesn't currently have full support for these platforms
12629# (see e.g., issue 1762561), we can at least make sure that float <-> string
12630# conversions work.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
12632$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012633if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012634 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012635else
12636
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012637if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012638 ac_cv_mixed_endian_double=no
12639else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012640 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012641/* end confdefs.h. */
12642
12643#include <string.h>
12644int main() {
12645 double x = 9006104071832581.0;
12646 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
12647 return 0;
12648 else
12649 return 1;
12650}
12651
12652_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012653if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012654 ac_cv_mixed_endian_double=yes
12655else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012656 ac_cv_mixed_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012657fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012658rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12659 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012660fi
12661
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012662fi
12663
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012664{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
12665$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012666if test "$ac_cv_mixed_endian_double" = yes
12667then
12668
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012669$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012670
12671fi
12672
12673# The short float repr introduced in Python 3.1 requires the
12674# correctly-rounded string <-> double conversion functions from
12675# Python/dtoa.c, which in turn require that the FPU uses 53-bit
12676# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsona548dee2009-11-15 13:12:43 +000012677# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012678# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsona548dee2009-11-15 13:12:43 +000012679
12680# This inline assembler syntax may also work for suncc and icc,
12681# so we try it on all platforms.
12682
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
12684$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
12685cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012686/* end confdefs.h. */
12687
12688int
12689main ()
12690{
12691
Mark Dickinsona548dee2009-11-15 13:12:43 +000012692 unsigned short cw;
12693 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
12694 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012695
12696 ;
12697 return 0;
12698}
12699_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012700if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012701 have_gcc_asm_for_x87=yes
12702else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012703 have_gcc_asm_for_x87=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012704fi
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012705rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012706{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
12707$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsona548dee2009-11-15 13:12:43 +000012708if test "$have_gcc_asm_for_x87" = yes
12709then
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012710
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012711$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012712
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012713fi
Mark Dickinson7a3d8642008-04-22 00:54:27 +000012714
Mark Dickinson04b27232009-01-04 12:29:36 +000012715# Detect whether system arithmetic is subject to x87-style double
12716# rounding issues. The result of this test has little meaning on non
12717# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
12718# mode is round-to-nearest and double rounding issues are present, and
12719# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
12721$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinson99abd142009-10-24 13:44:16 +000012722# $BASECFLAGS may affect the result
12723ac_save_cc="$CC"
12724CC="$CC $BASECFLAGS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012725if test "$cross_compiling" = yes; then :
Mark Dickinson04b27232009-01-04 12:29:36 +000012726 ac_cv_x87_double_rounding=no
12727else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012728 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson04b27232009-01-04 12:29:36 +000012729/* end confdefs.h. */
12730
12731#include <stdlib.h>
12732#include <math.h>
12733int main() {
12734 volatile double x, y, z;
12735 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
12736 x = 0.99999999999999989; /* 1-2**-53 */
12737 y = 1./x;
12738 if (y != 1.)
12739 exit(0);
12740 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
12741 x = 1e16;
12742 y = 2.99999;
12743 z = x + y;
12744 if (z != 1e16+4.)
12745 exit(0);
12746 /* both tests show evidence of double rounding */
12747 exit(1);
12748}
12749
12750_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012751if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson04b27232009-01-04 12:29:36 +000012752 ac_cv_x87_double_rounding=no
12753else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012754 ac_cv_x87_double_rounding=yes
Mark Dickinson04b27232009-01-04 12:29:36 +000012755fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012756rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12757 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson04b27232009-01-04 12:29:36 +000012758fi
12759
Mark Dickinson99abd142009-10-24 13:44:16 +000012760CC="$ac_save_cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012761{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
12762$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson04b27232009-01-04 12:29:36 +000012763if test "$ac_cv_x87_double_rounding" = yes
12764then
12765
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012766$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson04b27232009-01-04 12:29:36 +000012767
12768fi
12769
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012770# ************************************
12771# * Check for mathematical functions *
12772# ************************************
12773
12774LIBS_SAVE=$LIBS
12775LIBS="$LIBS $LIBM"
12776
Mark Dickinson265d7382008-04-21 22:32:24 +000012777# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
12778# -0. on some architectures.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
12780$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012781if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012782 $as_echo_n "(cached) " >&6
Mark Dickinson265d7382008-04-21 22:32:24 +000012783else
12784
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012785if test "$cross_compiling" = yes; then :
Mark Dickinson265d7382008-04-21 22:32:24 +000012786 ac_cv_tanh_preserves_zero_sign=no
12787else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012788 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson265d7382008-04-21 22:32:24 +000012789/* end confdefs.h. */
12790
12791#include <math.h>
Mark Dickinson7a3d8642008-04-22 00:54:27 +000012792#include <stdlib.h>
Mark Dickinson265d7382008-04-21 22:32:24 +000012793int main() {
12794 /* return 0 if either negative zeros don't exist
12795 on this platform or if negative zeros exist
12796 and tanh(-0.) == -0. */
12797 if (atan2(0., -1.) == atan2(-0., -1.) ||
12798 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
12799 else exit(1);
12800}
12801
12802_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012803if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson265d7382008-04-21 22:32:24 +000012804 ac_cv_tanh_preserves_zero_sign=yes
12805else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012806 ac_cv_tanh_preserves_zero_sign=no
Mark Dickinson265d7382008-04-21 22:32:24 +000012807fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012808rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12809 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson265d7382008-04-21 22:32:24 +000012810fi
12811
Mark Dickinson265d7382008-04-21 22:32:24 +000012812fi
12813
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012814{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
12815$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Mark Dickinson265d7382008-04-21 22:32:24 +000012816if test "$ac_cv_tanh_preserves_zero_sign" = yes
12817then
12818
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012819$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Mark Dickinson265d7382008-04-21 22:32:24 +000012820
12821fi
12822
Mark Dickinson65898e02009-09-05 10:27:00 +000012823for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012824do :
12825 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12826ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012827if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinson65898e02009-09-05 10:27:00 +000012828 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012829#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Mark Dickinson65898e02009-09-05 10:27:00 +000012830_ACEOF
12831
12832fi
12833done
12834
Mark Dickinson65898e02009-09-05 10:27:00 +000012835for ac_func in hypot lgamma log1p round tgamma
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012836do :
12837 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12838ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012839if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Christian Heimes0a8143f2007-12-18 23:22:54 +000012840 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012841#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes0a8143f2007-12-18 23:22:54 +000012842_ACEOF
12843
12844fi
12845done
12846
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012847ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
12848"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012849if test "x$ac_cv_have_decl_isinf" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012850 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012851else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012852 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012853fi
12854
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012855cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012856#define HAVE_DECL_ISINF $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012857_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012858ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
12859"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012860if test "x$ac_cv_have_decl_isnan" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012861 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012862else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012863 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012864fi
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012865
12866cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012867#define HAVE_DECL_ISNAN $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012868_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012869ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
12870"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012871if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012872 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012873else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012874 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012875fi
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012876
12877cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012878#define HAVE_DECL_ISFINITE $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012879_ACEOF
12880
12881
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000012882LIBS=$LIBS_SAVE
12883
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012884# For multiprocessing module, check that sem_open
12885# actually works. For FreeBSD versions <= 7.2,
12886# the kernel module that provides POSIX semaphores
12887# isn't loaded by default, so an attempt to call
12888# sem_open results in a 'Signal 12' error.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
12890$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012891if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012892 $as_echo_n "(cached) " >&6
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012893else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012894 if test "$cross_compiling" = yes; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012895 ac_cv_posix_semaphores_enabled=yes
12896else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012897 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012898/* end confdefs.h. */
12899
12900#include <unistd.h>
12901#include <fcntl.h>
12902#include <stdio.h>
12903#include <semaphore.h>
12904#include <sys/stat.h>
12905
12906int main(void) {
12907 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
12908 if (a == SEM_FAILED) {
12909 perror("sem_open");
12910 return 1;
12911 }
12912 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000012913 sem_unlink("/autoconf");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012914 return 0;
12915}
12916
12917_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012918if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012919 ac_cv_posix_semaphores_enabled=yes
12920else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012921 ac_cv_posix_semaphores_enabled=no
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012922fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012923rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12924 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012925fi
12926
12927
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012928fi
12929
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012930{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
12931$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012932if test $ac_cv_posix_semaphores_enabled = no
12933then
12934
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012935$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012936
12937fi
12938
12939# Multiprocessing check for broken sem_getvalue
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
12941$as_echo_n "checking for broken sem_getvalue... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012942if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012943 $as_echo_n "(cached) " >&6
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012944else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012945 if test "$cross_compiling" = yes; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012946 ac_cv_broken_sem_getvalue=yes
12947else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012948 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012949/* end confdefs.h. */
12950
12951#include <unistd.h>
12952#include <fcntl.h>
12953#include <stdio.h>
12954#include <semaphore.h>
12955#include <sys/stat.h>
12956
12957int main(void){
Mark Dickinson59dc89e2009-12-13 21:06:06 +000012958 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012959 int count;
12960 int res;
12961 if(a==SEM_FAILED){
12962 perror("sem_open");
12963 return 1;
12964
12965 }
12966 res = sem_getvalue(a, &count);
12967 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000012968 sem_unlink("/autocftw");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012969 return res==-1 ? 1 : 0;
12970}
12971
12972_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012973if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012974 ac_cv_broken_sem_getvalue=no
12975else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012976 ac_cv_broken_sem_getvalue=yes
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012977fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012978rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12979 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012980fi
12981
12982
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012983fi
12984
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012985{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
12986$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012987if test $ac_cv_broken_sem_getvalue = yes
12988then
12989
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012990$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012991
12992fi
12993
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012994# determine what size digit to use for Python's longs
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
12996$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012997# Check whether --enable-big-digits was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012998if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012999 enableval=$enable_big_digits; case $enable_big_digits in
13000yes)
13001 enable_big_digits=30 ;;
13002no)
13003 enable_big_digits=15 ;;
1300415|30)
13005 ;;
13006*)
Matthias Klose3cef2a92012-03-14 23:39:33 +010013007 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 +000013008esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013009{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
13010$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000013011
13012cat >>confdefs.h <<_ACEOF
13013#define PYLONG_BITS_IN_DIGIT $enable_big_digits
13014_ACEOF
13015
13016
13017else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13019$as_echo "no value specified" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000013020fi
13021
13022
Guido van Rossumef2255b2000-03-10 22:30:29 +000013023# check for wchar.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013024ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +010013025if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013026
13027
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013028$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013029
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013030 wchar_h="yes"
13031
Guido van Rossumef2255b2000-03-10 22:30:29 +000013032else
Martin v. Löwis11437992002-04-12 09:54:03 +000013033 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000013034
13035fi
13036
Michael W. Hudson54241132001-12-07 15:38:26 +000013037
Martin v. Löwis11437992002-04-12 09:54:03 +000013038
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013039# determine wchar_t size
13040if test "$wchar_h" = yes
13041then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013042 # The cast to long int works around a bug in the HP C Compiler
Martin v. Löwiseba40652007-08-30 20:10:57 +000013043# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13044# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13045# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
13047$as_echo_n "checking size of wchar_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013048if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013049 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013050else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013051 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
13052"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013053
Martin v. Löwis11437992002-04-12 09:54:03 +000013054else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013055 if test "$ac_cv_type_wchar_t" = yes; then
13056 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13057$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013058as_fn_error 77 "cannot compute sizeof (wchar_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +010013059See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013060 else
13061 ac_cv_sizeof_wchar_t=0
13062 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013063fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013064
Martin v. Löwis11437992002-04-12 09:54:03 +000013065fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013066{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
13067$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013068
13069
13070
Martin v. Löwis11437992002-04-12 09:54:03 +000013071cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013072#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013073_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013074
Michael W. Hudson54241132001-12-07 15:38:26 +000013075
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013076fi
13077
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
13079$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013080have_ucs4_tcl=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013081cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013082/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013083
13084#include <tcl.h>
13085#if TCL_UTF_MAX != 6
13086# error "NOT UCS4_TCL"
13087#endif
13088int
13089main ()
13090{
13091
13092 ;
13093 return 0;
13094}
13095_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013096if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013097
13098
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013099$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013100
13101 have_ucs4_tcl=yes
13102
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013103fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013104rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013105{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
13106$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013107
Skip Montanaro6dead952003-09-25 14:50:04 +000013108# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013109if test "$wchar_h" = yes
13110then
13111 # check whether wchar_t is signed or not
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013112 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
13113$as_echo_n "checking whether wchar_t is signed... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013114 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013115 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013116else
13117
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013118 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013119 ac_cv_wchar_t_signed=yes
13120else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013122/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013123
13124 #include <wchar.h>
13125 int main()
13126 {
Martin v. Löwis44fe0e42006-04-11 07:15:30 +000013127 /* Success: exit code 0 */
13128 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013129 }
13130
13131_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013132if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013133 ac_cv_wchar_t_signed=yes
13134else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013135 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013136fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013137rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13138 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013139fi
13140
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013141fi
13142
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
13144$as_echo "$ac_cv_wchar_t_signed" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013145fi
13146
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what type to use for unicode" >&5
13148$as_echo_n "checking what type to use for unicode... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013149# Check whether --enable-unicode was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013150if test "${enable_unicode+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000013151 enableval=$enable_unicode;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013152else
13153 enable_unicode=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +000013154fi
13155
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013156
13157if test $enable_unicode = yes
13158then
Martin v. Löwisfd917792001-06-27 20:22:04 +000013159 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013160 case "$have_ucs4_tcl" in
13161 yes) enable_unicode="ucs4"
13162 ;;
13163 *) enable_unicode="ucs2"
13164 ;;
13165 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013166fi
13167
Martin v. Löwis0036cba2002-04-12 09:58:45 +000013168
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013169case "$enable_unicode" in
13170ucs2) unicode_size="2"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013171 $as_echo "#define Py_UNICODE_SIZE 2" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013172
13173 ;;
13174ucs4) unicode_size="4"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013175 $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013176
13177 ;;
Martin v. Löwised11a5d2012-05-20 10:42:17 +020013178no) ;; # To allow --disable-unicode
Matthias Klose3cef2a92012-03-14 23:39:33 +010013179*) 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 +000013180esac
13181
Michael W. Hudson54241132001-12-07 15:38:26 +000013182
Martin v. Löwis11437992002-04-12 09:54:03 +000013183
13184
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013185if test "$enable_unicode" = "no"
13186then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000013187 UNICODE_OBJS=""
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013188 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not used" >&5
13189$as_echo "not used" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013190else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000013191 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000013192
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013193$as_echo "#define Py_USING_UNICODE 1" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013194
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013195
13196 # wchar_t is only usable if it maps to an unsigned type
13197 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000013198 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013199 then
13200 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013201
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013202$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013203
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013204 $as_echo "#define PY_UNICODE_TYPE wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013205
13206 elif test "$ac_cv_sizeof_short" = "$unicode_size"
13207 then
13208 PY_UNICODE_TYPE="unsigned short"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013209 $as_echo "#define PY_UNICODE_TYPE unsigned short" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013210
13211 elif test "$ac_cv_sizeof_long" = "$unicode_size"
13212 then
13213 PY_UNICODE_TYPE="unsigned long"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013214 $as_echo "#define PY_UNICODE_TYPE unsigned long" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013215
13216 else
13217 PY_UNICODE_TYPE="no type found"
13218 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013219 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PY_UNICODE_TYPE" >&5
13220$as_echo "$PY_UNICODE_TYPE" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013221fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000013222
13223# check for endianness
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013224 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13225$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013226if ${ac_cv_c_bigendian+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013227 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000013228else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013229 ac_cv_c_bigendian=unknown
13230 # See if we're dealing with a universal compiler.
13231 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13232/* end confdefs.h. */
13233#ifndef __APPLE_CC__
13234 not a universal capable compiler
13235 #endif
13236 typedef int dummy;
13237
Skip Montanaro6dead952003-09-25 14:50:04 +000013238_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013239if ac_fn_c_try_compile "$LINENO"; then :
13240
13241 # Check for potential -arch flags. It is not universal unless
13242 # there are at least two -arch flags with different values.
13243 ac_arch=
13244 ac_prev=
13245 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13246 if test -n "$ac_prev"; then
13247 case $ac_word in
13248 i?86 | x86_64 | ppc | ppc64)
13249 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13250 ac_arch=$ac_word
13251 else
13252 ac_cv_c_bigendian=universal
13253 break
13254 fi
13255 ;;
13256 esac
13257 ac_prev=
13258 elif test "x$ac_word" = "x-arch"; then
13259 ac_prev=arch
13260 fi
13261 done
13262fi
13263rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13264 if test $ac_cv_c_bigendian = unknown; then
13265 # See if sys/param.h defines the BYTE_ORDER macro.
13266 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013267/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013268#include <sys/types.h>
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013269 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013270
Martin v. Löwis11437992002-04-12 09:54:03 +000013271int
13272main ()
13273{
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013274#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13275 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13276 && LITTLE_ENDIAN)
13277 bogus endian macros
13278 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013279
13280 ;
13281 return 0;
13282}
13283_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013284if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013285 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013286 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013287/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013288#include <sys/types.h>
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013289 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013290
Martin v. Löwis11437992002-04-12 09:54:03 +000013291int
13292main ()
13293{
Guido van Rossumef2255b2000-03-10 22:30:29 +000013294#if BYTE_ORDER != BIG_ENDIAN
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013295 not big endian
13296 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013297
13298 ;
13299 return 0;
13300}
13301_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013302if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013303 ac_cv_c_bigendian=yes
13304else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013305 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000013306fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013307rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013308fi
13309rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13310 fi
13311 if test $ac_cv_c_bigendian = unknown; then
13312 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13313 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013314/* end confdefs.h. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013315#include <limits.h>
13316
Martin v. Löwis11437992002-04-12 09:54:03 +000013317int
13318main ()
13319{
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013320#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13321 bogus endian macros
13322 #endif
13323
Martin v. Löwis11437992002-04-12 09:54:03 +000013324 ;
13325 return 0;
13326}
13327_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013328if ac_fn_c_try_compile "$LINENO"; then :
13329 # It does; now see whether it defined to _BIG_ENDIAN or not.
13330 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13331/* end confdefs.h. */
13332#include <limits.h>
13333
13334int
13335main ()
13336{
13337#ifndef _BIG_ENDIAN
13338 not big endian
13339 #endif
13340
13341 ;
13342 return 0;
13343}
13344_ACEOF
13345if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013346 ac_cv_c_bigendian=yes
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000013347else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013348 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013349fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013350rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13351fi
13352rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13353 fi
13354 if test $ac_cv_c_bigendian = unknown; then
13355 # Compile a test program.
13356 if test "$cross_compiling" = yes; then :
13357 # Try to guess by grepping values from an object file.
13358 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13359/* end confdefs.h. */
13360short int ascii_mm[] =
13361 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13362 short int ascii_ii[] =
13363 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13364 int use_ascii (int i) {
13365 return ascii_mm[i] + ascii_ii[i];
13366 }
13367 short int ebcdic_ii[] =
13368 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13369 short int ebcdic_mm[] =
13370 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13371 int use_ebcdic (int i) {
13372 return ebcdic_mm[i] + ebcdic_ii[i];
13373 }
13374 extern int foo;
Martin v. Löwiseba40652007-08-30 20:10:57 +000013375
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013376int
13377main ()
13378{
13379return use_ascii (foo) == use_ebcdic (foo);
13380 ;
13381 return 0;
13382}
13383_ACEOF
13384if ac_fn_c_try_compile "$LINENO"; then :
13385 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
13386 ac_cv_c_bigendian=yes
13387 fi
13388 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
13389 if test "$ac_cv_c_bigendian" = unknown; then
13390 ac_cv_c_bigendian=no
13391 else
13392 # finding both strings is unlikely to happen, but who knows?
13393 ac_cv_c_bigendian=unknown
13394 fi
13395 fi
13396fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013397rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013398else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013399 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013400/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000013401$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013402int
13403main ()
13404{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013405
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013406 /* Are we little or big endian? From Harbison&Steele. */
13407 union
13408 {
13409 long int l;
13410 char c[sizeof (long int)];
13411 } u;
13412 u.l = 1;
13413 return u.c[sizeof (long int) - 1] == 1;
Martin v. Löwiseba40652007-08-30 20:10:57 +000013414
13415 ;
13416 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000013417}
Martin v. Löwis11437992002-04-12 09:54:03 +000013418_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013419if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013420 ac_cv_c_bigendian=no
13421else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013422 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000013423fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013424rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13425 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000013426fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013427
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013428 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013429fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013430{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
13431$as_echo "$ac_cv_c_bigendian" >&6; }
13432 case $ac_cv_c_bigendian in #(
13433 yes)
13434 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
13435;; #(
13436 no)
13437 ;; #(
13438 universal)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013439
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013440$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000013441
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013442 ;; #(
13443 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013444 as_fn_error $? "unknown endianness
Matthias Klose3cef2a92012-03-14 23:39:33 +010013445 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013446 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000013447
Michael W. Hudson54241132001-12-07 15:38:26 +000013448
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013449# Check whether right shifting a negative integer extends the sign bit
13450# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
13452$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013453if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013454 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000013455else
Martin v. Löwis11437992002-04-12 09:54:03 +000013456
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013457if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013458 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013459else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013460 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013461/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013462
13463int main()
13464{
Vladimir Marangozova6180282000-07-12 05:05:06 +000013465 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013466}
13467
Martin v. Löwis11437992002-04-12 09:54:03 +000013468_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013469if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000013470 ac_cv_rshift_extends_sign=yes
13471else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013472 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000013473fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013474rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13475 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000013476fi
13477
Martin v. Löwiseba40652007-08-30 20:10:57 +000013478fi
13479
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013480{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
13481$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000013482if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013483then
Martin v. Löwis11437992002-04-12 09:54:03 +000013484
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013485$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013486
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013487fi
13488
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013489# check for getc_unlocked and related locking functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013490{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
13491$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013492if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013493 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013494else
Martin v. Löwis11437992002-04-12 09:54:03 +000013495
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013496cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013497/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013498#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013499int
13500main ()
13501{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013502
13503 FILE *f = fopen("/dev/null", "r");
13504 flockfile(f);
13505 getc_unlocked(f);
13506 funlockfile(f);
13507
Martin v. Löwis11437992002-04-12 09:54:03 +000013508 ;
13509 return 0;
13510}
13511_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013512if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013513 ac_cv_have_getc_unlocked=yes
13514else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013515 ac_cv_have_getc_unlocked=no
13516fi
13517rm -f core conftest.err conftest.$ac_objext \
13518 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013519fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013520
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013521{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
13522$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013523if test "$ac_cv_have_getc_unlocked" = yes
13524then
Martin v. Löwis11437992002-04-12 09:54:03 +000013525
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013526$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013527
13528fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013529
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013530# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000013531# save the value of LIBS so we don't actually link Python with readline
13532LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013533
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013534# On some systems we need to link readline to a termcap compatible
13535# library. NOTE: Keep the precedence of listed libraries synchronised
13536# with setup.py.
13537py_cv_lib_readline=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
13539$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013540for py_libtermcap in "" ncursesw ncurses curses termcap; do
13541 if test -z "$py_libtermcap"; then
13542 READLINE_LIBS="-lreadline"
13543 else
13544 READLINE_LIBS="-lreadline -l$py_libtermcap"
13545 fi
13546 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013547 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013548/* end confdefs.h. */
13549
Martin v. Löwiseba40652007-08-30 20:10:57 +000013550/* Override any GCC internal prototype to avoid an error.
13551 Use char because int might match the return type of a GCC
13552 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013553#ifdef __cplusplus
13554extern "C"
13555#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013556char readline ();
13557int
13558main ()
13559{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013560return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013561 ;
13562 return 0;
13563}
13564_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013565if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013566 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013567fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013568rm -f core conftest.err conftest.$ac_objext \
13569 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013570 if test $py_cv_lib_readline = yes; then
13571 break
13572 fi
13573done
13574# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
13575#AC_SUBST([READLINE_LIBS])
Gregory P. Smithe080cdf2008-09-07 19:19:04 +000013576if test $py_cv_lib_readline = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
13578$as_echo "none" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013579else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013580 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
13581$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013582
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013583$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013584
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013585fi
13586
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013587# check for readline 2.1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
13589$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013590if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013591 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013592else
13593 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013594LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013595cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013596/* end confdefs.h. */
13597
Martin v. Löwiseba40652007-08-30 20:10:57 +000013598/* Override any GCC internal prototype to avoid an error.
13599 Use char because int might match the return type of a GCC
13600 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013601#ifdef __cplusplus
13602extern "C"
13603#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013604char rl_callback_handler_install ();
13605int
13606main ()
13607{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013608return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013609 ;
13610 return 0;
13611}
13612_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013613if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013614 ac_cv_lib_readline_rl_callback_handler_install=yes
13615else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013616 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013617fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013618rm -f core conftest.err conftest.$ac_objext \
13619 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013620LIBS=$ac_check_lib_save_LIBS
13621fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013622{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
13623$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013624if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013625
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013626$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013627
13628fi
13629
13630
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013631# check for readline 2.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013632cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013633/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013634#include <readline/readline.h>
13635_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013636if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013637 have_readline=yes
13638else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013639 have_readline=no
Matthias Klosec511b472010-05-08 11:01:39 +000013640
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013641fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013642rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013643if test $have_readline = yes
13644then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013645 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013646/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013647#include <readline/readline.h>
13648
13649_ACEOF
13650if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013651 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013652
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013653$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013654
13655fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000013656rm -f conftest*
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000013657
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013658 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000013659/* end confdefs.h. */
13660#include <readline/readline.h>
13661
13662_ACEOF
13663if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013664 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000013665
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013666$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000013667
13668fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000013669rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013670
13671fi
13672
Martin v. Löwis0daad592001-09-30 21:09:59 +000013673# check for readline 4.0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
13675$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013676if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013677 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000013678else
Martin v. Löwis11437992002-04-12 09:54:03 +000013679 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013680LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013681cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013682/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013683
Martin v. Löwiseba40652007-08-30 20:10:57 +000013684/* Override any GCC internal prototype to avoid an error.
13685 Use char because int might match the return type of a GCC
13686 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013687#ifdef __cplusplus
13688extern "C"
13689#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013690char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013691int
13692main ()
13693{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013694return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013695 ;
13696 return 0;
13697}
13698_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013699if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013700 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000013701else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013702 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000013703fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013704rm -f core conftest.err conftest.$ac_objext \
13705 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013706LIBS=$ac_check_lib_save_LIBS
13707fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013708{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
13709$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013710if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013711
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013712$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000013713
Martin v. Löwis0daad592001-09-30 21:09:59 +000013714fi
13715
Michael W. Hudson54241132001-12-07 15:38:26 +000013716
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013717# also in 4.0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
13719$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013720if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013721 $as_echo_n "(cached) " >&6
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013722else
13723 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013724LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013725cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013726/* end confdefs.h. */
13727
13728/* Override any GCC internal prototype to avoid an error.
13729 Use char because int might match the return type of a GCC
13730 builtin and then its argument prototype would still apply. */
13731#ifdef __cplusplus
13732extern "C"
13733#endif
13734char rl_completion_display_matches_hook ();
13735int
13736main ()
13737{
13738return rl_completion_display_matches_hook ();
13739 ;
13740 return 0;
13741}
13742_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013743if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013744 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
13745else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013746 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013747fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013748rm -f core conftest.err conftest.$ac_objext \
13749 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013750LIBS=$ac_check_lib_save_LIBS
13751fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013752{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
13753$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013754if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013755
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013756$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013757
13758fi
13759
13760
Martin v. Löwis0daad592001-09-30 21:09:59 +000013761# check for readline 4.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
13763$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013764if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013765 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000013766else
Martin v. Löwis11437992002-04-12 09:54:03 +000013767 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013768LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013769cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013770/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013771
Martin v. Löwiseba40652007-08-30 20:10:57 +000013772/* Override any GCC internal prototype to avoid an error.
13773 Use char because int might match the return type of a GCC
13774 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013775#ifdef __cplusplus
13776extern "C"
13777#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013778char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013779int
13780main ()
13781{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013782return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013783 ;
13784 return 0;
13785}
13786_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013787if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013788 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000013789else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013790 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000013791fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013792rm -f core conftest.err conftest.$ac_objext \
13793 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013794LIBS=$ac_check_lib_save_LIBS
13795fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013796{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
13797$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013798if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013799
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013800$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000013801
Guido van Rossum353ae582001-07-10 16:45:32 +000013802fi
13803
Jack Jansendd19cf82001-12-06 22:36:17 +000013804
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013805# also in readline 4.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013806cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013807/* end confdefs.h. */
13808#include <readline/readline.h>
13809_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013810if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013811 have_readline=yes
13812else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013813 have_readline=no
Matthias Klosec511b472010-05-08 11:01:39 +000013814
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013815fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013816rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013817if test $have_readline = yes
13818then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013819 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013820/* end confdefs.h. */
13821#include <readline/readline.h>
13822
13823_ACEOF
13824if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013825 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013826
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013827$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013828
13829fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000013830rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013831
13832fi
13833
Martin v. Löwis82bca632006-02-10 20:49:30 +000013834# End of readline checks: restore LIBS
13835LIBS=$LIBS_no_readline
13836
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
13838$as_echo_n "checking for broken nice()... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013839if ${ac_cv_broken_nice+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013840 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013841else
Martin v. Löwis11437992002-04-12 09:54:03 +000013842
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013843if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013844 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013845else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013846 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013847/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013848
13849int main()
13850{
13851 int val1 = nice(1);
13852 if (val1 != -1 && val1 == nice(2))
13853 exit(0);
13854 exit(1);
13855}
13856
Martin v. Löwis11437992002-04-12 09:54:03 +000013857_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013858if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013859 ac_cv_broken_nice=yes
13860else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013861 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013862fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013863rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13864 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013865fi
13866
Martin v. Löwiseba40652007-08-30 20:10:57 +000013867fi
13868
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013869{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
13870$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013871if test "$ac_cv_broken_nice" = yes
13872then
Martin v. Löwis11437992002-04-12 09:54:03 +000013873
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013874$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013875
13876fi
13877
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
13879$as_echo_n "checking for broken poll()... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013880if ${ac_cv_broken_poll+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013881 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013882else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013883 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013884 ac_cv_broken_poll=no
13885else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013886 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013887/* end confdefs.h. */
13888
13889#include <poll.h>
13890
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013891int main()
13892{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013893 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013894 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013895
13896 close (42);
13897
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013898 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013899 if (poll_test < 0)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013900 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013901 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013902 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013903 else
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013904 return 1;
13905}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013906
13907_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013908if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013909 ac_cv_broken_poll=yes
13910else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013911 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013912fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013913rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13914 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013915fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013916
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013917fi
13918
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013919{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
13920$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013921if test "$ac_cv_broken_poll" = yes
13922then
13923
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013924$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013925
13926fi
13927
Brett Cannon43802422005-02-10 20:48:03 +000013928# 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 +000013929# (which is not required by ISO C or UNIX spec) and/or if we support
13930# tzname[]
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013931ac_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 +000013932#include <$ac_cv_struct_tm>
13933
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013934"
Matthias Klose3cef2a92012-03-14 23:39:33 +010013935if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000013936
13937cat >>confdefs.h <<_ACEOF
13938#define HAVE_STRUCT_TM_TM_ZONE 1
13939_ACEOF
13940
13941
13942fi
13943
13944if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13945
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013946$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013947
13948else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013949 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13950"
Matthias Klose3cef2a92012-03-14 23:39:33 +010013951if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013952 ac_have_decl=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000013953else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013954 ac_have_decl=0
Martin v. Löwiseba40652007-08-30 20:10:57 +000013955fi
13956
Martin v. Löwiseba40652007-08-30 20:10:57 +000013957cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013958#define HAVE_DECL_TZNAME $ac_have_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +000013959_ACEOF
13960
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013961 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13962$as_echo_n "checking for tzname... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013963if ${ac_cv_var_tzname+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013964 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000013965else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013966 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013967/* end confdefs.h. */
13968#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000013969#if !HAVE_DECL_TZNAME
13970extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000013971#endif
13972
13973int
13974main ()
13975{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013976return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000013977 ;
13978 return 0;
13979}
13980_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013981if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000013982 ac_cv_var_tzname=yes
13983else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013984 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000013985fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013986rm -f core conftest.err conftest.$ac_objext \
13987 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013988fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013989{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13990$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000013991 if test $ac_cv_var_tzname = yes; then
13992
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013993$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013994
13995 fi
13996fi
13997
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013998
Martin v. Löwis1d459062005-03-14 21:23:33 +000013999# check tzset(3) exists and works like we expect it to
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
14001$as_echo_n "checking for working tzset()... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014002if ${ac_cv_working_tzset+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014003 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014004else
14005
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014006if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014007 ac_cv_working_tzset=no
14008else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014009 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014010/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014011
14012#include <stdlib.h>
14013#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000014014#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000014015
14016#if HAVE_TZNAME
14017extern char *tzname[];
14018#endif
14019
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014020int main()
14021{
Brett Cannon18367812003-09-19 00:59:16 +000014022 /* Note that we need to ensure that not only does tzset(3)
14023 do 'something' with localtime, but it works as documented
14024 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000014025 This includes making sure that tzname is set properly if
14026 tm->tm_zone does not exist since it is the alternative way
14027 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000014028
14029 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000014030 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000014031 */
14032
Martin v. Löwis1d459062005-03-14 21:23:33 +000014033 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000014034 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
14035
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014036 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014037 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014038 if (localtime(&groundhogday)->tm_hour != 0)
14039 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014040#if HAVE_TZNAME
14041 /* For UTC, tzname[1] is sometimes "", sometimes " " */
14042 if (strcmp(tzname[0], "UTC") ||
14043 (tzname[1][0] != 0 && tzname[1][0] != ' '))
14044 exit(1);
14045#endif
Brett Cannon18367812003-09-19 00:59:16 +000014046
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014047 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014048 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014049 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014050 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014051#if HAVE_TZNAME
14052 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
14053 exit(1);
14054#endif
Brett Cannon18367812003-09-19 00:59:16 +000014055
14056 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
14057 tzset();
14058 if (localtime(&groundhogday)->tm_hour != 11)
14059 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014060#if HAVE_TZNAME
14061 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
14062 exit(1);
14063#endif
14064
14065#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000014066 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
14067 exit(1);
14068 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
14069 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014070#endif
Brett Cannon18367812003-09-19 00:59:16 +000014071
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014072 exit(0);
14073}
14074
14075_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014076if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014077 ac_cv_working_tzset=yes
14078else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014079 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014080fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014081rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14082 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014083fi
14084
Martin v. Löwiseba40652007-08-30 20:10:57 +000014085fi
14086
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014087{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
14088$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014089if test "$ac_cv_working_tzset" = yes
14090then
14091
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014092$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014093
14094fi
14095
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014096# Look for subsecond timestamps in struct stat
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
14098$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014099if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014100 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014101else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014102 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014103/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014104#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014105int
14106main ()
14107{
14108
14109struct stat st;
14110st.st_mtim.tv_nsec = 1;
14111
14112 ;
14113 return 0;
14114}
14115_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014116if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000014117 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014118else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014119 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014120fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014121rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14122fi
14123
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014124{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
14125$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014126if test "$ac_cv_stat_tv_nsec" = yes
14127then
14128
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014129$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014130
14131fi
14132
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014133# Look for BSD style subsecond timestamps in struct stat
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
14135$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014136if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014137 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014138else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014139 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014140/* end confdefs.h. */
14141#include <sys/stat.h>
14142int
14143main ()
14144{
14145
14146struct stat st;
14147st.st_mtimespec.tv_nsec = 1;
14148
14149 ;
14150 return 0;
14151}
14152_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014153if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014154 ac_cv_stat_tv_nsec2=yes
14155else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014156 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014157fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014158rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14159fi
14160
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014161{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
14162$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014163if test "$ac_cv_stat_tv_nsec2" = yes
14164then
14165
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014166$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014167
14168fi
14169
doko@ubuntu.comf27ec3e2014-04-17 20:11:19 +020014170# first curses configure check
14171ac_save_cppflags="$CPPFLAGS"
14172CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
14173
14174for ac_header in curses.h ncurses.h
14175do :
14176 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14177ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
14178if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
14179 cat >>confdefs.h <<_ACEOF
14180#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14181_ACEOF
14182
14183fi
14184
14185done
14186
14187
14188# On Solaris, term.h requires curses.h
14189for ac_header in term.h
14190do :
14191 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
14192#ifdef HAVE_CURSES_H
14193#include <curses.h>
14194#endif
14195
14196"
14197if test "x$ac_cv_header_term_h" = xyes; then :
14198 cat >>confdefs.h <<_ACEOF
14199#define HAVE_TERM_H 1
14200_ACEOF
14201
14202fi
14203
14204done
14205
14206
Jack Jansen666b1e72001-10-31 12:11:48 +000014207# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
14209$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014210if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014211 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014212else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014213 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014214/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014215#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014216int
14217main ()
14218{
Jack Jansen666b1e72001-10-31 12:11:48 +000014219
14220 int rtn;
14221 rtn = mvwdelch(0,0,0);
14222
Martin v. Löwis11437992002-04-12 09:54:03 +000014223 ;
14224 return 0;
14225}
14226_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014227if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014228 ac_cv_mvwdelch_is_expression=yes
14229else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014230 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014231fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014232rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14233fi
14234
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014235{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
14236$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000014237
14238if test "$ac_cv_mvwdelch_is_expression" = yes
14239then
Martin v. Löwis11437992002-04-12 09:54:03 +000014240
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014241$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014242
14243fi
14244
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
14246$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014247if ${ac_cv_window_has_flags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014248 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014249else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014250 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014251/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014252#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014253int
14254main ()
14255{
Jack Jansen666b1e72001-10-31 12:11:48 +000014256
14257 WINDOW *w;
14258 w->_flags = 0;
14259
Martin v. Löwis11437992002-04-12 09:54:03 +000014260 ;
14261 return 0;
14262}
14263_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014264if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014265 ac_cv_window_has_flags=yes
14266else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014267 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014268fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014269rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14270fi
14271
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014272{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
14273$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000014274
Jack Jansen666b1e72001-10-31 12:11:48 +000014275
14276if test "$ac_cv_window_has_flags" = yes
14277then
Martin v. Löwis11437992002-04-12 09:54:03 +000014278
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014279$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014280
14281fi
14282
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
14284$as_echo_n "checking for is_term_resized... " >&6; }
14285cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000014286/* end confdefs.h. */
14287#include <curses.h>
14288int
14289main ()
14290{
14291void *x=is_term_resized
14292 ;
14293 return 0;
14294}
14295_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014296if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000014297
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014298$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000014299
Matthias Klosec511b472010-05-08 11:01:39 +000014300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014301$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014302else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14304$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014305
14306fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014307rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14308
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
14310$as_echo_n "checking for resize_term... " >&6; }
14311cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000014312/* end confdefs.h. */
14313#include <curses.h>
14314int
14315main ()
14316{
14317void *x=resize_term
14318 ;
14319 return 0;
14320}
14321_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014322if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000014323
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014324$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000014325
Matthias Klosec511b472010-05-08 11:01:39 +000014326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014327$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014328else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14330$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014331
14332fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014333rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14334
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
14336$as_echo_n "checking for resizeterm... " >&6; }
14337cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000014338/* end confdefs.h. */
14339#include <curses.h>
14340int
14341main ()
14342{
14343void *x=resizeterm
14344 ;
14345 return 0;
14346}
14347_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014348if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000014349
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014350$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000014351
Matthias Klosec511b472010-05-08 11:01:39 +000014352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014353$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014354else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14356$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014357
14358fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014359rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.comf27ec3e2014-04-17 20:11:19 +020014360# last curses configure check
14361CPPFLAGS=$ac_save_cppflags
Martin v. Löwiseba40652007-08-30 20:10:57 +000014362
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
14364$as_echo "$as_me: checking for device files" >&6;}
14365
14366if test "x$cross_compiling" = xyes; then
14367 if test "${ac_cv_file__dev_ptmx+set}" != set; then
14368 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14369$as_echo_n "checking for /dev/ptmx... " >&6; }
14370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14371$as_echo "not set" >&6; }
14372 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14373 fi
14374 if test "${ac_cv_file__dev_ptc+set}" != set; then
14375 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14376$as_echo_n "checking for /dev/ptc... " >&6; }
14377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14378$as_echo "not set" >&6; }
14379 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14380 fi
14381fi
14382
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14384$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014385if ${ac_cv_file__dev_ptmx+:} false; then :
14386 $as_echo_n "(cached) " >&6
14387else
14388 test "$cross_compiling" = yes &&
14389 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14390if test -r "/dev/ptmx"; then
14391 ac_cv_file__dev_ptmx=yes
14392else
14393 ac_cv_file__dev_ptmx=no
14394fi
14395fi
14396{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
14397$as_echo "$ac_cv_file__dev_ptmx" >&6; }
14398if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Martin v. Löwisfefbc202006-10-17 18:59:23 +000014399
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014400fi
14401
14402if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014403
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014404$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014405
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014406fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14408$as_echo_n "checking for /dev/ptc... " >&6; }
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014409if ${ac_cv_file__dev_ptc+:} false; then :
14410 $as_echo_n "(cached) " >&6
14411else
14412 test "$cross_compiling" = yes &&
14413 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14414if test -r "/dev/ptc"; then
14415 ac_cv_file__dev_ptc=yes
14416else
14417 ac_cv_file__dev_ptc=no
14418fi
14419fi
14420{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
14421$as_echo "$ac_cv_file__dev_ptc" >&6; }
14422if test "x$ac_cv_file__dev_ptc" = xyes; then :
Martin v. Löwisfefbc202006-10-17 18:59:23 +000014423
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014424fi
14425
14426if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000014427
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014428$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000014429
Neal Norwitz865400f2003-03-21 01:42:58 +000014430fi
14431
Mark Dickinson82864d12009-11-15 16:18:58 +000014432if test "$have_long_long" = yes
14433then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014434 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
14435$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014436 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014437 $as_echo_n "(cached) " >&6
Mark Dickinson82864d12009-11-15 16:18:58 +000014438else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014439 if test "$cross_compiling" = yes; then :
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014440 ac_cv_have_long_long_format="cross -- assuming no"
14441 if test x$GCC = xyes; then
14442 save_CFLAGS=$CFLAGS
14443 CFLAGS="$CFLAGS -Werror -Wformat"
14444 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14445/* end confdefs.h. */
14446
14447 #include <stdio.h>
14448 #include <stddef.h>
14449
14450int
14451main ()
14452{
14453
14454 char *buffer;
14455 sprintf(buffer, "%lld", (long long)123);
14456 sprintf(buffer, "%lld", (long long)-123);
14457 sprintf(buffer, "%llu", (unsigned long long)123);
14458
14459 ;
14460 return 0;
14461}
14462_ACEOF
14463if ac_fn_c_try_compile "$LINENO"; then :
14464 ac_cv_have_long_long_format=yes
14465
14466fi
14467rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14468 CFLAGS=$save_CFLAGS
14469 fi
Mark Dickinson82864d12009-11-15 16:18:58 +000014470else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014471 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson82864d12009-11-15 16:18:58 +000014472/* end confdefs.h. */
14473
14474 #include <stdio.h>
14475 #include <stddef.h>
14476 #include <string.h>
14477
14478 #ifdef HAVE_SYS_TYPES_H
14479 #include <sys/types.h>
14480 #endif
14481
14482 int main()
14483 {
14484 char buffer[256];
14485
14486 if (sprintf(buffer, "%lld", (long long)123) < 0)
14487 return 1;
14488 if (strcmp(buffer, "123"))
14489 return 1;
14490
14491 if (sprintf(buffer, "%lld", (long long)-123) < 0)
14492 return 1;
14493 if (strcmp(buffer, "-123"))
14494 return 1;
14495
14496 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
14497 return 1;
14498 if (strcmp(buffer, "123"))
14499 return 1;
14500
14501 return 0;
14502 }
14503
14504_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014505if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson82864d12009-11-15 16:18:58 +000014506 ac_cv_have_long_long_format=yes
14507else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014508 ac_cv_have_long_long_format=no
Mark Dickinson82864d12009-11-15 16:18:58 +000014509fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014510rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14511 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson82864d12009-11-15 16:18:58 +000014512fi
14513
14514
Mark Dickinson82864d12009-11-15 16:18:58 +000014515fi
14516
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
14518$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson82864d12009-11-15 16:18:58 +000014519fi
14520
Mark Dickinson5ce84742009-12-31 20:48:04 +000014521if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson82864d12009-11-15 16:18:58 +000014522then
14523
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014524$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson82864d12009-11-15 16:18:58 +000014525
14526fi
14527
Ronald Oussoren315cd0c2009-11-19 16:25:21 +000014528if test $ac_sys_system = Darwin
14529then
14530 LIBS="$LIBS -framework CoreFoundation"
14531fi
14532
Mark Dickinson82864d12009-11-15 16:18:58 +000014533
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
14535$as_echo_n "checking for %zd printf() format support... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014536if ${ac_cv_have_size_t_format+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014537 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014538else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014539 if test "$cross_compiling" = yes; then :
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000014540 ac_cv_have_size_t_format="cross -- assuming yes"
14541
Brett Cannon09d12362006-05-11 05:11:33 +000014542else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014543 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon09d12362006-05-11 05:11:33 +000014544/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014545
Brett Cannon09d12362006-05-11 05:11:33 +000014546#include <stdio.h>
14547#include <stddef.h>
14548#include <string.h>
14549
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000014550#ifdef HAVE_SYS_TYPES_H
14551#include <sys/types.h>
14552#endif
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000014553
14554#ifdef HAVE_SSIZE_T
14555typedef ssize_t Py_ssize_t;
14556#elif SIZEOF_VOID_P == SIZEOF_LONG
14557typedef long Py_ssize_t;
14558#else
14559typedef int Py_ssize_t;
14560#endif
Brett Cannon09d12362006-05-11 05:11:33 +000014561
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000014562int main()
14563{
14564 char buffer[256];
14565
Brett Cannon09d12362006-05-11 05:11:33 +000014566 if(sprintf(buffer, "%zd", (size_t)123) < 0)
14567 return 1;
14568
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000014569 if (strcmp(buffer, "123"))
14570 return 1;
14571
14572 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
14573 return 1;
14574
14575 if (strcmp(buffer, "-123"))
Brett Cannon09d12362006-05-11 05:11:33 +000014576 return 1;
14577
14578 return 0;
14579}
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014580
Brett Cannon09d12362006-05-11 05:11:33 +000014581_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014582if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014583 ac_cv_have_size_t_format=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014584else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014585 ac_cv_have_size_t_format=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014586fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014587rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14588 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000014589fi
14590
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014591fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014592{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
14593$as_echo "$ac_cv_have_size_t_format" >&6; }
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000014594if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014595
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014596$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014597
14598fi
14599
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014600ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000014601#ifdef HAVE_SYS_TYPES_H
14602#include <sys/types.h>
14603#endif
14604#ifdef HAVE_SYS_SOCKET_H
14605#include <sys/socket.h>
14606#endif
14607
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014608"
Matthias Klose3cef2a92012-03-14 23:39:33 +010014609if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000014610
Martin v. Löwis11437992002-04-12 09:54:03 +000014611else
Guido van Rossum95713eb2000-05-18 20:53:31 +000014612
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014613$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000014614
14615fi
14616
Michael W. Hudson54241132001-12-07 15:38:26 +000014617
Benjamin Peterson7497e912010-10-16 00:53:39 +000014618case $ac_sys_system in
14619AIX*)
14620
14621$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
14622 ;;
14623esac
14624
14625
Michael W. Hudson54241132001-12-07 15:38:26 +000014626
14627
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000014628for h in `(cd $srcdir;echo Python/thread_*.h)`
14629do
14630 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
14631done
14632
Michael W. Hudson54241132001-12-07 15:38:26 +000014633
Neal Norwitzd24499d2005-12-18 21:36:39 +000014634SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
14636$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014637for dir in $SRCDIRS; do
14638 if test ! -d $dir; then
14639 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000014640 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014641done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014642{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
14643$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000014644
Ned Deily3f1d0b32014-11-20 02:11:03 -080014645# ensurepip option
14646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
14647$as_echo_n "checking for ensurepip... " >&6; }
14648
14649# Check whether --with-ensurepip was given.
14650if test "${with_ensurepip+set}" = set; then :
14651 withval=$with_ensurepip;
14652else
14653 with_ensurepip=no
14654fi
14655
14656case $with_ensurepip in #(
14657 yes|upgrade) :
14658 ENSUREPIP=upgrade ;; #(
14659 install) :
14660 ENSUREPIP=install ;; #(
14661 no) :
14662 ENSUREPIP=no ;; #(
14663 *) :
14664 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
14665esac
14666{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
14667$as_echo "$ENSUREPIP" >&6; }
14668
14669
Guido van Rossum627b2d71993-12-24 10:39:16 +000014670# generate output files
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000014671ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000014672
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000014673ac_config_files="$ac_config_files Modules/ld_so_aix"
14674
Martin v. Löwis11437992002-04-12 09:54:03 +000014675cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014676# This file is a shell script that caches the results of configure
14677# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000014678# scripts and configure runs, see configure's option --config-cache.
14679# It is not useful on other systems. If it contains results you don't
14680# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014681#
Martin v. Löwis11437992002-04-12 09:54:03 +000014682# config.status only pays attention to the cache file if you give it
14683# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014684#
Skip Montanaro6dead952003-09-25 14:50:04 +000014685# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000014686# loading this file, other *unset* `ac_cv_foo' will be assigned the
14687# following values.
14688
14689_ACEOF
14690
Guido van Rossumf78abae1997-01-21 22:02:36 +000014691# The following way of writing the cache mishandles newlines in values,
14692# but we know of no workaround that is simple, portable, and efficient.
Martin v. Löwiseba40652007-08-30 20:10:57 +000014693# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014694# Ultrix sh set writes to stderr and can't be redirected directly,
14695# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwiseba40652007-08-30 20:10:57 +000014696(
14697 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
14698 eval ac_val=\$$ac_var
14699 case $ac_val in #(
14700 *${as_nl}*)
14701 case $ac_var in #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014702 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
14703$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014704 esac
14705 case $ac_var in #(
14706 _ | IFS | as_nl) ;; #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014707 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
14708 *) { eval $ac_var=; unset $ac_var;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014709 esac ;;
14710 esac
14711 done
14712
Martin v. Löwis11437992002-04-12 09:54:03 +000014713 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +000014714 case $as_nl`(ac_space=' '; set) 2>&1` in #(
14715 *${as_nl}ac_space=\ *)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014716 # `set' does not quote correctly, so add quotes: double-quote
14717 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000014718 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014719 "s/'/'\\\\''/g;
14720 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Martin v. Löwiseba40652007-08-30 20:10:57 +000014721 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000014722 *)
14723 # `set' quotes correctly as required by POSIX, so do not add quotes.
Martin v. Löwiseba40652007-08-30 20:10:57 +000014724 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000014725 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014726 esac |
14727 sort
14728) |
Martin v. Löwis11437992002-04-12 09:54:03 +000014729 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000014730 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000014731 t clear
Martin v. Löwiseba40652007-08-30 20:10:57 +000014732 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000014733 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
14734 t end
Martin v. Löwiseba40652007-08-30 20:10:57 +000014735 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
14736 :end' >>confcache
14737if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
14738 if test -w "$cache_file"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +010014739 if test "x$cache_file" != "x/dev/null"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014740 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
14741$as_echo "$as_me: updating cache $cache_file" >&6;}
Matthias Klose3cef2a92012-03-14 23:39:33 +010014742 if test ! -f "$cache_file" || test -h "$cache_file"; then
14743 cat confcache >"$cache_file"
14744 else
14745 case $cache_file in #(
14746 */* | ?:*)
14747 mv -f confcache "$cache_file"$$ &&
14748 mv -f "$cache_file"$$ "$cache_file" ;; #(
14749 *)
14750 mv -f confcache "$cache_file" ;;
14751 esac
14752 fi
14753 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014754 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014755 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
14756$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014757 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014758fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014759rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000014760
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014761test "x$prefix" = xNONE && prefix=$ac_default_prefix
14762# Let make expand exec_prefix.
14763test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000014764
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014765DEFS=-DHAVE_CONFIG_H
14766
Skip Montanaro6dead952003-09-25 14:50:04 +000014767ac_libobjs=
14768ac_ltlibobjs=
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014769U=
Skip Montanaro6dead952003-09-25 14:50:04 +000014770for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
14771 # 1. Remove the extension, and $U if already installed.
Martin v. Löwiseba40652007-08-30 20:10:57 +000014772 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014773 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Martin v. Löwiseba40652007-08-30 20:10:57 +000014774 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
14775 # will be set to the directory where LIBOBJS objects are built.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014776 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
14777 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000014778done
14779LIBOBJS=$ac_libobjs
14780
14781LTLIBOBJS=$ac_ltlibobjs
14782
14783
Martin v. Löwis11437992002-04-12 09:54:03 +000014784
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014785
Matthias Klose3cef2a92012-03-14 23:39:33 +010014786: "${CONFIG_STATUS=./config.status}"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014787ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000014788ac_clean_files_save=$ac_clean_files
14789ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014790{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
14791$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
14792as_write_fail=0
14793cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014794#! $SHELL
14795# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000014796# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014797# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000014798# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000014799
Martin v. Löwis11437992002-04-12 09:54:03 +000014800debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000014801ac_cs_recheck=false
14802ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000014803
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014804SHELL=\${CONFIG_SHELL-$SHELL}
14805export SHELL
14806_ASEOF
14807cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
14808## -------------------- ##
14809## M4sh Initialization. ##
14810## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000014811
Martin v. Löwiseba40652007-08-30 20:10:57 +000014812# Be more Bourne compatible
14813DUALCASE=1; export DUALCASE # for MKS sh
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014814if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014815 emulate sh
14816 NULLCMD=:
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014817 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000014818 # is contrary to our usage. Disable this feature.
14819 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000014820 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000014821else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014822 case `(set -o) 2>/dev/null` in #(
14823 *posix*) :
14824 set -o posix ;; #(
14825 *) :
14826 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014827esac
Martin v. Löwis11437992002-04-12 09:54:03 +000014828fi
Michael W. Hudson54241132001-12-07 15:38:26 +000014829
Skip Montanaro6dead952003-09-25 14:50:04 +000014830
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014831as_nl='
14832'
14833export as_nl
14834# Printing a long string crashes Solaris 7 /usr/bin/printf.
14835as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
14836as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
14837as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
14838# Prefer a ksh shell builtin over an external printf program on Solaris,
14839# but without wasting forks for bash or zsh.
14840if test -z "$BASH_VERSION$ZSH_VERSION" \
14841 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
14842 as_echo='print -r --'
14843 as_echo_n='print -rn --'
14844elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
14845 as_echo='printf %s\n'
14846 as_echo_n='printf %s'
14847else
14848 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
14849 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
14850 as_echo_n='/usr/ucb/echo -n'
14851 else
14852 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
14853 as_echo_n_body='eval
14854 arg=$1;
14855 case $arg in #(
14856 *"$as_nl"*)
14857 expr "X$arg" : "X\\(.*\\)$as_nl";
14858 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
14859 esac;
14860 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
14861 '
14862 export as_echo_n_body
14863 as_echo_n='sh -c $as_echo_n_body as_echo'
14864 fi
14865 export as_echo_body
14866 as_echo='sh -c $as_echo_body as_echo'
14867fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014868
14869# The user is always right.
14870if test "${PATH_SEPARATOR+set}" != set; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014871 PATH_SEPARATOR=:
14872 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
14873 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
14874 PATH_SEPARATOR=';'
14875 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000014876fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014877
Martin v. Löwiseba40652007-08-30 20:10:57 +000014878
14879# IFS
14880# We need space, tab and new line, in precisely that order. Quoting is
14881# there to prevent editors from complaining about space-tab.
14882# (If _AS_PATH_WALK were called with IFS unset, it would disable word
14883# splitting by setting IFS to empty value.)
Martin v. Löwiseba40652007-08-30 20:10:57 +000014884IFS=" "" $as_nl"
14885
14886# Find who we are. Look in the path if we contain no directory separator.
Matthias Klose3cef2a92012-03-14 23:39:33 +010014887as_myself=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014888case $0 in #((
Martin v. Löwiseba40652007-08-30 20:10:57 +000014889 *[\\/]* ) as_myself=$0 ;;
14890 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000014891for as_dir in $PATH
14892do
14893 IFS=$as_save_IFS
14894 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014895 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
14896 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000014897IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000014898
Martin v. Löwiseba40652007-08-30 20:10:57 +000014899 ;;
14900esac
14901# We did not find ourselves, most probably we were run as `sh COMMAND'
14902# in which case we are not to be found in the path.
14903if test "x$as_myself" = x; then
14904 as_myself=$0
14905fi
14906if test ! -f "$as_myself"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014907 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
14908 exit 1
Martin v. Löwiseba40652007-08-30 20:10:57 +000014909fi
14910
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014911# Unset variables that we do not need and which cause bugs (e.g. in
14912# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
14913# suppresses any "Segmentation fault" message there. '((' could
14914# trigger a bug in pdksh 5.2.14.
14915for as_var in BASH_ENV ENV MAIL MAILPATH
14916do eval test x\${$as_var+set} = xset \
14917 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Martin v. Löwiseba40652007-08-30 20:10:57 +000014918done
14919PS1='$ '
14920PS2='> '
14921PS4='+ '
14922
14923# NLS nuisances.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014924LC_ALL=C
14925export LC_ALL
14926LANGUAGE=C
14927export LANGUAGE
Martin v. Löwiseba40652007-08-30 20:10:57 +000014928
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014929# CDPATH.
14930(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
14931
14932
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014933# as_fn_error STATUS ERROR [LINENO LOG_FD]
14934# ----------------------------------------
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014935# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
14936# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014937# script with STATUS, using 1 if that was 0.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014938as_fn_error ()
14939{
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014940 as_status=$1; test $as_status -eq 0 && as_status=1
14941 if test "$4"; then
14942 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
14943 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014944 fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014945 $as_echo "$as_me: error: $2" >&2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014946 as_fn_exit $as_status
14947} # as_fn_error
14948
14949
14950# as_fn_set_status STATUS
14951# -----------------------
14952# Set $? to STATUS, without forking.
14953as_fn_set_status ()
14954{
14955 return $1
14956} # as_fn_set_status
14957
14958# as_fn_exit STATUS
14959# -----------------
14960# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
14961as_fn_exit ()
14962{
14963 set +e
14964 as_fn_set_status $1
14965 exit $1
14966} # as_fn_exit
14967
14968# as_fn_unset VAR
14969# ---------------
14970# Portably unset VAR.
14971as_fn_unset ()
14972{
14973 { eval $1=; unset $1;}
14974}
14975as_unset=as_fn_unset
14976# as_fn_append VAR VALUE
14977# ----------------------
14978# Append the text in VALUE to the end of the definition contained in VAR. Take
14979# advantage of any shell optimizations that allow amortized linear growth over
14980# repeated appends, instead of the typical quadratic growth present in naive
14981# implementations.
14982if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
14983 eval 'as_fn_append ()
14984 {
14985 eval $1+=\$2
14986 }'
14987else
14988 as_fn_append ()
14989 {
14990 eval $1=\$$1\$2
14991 }
14992fi # as_fn_append
14993
14994# as_fn_arith ARG...
14995# ------------------
14996# Perform arithmetic evaluation on the ARGs, and store the result in the
14997# global $as_val. Take advantage of shells that can avoid forks. The arguments
14998# must be portable across $(()) and expr.
14999if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
15000 eval 'as_fn_arith ()
15001 {
15002 as_val=$(( $* ))
15003 }'
15004else
15005 as_fn_arith ()
15006 {
15007 as_val=`expr "$@" || test $? -eq 1`
15008 }
15009fi # as_fn_arith
15010
15011
Martin v. Löwiseba40652007-08-30 20:10:57 +000015012if expr a : '\(a\)' >/dev/null 2>&1 &&
15013 test "X`expr 00001 : '.*\(...\)'`" = X001; then
15014 as_expr=expr
15015else
15016 as_expr=false
15017fi
15018
15019if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
15020 as_basename=basename
15021else
15022 as_basename=false
15023fi
15024
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015025if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
15026 as_dirname=dirname
15027else
15028 as_dirname=false
15029fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015030
Martin v. Löwiseba40652007-08-30 20:10:57 +000015031as_me=`$as_basename -- "$0" ||
15032$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15033 X"$0" : 'X\(//\)$' \| \
15034 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015035$as_echo X/"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000015036 sed '/^.*\/\([^/][^/]*\)\/*$/{
15037 s//\1/
15038 q
15039 }
15040 /^X\/\(\/\/\)$/{
15041 s//\1/
15042 q
15043 }
15044 /^X\/\(\/\).*/{
15045 s//\1/
15046 q
15047 }
15048 s/.*/./; q'`
15049
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015050# Avoid depending upon Character Ranges.
15051as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15052as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15053as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15054as_cr_digits='0123456789'
15055as_cr_alnum=$as_cr_Letters$as_cr_digits
Martin v. Löwiseba40652007-08-30 20:10:57 +000015056
15057ECHO_C= ECHO_N= ECHO_T=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015058case `echo -n x` in #(((((
Martin v. Löwiseba40652007-08-30 20:10:57 +000015059-n*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015060 case `echo 'xy\c'` in
Martin v. Löwiseba40652007-08-30 20:10:57 +000015061 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015062 xy) ECHO_C='\c';;
15063 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
15064 ECHO_T=' ';;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015065 esac;;
15066*)
15067 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000015068esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015069
Martin v. Löwis11437992002-04-12 09:54:03 +000015070rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +000015071if test -d conf$$.dir; then
15072 rm -f conf$$.dir/conf$$.file
15073else
15074 rm -f conf$$.dir
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015075 mkdir conf$$.dir 2>/dev/null
Martin v. Löwiseba40652007-08-30 20:10:57 +000015076fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015077if (echo >conf$$.file) 2>/dev/null; then
15078 if ln -s conf$$.file conf$$ 2>/dev/null; then
15079 as_ln_s='ln -s'
15080 # ... but there are two gotchas:
15081 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
15082 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015083 # In both cases, we have to default to `cp -pR'.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015084 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015085 as_ln_s='cp -pR'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015086 elif ln conf$$.file conf$$ 2>/dev/null; then
15087 as_ln_s=ln
15088 else
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015089 as_ln_s='cp -pR'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015090 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015091else
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015092 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000015093fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015094rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
15095rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000015096
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015097
15098# as_fn_mkdir_p
15099# -------------
15100# Create "$as_dir" as a directory, including parents if necessary.
15101as_fn_mkdir_p ()
15102{
15103
15104 case $as_dir in #(
15105 -*) as_dir=./$as_dir;;
15106 esac
15107 test -d "$as_dir" || eval $as_mkdir_p || {
15108 as_dirs=
15109 while :; do
15110 case $as_dir in #(
15111 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
15112 *) as_qdir=$as_dir;;
15113 esac
15114 as_dirs="'$as_qdir' $as_dirs"
15115 as_dir=`$as_dirname -- "$as_dir" ||
15116$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15117 X"$as_dir" : 'X\(//\)[^/]' \| \
15118 X"$as_dir" : 'X\(//\)$' \| \
15119 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
15120$as_echo X"$as_dir" |
15121 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15122 s//\1/
15123 q
15124 }
15125 /^X\(\/\/\)[^/].*/{
15126 s//\1/
15127 q
15128 }
15129 /^X\(\/\/\)$/{
15130 s//\1/
15131 q
15132 }
15133 /^X\(\/\).*/{
15134 s//\1/
15135 q
15136 }
15137 s/.*/./; q'`
15138 test -d "$as_dir" && break
15139 done
15140 test -z "$as_dirs" || eval "mkdir $as_dirs"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015141 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015142
15143
15144} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000015145if mkdir -p . 2>/dev/null; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015146 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000015147else
Skip Montanarof0d5f792004-08-15 14:08:23 +000015148 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000015149 as_mkdir_p=false
15150fi
15151
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015152
15153# as_fn_executable_p FILE
15154# -----------------------
15155# Test if FILE is an executable regular file.
15156as_fn_executable_p ()
15157{
15158 test -f "$1" && test -x "$1"
15159} # as_fn_executable_p
15160as_test_x='test -x'
15161as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000015162
15163# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015164as_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 +000015165
15166# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015167as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015168
15169
Martin v. Löwis11437992002-04-12 09:54:03 +000015170exec 6>&1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015171## ----------------------------------- ##
15172## Main body of $CONFIG_STATUS script. ##
15173## ----------------------------------- ##
15174_ASEOF
15175test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015176
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015177cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15178# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000015179# report actual input values of CONFIG_FILES etc. instead of their
Martin v. Löwiseba40652007-08-30 20:10:57 +000015180# values after options handling.
15181ac_log="
Martin v. Löwis174440b2008-10-03 08:59:41 +000015182This file was extended by python $as_me 2.7, which was
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015183generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000015184
15185 CONFIG_FILES = $CONFIG_FILES
15186 CONFIG_HEADERS = $CONFIG_HEADERS
15187 CONFIG_LINKS = $CONFIG_LINKS
15188 CONFIG_COMMANDS = $CONFIG_COMMANDS
15189 $ $0 $@
15190
Martin v. Löwiseba40652007-08-30 20:10:57 +000015191on `(hostname || uname -n) 2>/dev/null | sed 1q`
15192"
15193
Martin v. Löwis11437992002-04-12 09:54:03 +000015194_ACEOF
15195
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015196case $ac_config_files in *"
15197"*) set x $ac_config_files; shift; ac_config_files=$*;;
15198esac
15199
15200case $ac_config_headers in *"
15201"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
15202esac
15203
15204
15205cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015206# Files that config.status was made for.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015207config_files="$ac_config_files"
15208config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000015209
Martin v. Löwiseba40652007-08-30 20:10:57 +000015210_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015211
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015212cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015213ac_cs_usage="\
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015214\`$as_me' instantiates files and other configuration actions
15215from templates according to the current configuration. Unless the files
15216and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000015217
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015218Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000015219
15220 -h, --help print this help, then exit
Martin v. Löwiseba40652007-08-30 20:10:57 +000015221 -V, --version print version number and configuration settings, then exit
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015222 --config print configuration, then exit
15223 -q, --quiet, --silent
15224 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000015225 -d, --debug don't remove temporary files
15226 --recheck update $as_me by reconfiguring in the same conditions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015227 --file=FILE[:TEMPLATE]
15228 instantiate the configuration file FILE
15229 --header=FILE[:TEMPLATE]
15230 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000015231
15232Configuration files:
15233$config_files
15234
15235Configuration headers:
15236$config_headers
15237
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015238Report bugs to <http://bugs.python.org/>."
Skip Montanaro89e975f2007-08-22 19:05:21 +000015239
Martin v. Löwiseba40652007-08-30 20:10:57 +000015240_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015241cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15242ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000015243ac_cs_version="\\
Martin v. Löwis174440b2008-10-03 08:59:41 +000015244python config.status 2.7
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015245configured by $0, generated by GNU Autoconf 2.69,
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015246 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000015247
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015248Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000015249This config.status script is free software; the Free Software Foundation
15250gives unlimited permission to copy, distribute and modify it."
Martin v. Löwiseba40652007-08-30 20:10:57 +000015251
15252ac_pwd='$ac_pwd'
15253srcdir='$srcdir'
15254INSTALL='$INSTALL'
Trent Nelsonf6407a12012-08-30 14:56:13 +000015255MKDIR_P='$MKDIR_P'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015256test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000015257_ACEOF
15258
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015259cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15260# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000015261ac_need_defaults=:
15262while test $# != 0
15263do
15264 case $1 in
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015265 --*=?*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000015266 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15267 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000015268 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000015269 ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015270 --*=)
15271 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15272 ac_optarg=
15273 ac_shift=:
15274 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015275 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000015276 ac_option=$1
15277 ac_optarg=$2
15278 ac_shift=shift
15279 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015280 esac
15281
Skip Montanaro6dead952003-09-25 14:50:04 +000015282 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000015283 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000015284 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15285 ac_cs_recheck=: ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015286 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015287 $as_echo "$ac_cs_version"; exit ;;
15288 --config | --confi | --conf | --con | --co | --c )
15289 $as_echo "$ac_cs_config"; exit ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015290 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000015291 debug=: ;;
15292 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000015293 $ac_shift
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015294 case $ac_optarg in
15295 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015296 '') as_fn_error $? "missing file argument" ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015297 esac
15298 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015299 ac_need_defaults=false;;
15300 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000015301 $ac_shift
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015302 case $ac_optarg in
15303 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15304 esac
15305 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015306 ac_need_defaults=false;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015307 --he | --h)
15308 # Conflict between --help and --header
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015309 as_fn_error $? "ambiguous option: \`$1'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015310Try \`$0 --help' for more information.";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015311 --help | --hel | -h )
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015312 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000015313 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
15314 | -silent | --silent | --silen | --sile | --sil | --si | --s)
15315 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015316
15317 # This is an error.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015318 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015319Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015320
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015321 *) as_fn_append ac_config_targets " $1"
Martin v. Löwiseba40652007-08-30 20:10:57 +000015322 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015323
15324 esac
15325 shift
15326done
15327
Skip Montanaro6dead952003-09-25 14:50:04 +000015328ac_configure_extra_args=
15329
15330if $ac_cs_silent; then
15331 exec 6>/dev/null
15332 ac_configure_extra_args="$ac_configure_extra_args --silent"
15333fi
15334
15335_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015336cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000015337if \$ac_cs_recheck; then
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015338 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015339 shift
15340 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
15341 CONFIG_SHELL='$SHELL'
Martin v. Löwiseba40652007-08-30 20:10:57 +000015342 export CONFIG_SHELL
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015343 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000015344fi
15345
Martin v. Löwis11437992002-04-12 09:54:03 +000015346_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015347cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015348exec 5>>config.log
15349{
15350 echo
15351 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
15352## Running $as_me. ##
15353_ASBOX
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015354 $as_echo "$ac_log"
Martin v. Löwiseba40652007-08-30 20:10:57 +000015355} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015356
Martin v. Löwiseba40652007-08-30 20:10:57 +000015357_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015358cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015359_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015360
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015361cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015362
15363# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000015364for ac_config_target in $ac_config_targets
15365do
Martin v. Löwiseba40652007-08-30 20:10:57 +000015366 case $ac_config_target in
15367 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
15368 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
15369 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
15370 "Mac/IDLE/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/IDLE/Makefile" ;;
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000015371 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
15372 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015373 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
15374 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000015375 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000015376 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015377
Matthias Klose3cef2a92012-03-14 23:39:33 +010015378 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015379 esac
15380done
15381
Martin v. Löwiseba40652007-08-30 20:10:57 +000015382
Martin v. Löwis11437992002-04-12 09:54:03 +000015383# If the user did not use the arguments to specify the items to instantiate,
15384# then the envvar interface is used. Set only those that are not.
15385# We use the long form for the default assignment because of an extremely
15386# bizarre bug on SunOS 4.1.3.
15387if $ac_need_defaults; then
15388 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15389 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
15390fi
15391
Skip Montanaro6dead952003-09-25 14:50:04 +000015392# Have a temporary directory for convenience. Make it in the build tree
Martin v. Löwiseba40652007-08-30 20:10:57 +000015393# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000015394# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015395# Hook for its removal unless debugging.
15396# Note that there is a small window in which the directory will not be cleaned:
15397# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000015398$debug ||
15399{
Matthias Klose3cef2a92012-03-14 23:39:33 +010015400 tmp= ac_tmp=
Martin v. Löwiseba40652007-08-30 20:10:57 +000015401 trap 'exit_status=$?
Matthias Klose3cef2a92012-03-14 23:39:33 +010015402 : "${ac_tmp:=$tmp}"
15403 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +000015404' 0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015405 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000015406}
Martin v. Löwis11437992002-04-12 09:54:03 +000015407# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000015408
Martin v. Löwis11437992002-04-12 09:54:03 +000015409{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015410 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Matthias Klose3cef2a92012-03-14 23:39:33 +010015411 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000015412} ||
15413{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015414 tmp=./conf$$-$RANDOM
15415 (umask 077 && mkdir "$tmp")
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015416} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Matthias Klose3cef2a92012-03-14 23:39:33 +010015417ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000015418
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015419# Set up the scripts for CONFIG_FILES section.
15420# No need to generate them if there are no CONFIG_FILES.
15421# This happens for instance with `./config.status config.h'.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015422if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015423
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015424
15425ac_cr=`echo X | tr X '\015'`
15426# On cygwin, bash can eat \r inside `` if the user requested igncr.
15427# But we know of no other shell where ac_cr would be empty at this
15428# point, so we can use a bashism as a fallback.
15429if test "x$ac_cr" = x; then
15430 eval ac_cr=\$\'\\r\'
15431fi
15432ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
15433if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015434 ac_cs_awk_cr='\\r'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015435else
15436 ac_cs_awk_cr=$ac_cr
15437fi
15438
Matthias Klose3cef2a92012-03-14 23:39:33 +010015439echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000015440_ACEOF
15441
Martin v. Löwiseba40652007-08-30 20:10:57 +000015442
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015443{
15444 echo "cat >conf$$subs.awk <<_ACEOF" &&
15445 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
15446 echo "_ACEOF"
15447} >conf$$subs.sh ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015448 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15449ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015450ac_delim='%!_!# '
15451for ac_last_try in false false false false false :; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015452 . ./conf$$subs.sh ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015453 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015454
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015455 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
15456 if test $ac_delim_n = $ac_delim_num; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015457 break
15458 elif $ac_last_try; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015459 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015460 else
15461 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000015462 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015463done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015464rm -f conf$$subs.sh
Martin v. Löwiseba40652007-08-30 20:10:57 +000015465
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015466cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Matthias Klose3cef2a92012-03-14 23:39:33 +010015467cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000015468_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015469sed -n '
15470h
15471s/^/S["/; s/!.*/"]=/
15472p
15473g
15474s/^[^!]*!//
15475:repl
15476t repl
15477s/'"$ac_delim"'$//
15478t delim
15479:nl
15480h
15481s/\(.\{148\}\)..*/\1/
15482t more1
15483s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
15484p
15485n
15486b repl
15487:more1
15488s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15489p
15490g
15491s/.\{148\}//
15492t nl
15493:delim
15494h
15495s/\(.\{148\}\)..*/\1/
15496t more2
15497s/["\\]/\\&/g; s/^/"/; s/$/"/
15498p
15499b
15500:more2
15501s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15502p
15503g
15504s/.\{148\}//
15505t delim
15506' <conf$$subs.awk | sed '
15507/^[^""]/{
15508 N
15509 s/\n//
15510}
15511' >>$CONFIG_STATUS || ac_write_fail=1
15512rm -f conf$$subs.awk
15513cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15514_ACAWK
Matthias Klose3cef2a92012-03-14 23:39:33 +010015515cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015516 for (key in S) S_is_set[key] = 1
15517 FS = ""
15518
15519}
15520{
15521 line = $ 0
15522 nfields = split(line, field, "@")
15523 substed = 0
15524 len = length(field[1])
15525 for (i = 2; i < nfields; i++) {
15526 key = field[i]
15527 keylen = length(key)
15528 if (S_is_set[key]) {
15529 value = S[key]
15530 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
15531 len += length(value) + length(field[++i])
15532 substed = 1
15533 } else
15534 len += 1 + keylen
15535 }
15536
15537 print line
15538}
15539
15540_ACAWK
Martin v. Löwiseba40652007-08-30 20:10:57 +000015541_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015542cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15543if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
15544 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
15545else
15546 cat
Matthias Klose3cef2a92012-03-14 23:39:33 +010015547fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015548 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015549_ACEOF
15550
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015551# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
15552# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Martin v. Löwiseba40652007-08-30 20:10:57 +000015553# trailing colons and then remove the whole line if VPATH becomes empty
15554# (actually we leave an empty line to preserve line numbers).
15555if test "x$srcdir" = x.; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015556 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
15557h
15558s///
15559s/^/:/
15560s/[ ]*$/:/
15561s/:\$(srcdir):/:/g
15562s/:\${srcdir}:/:/g
15563s/:@srcdir@:/:/g
15564s/^:*//
Martin v. Löwiseba40652007-08-30 20:10:57 +000015565s/:*$//
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015566x
15567s/\(=[ ]*\).*/\1/
15568G
15569s/\n//
Martin v. Löwiseba40652007-08-30 20:10:57 +000015570s/^[^=]*=[ ]*$//
15571}'
15572fi
15573
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015574cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015575fi # test -n "$CONFIG_FILES"
15576
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015577# Set up the scripts for CONFIG_HEADERS section.
15578# No need to generate them if there are no CONFIG_HEADERS.
15579# This happens for instance with `./config.status Makefile'.
15580if test -n "$CONFIG_HEADERS"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +010015581cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015582BEGIN {
15583_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000015584
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015585# Transform confdefs.h into an awk script `defines.awk', embedded as
15586# here-document in config.status, that substitutes the proper values into
15587# config.h.in to produce config.h.
15588
15589# Create a delimiter string that does not exist in confdefs.h, to ease
15590# handling of long lines.
15591ac_delim='%!_!# '
15592for ac_last_try in false false :; do
Matthias Klose3cef2a92012-03-14 23:39:33 +010015593 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
15594 if test -z "$ac_tt"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015595 break
15596 elif $ac_last_try; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015597 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015598 else
15599 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
15600 fi
15601done
15602
15603# For the awk script, D is an array of macro values keyed by name,
15604# likewise P contains macro parameters if any. Preserve backslash
15605# newline sequences.
15606
15607ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
15608sed -n '
15609s/.\{148\}/&'"$ac_delim"'/g
15610t rset
15611:rset
15612s/^[ ]*#[ ]*define[ ][ ]*/ /
15613t def
15614d
15615:def
15616s/\\$//
15617t bsnl
15618s/["\\]/\\&/g
15619s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
15620D["\1"]=" \3"/p
15621s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
15622d
15623:bsnl
15624s/["\\]/\\&/g
15625s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
15626D["\1"]=" \3\\\\\\n"\\/p
15627t cont
15628s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
15629t cont
15630d
15631:cont
15632n
15633s/.\{148\}/&'"$ac_delim"'/g
15634t clear
15635:clear
15636s/\\$//
15637t bsnlc
15638s/["\\]/\\&/g; s/^/"/; s/$/"/p
15639d
15640:bsnlc
15641s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
15642b cont
15643' <confdefs.h | sed '
15644s/'"$ac_delim"'/"\\\
15645"/g' >>$CONFIG_STATUS || ac_write_fail=1
15646
15647cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15648 for (key in D) D_is_set[key] = 1
15649 FS = ""
15650}
15651/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
15652 line = \$ 0
15653 split(line, arg, " ")
15654 if (arg[1] == "#") {
15655 defundef = arg[2]
15656 mac1 = arg[3]
15657 } else {
15658 defundef = substr(arg[1], 2)
15659 mac1 = arg[2]
15660 }
15661 split(mac1, mac2, "(") #)
15662 macro = mac2[1]
15663 prefix = substr(line, 1, index(line, defundef) - 1)
15664 if (D_is_set[macro]) {
15665 # Preserve the white space surrounding the "#".
15666 print prefix "define", macro P[macro] D[macro]
15667 next
15668 } else {
15669 # Replace #undef with comments. This is necessary, for example,
15670 # in the case of _POSIX_SOURCE, which is predefined and required
15671 # on some systems where configure will not decide to define it.
15672 if (defundef == "undef") {
15673 print "/*", prefix defundef, macro, "*/"
15674 next
15675 }
15676 }
15677}
15678{ print }
15679_ACAWK
15680_ACEOF
15681cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015682 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015683fi # test -n "$CONFIG_HEADERS"
15684
15685
15686eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
15687shift
15688for ac_tag
Martin v. Löwiseba40652007-08-30 20:10:57 +000015689do
15690 case $ac_tag in
15691 :[FHLC]) ac_mode=$ac_tag; continue;;
15692 esac
15693 case $ac_mode$ac_tag in
15694 :[FHL]*:*);;
Matthias Klose3cef2a92012-03-14 23:39:33 +010015695 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015696 :[FH]-) ac_tag=-:-;;
15697 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
15698 esac
15699 ac_save_IFS=$IFS
15700 IFS=:
15701 set x $ac_tag
15702 IFS=$ac_save_IFS
15703 shift
15704 ac_file=$1
15705 shift
15706
15707 case $ac_mode in
15708 :L) ac_source=$1;;
15709 :[FH])
15710 ac_file_inputs=
15711 for ac_f
15712 do
15713 case $ac_f in
Matthias Klose3cef2a92012-03-14 23:39:33 +010015714 -) ac_f="$ac_tmp/stdin";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015715 *) # Look for the file first in the build tree, then in the source tree
15716 # (if the path is not absolute). The absolute path cannot be DOS-style,
15717 # because $ac_f cannot contain `:'.
15718 test -f "$ac_f" ||
15719 case $ac_f in
15720 [\\/$]*) false;;
15721 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
15722 esac ||
Matthias Klose3cef2a92012-03-14 23:39:33 +010015723 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015724 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015725 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
15726 as_fn_append ac_file_inputs " '$ac_f'"
Martin v. Löwiseba40652007-08-30 20:10:57 +000015727 done
15728
15729 # Let's still pretend it is `configure' which instantiates (i.e., don't
15730 # use $as_me), people would be surprised to read:
15731 # /* config.h. Generated by config.status. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015732 configure_input='Generated from '`
15733 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
15734 `' by configure.'
Martin v. Löwiseba40652007-08-30 20:10:57 +000015735 if test x"$ac_file" != x-; then
15736 configure_input="$ac_file. $configure_input"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015737 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
15738$as_echo "$as_me: creating $ac_file" >&6;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000015739 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015740 # Neutralize special characters interpreted by sed in replacement strings.
15741 case $configure_input in #(
15742 *\&* | *\|* | *\\* )
15743 ac_sed_conf_input=`$as_echo "$configure_input" |
15744 sed 's/[\\\\&|]/\\\\&/g'`;; #(
15745 *) ac_sed_conf_input=$configure_input;;
15746 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000015747
15748 case $ac_tag in
Matthias Klose3cef2a92012-03-14 23:39:33 +010015749 *:-:* | *:-) cat >"$ac_tmp/stdin" \
15750 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015751 esac
15752 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015753 esac
15754
Martin v. Löwiseba40652007-08-30 20:10:57 +000015755 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000015756$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015757 X"$ac_file" : 'X\(//\)[^/]' \| \
15758 X"$ac_file" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000015759 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015760$as_echo X"$ac_file" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000015761 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15762 s//\1/
15763 q
15764 }
15765 /^X\(\/\/\)[^/].*/{
15766 s//\1/
15767 q
15768 }
15769 /^X\(\/\/\)$/{
15770 s//\1/
15771 q
15772 }
15773 /^X\(\/\).*/{
15774 s//\1/
15775 q
15776 }
15777 s/.*/./; q'`
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015778 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000015779 ac_builddir=.
15780
Martin v. Löwiseba40652007-08-30 20:10:57 +000015781case "$ac_dir" in
15782.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
15783*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015784 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015785 # A ".." for each directory in $ac_dir_suffix.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015786 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015787 case $ac_top_builddir_sub in
15788 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
15789 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
15790 esac ;;
15791esac
15792ac_abs_top_builddir=$ac_pwd
15793ac_abs_builddir=$ac_pwd$ac_dir_suffix
15794# for backward compatibility:
15795ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000015796
15797case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +000015798 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000015799 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015800 ac_top_srcdir=$ac_top_builddir_sub
15801 ac_abs_top_srcdir=$ac_pwd ;;
15802 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000015803 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015804 ac_top_srcdir=$srcdir
15805 ac_abs_top_srcdir=$srcdir ;;
15806 *) # Relative name.
15807 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
15808 ac_top_srcdir=$ac_top_build_prefix$srcdir
15809 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015810esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000015811ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000015812
Martin v. Löwis11437992002-04-12 09:54:03 +000015813
Martin v. Löwiseba40652007-08-30 20:10:57 +000015814 case $ac_mode in
15815 :F)
15816 #
15817 # CONFIG_FILE
15818 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015819
15820 case $INSTALL in
15821 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015822 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015823 esac
Trent Nelsonf6407a12012-08-30 14:56:13 +000015824 ac_MKDIR_P=$MKDIR_P
15825 case $MKDIR_P in
15826 [\\/$]* | ?:[\\/]* ) ;;
15827 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
15828 esac
Brett Cannon19fab762007-06-02 03:02:29 +000015829_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000015830
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015831cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015832# If the template does not know about datarootdir, expand it.
15833# FIXME: This hack should be removed a few years after 2.60.
15834ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015835ac_sed_dataroot='
15836/datarootdir/ {
Martin v. Löwiseba40652007-08-30 20:10:57 +000015837 p
15838 q
15839}
15840/@datadir@/p
15841/@docdir@/p
15842/@infodir@/p
15843/@localedir@/p
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015844/@mandir@/p'
15845case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Martin v. Löwiseba40652007-08-30 20:10:57 +000015846*datarootdir*) ac_datarootdir_seen=yes;;
15847*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015848 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
15849$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000015850_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015851cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015852 ac_datarootdir_hack='
15853 s&@datadir@&$datadir&g
15854 s&@docdir@&$docdir&g
15855 s&@infodir@&$infodir&g
15856 s&@localedir@&$localedir&g
15857 s&@mandir@&$mandir&g
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015858 s&\\\${datarootdir}&$datarootdir&g' ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015859esac
15860_ACEOF
15861
15862# Neutralize VPATH when `$srcdir' = `.'.
15863# Shell code in configure.ac might set extrasub.
15864# FIXME: do we really want to maintain this feature?
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015865cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15866ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000015867$extrasub
15868_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015869cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015870:t
15871/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015872s|@configure_input@|$ac_sed_conf_input|;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000015873s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015874s&@top_build_prefix@&$ac_top_build_prefix&;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000015875s&@srcdir@&$ac_srcdir&;t t
15876s&@abs_srcdir@&$ac_abs_srcdir&;t t
15877s&@top_srcdir@&$ac_top_srcdir&;t t
15878s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
15879s&@builddir@&$ac_builddir&;t t
15880s&@abs_builddir@&$ac_abs_builddir&;t t
15881s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
15882s&@INSTALL@&$ac_INSTALL&;t t
Trent Nelsonf6407a12012-08-30 14:56:13 +000015883s&@MKDIR_P@&$ac_MKDIR_P&;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000015884$ac_datarootdir_hack
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015885"
Matthias Klose3cef2a92012-03-14 23:39:33 +010015886eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
15887 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015888
Martin v. Löwiseba40652007-08-30 20:10:57 +000015889test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Matthias Klose3cef2a92012-03-14 23:39:33 +010015890 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
15891 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
15892 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015893 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015894which seems to be undefined. Please make sure it is defined" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015895$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015896which seems to be undefined. Please make sure it is defined" >&2;}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015897
Matthias Klose3cef2a92012-03-14 23:39:33 +010015898 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000015899 case $ac_file in
Matthias Klose3cef2a92012-03-14 23:39:33 +010015900 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
15901 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015902 esac \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015903 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015904 ;;
15905 :H)
15906 #
15907 # CONFIG_HEADER
15908 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015909 if test x"$ac_file" != x-; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015910 {
15911 $as_echo "/* $configure_input */" \
Matthias Klose3cef2a92012-03-14 23:39:33 +010015912 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
15913 } >"$ac_tmp/config.h" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015914 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Matthias Klose3cef2a92012-03-14 23:39:33 +010015915 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015916 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
15917$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015918 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015919 rm -f "$ac_file"
Matthias Klose3cef2a92012-03-14 23:39:33 +010015920 mv "$ac_tmp/config.h" "$ac_file" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015921 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015922 fi
15923 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015924 $as_echo "/* $configure_input */" \
Matthias Klose3cef2a92012-03-14 23:39:33 +010015925 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015926 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015927 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015928 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015929
Martin v. Löwiseba40652007-08-30 20:10:57 +000015930
15931 esac
15932
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000015933
15934 case $ac_file$ac_mode in
15935 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
15936
15937 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000015938done # for ac_tag
15939
Guido van Rossum627b2d71993-12-24 10:39:16 +000015940
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015941as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000015942_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015943ac_clean_files=$ac_clean_files_save
15944
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015945test $ac_write_fail = 0 ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015946 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015947
Martin v. Löwis11437992002-04-12 09:54:03 +000015948
15949# configure is writing to config.log, and then calls config.status.
15950# config.status does its own redirection, appending to config.log.
15951# Unfortunately, on DOS this fails, as config.log is still kept open
15952# by configure, so config.status won't be able to write to it; its
15953# output is simply discarded. So we exec the FD to /dev/null,
15954# effectively closing config.log, so it can be properly (re)opened and
15955# appended to by config.status. When coming back to configure, we
15956# need to make the FD available again.
15957if test "$no_create" != yes; then
15958 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000015959 ac_config_status_args=
15960 test "$silent" = yes &&
15961 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000015962 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000015963 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000015964 exec 5>>config.log
15965 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
15966 # would make configure fail if this is the last instruction.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015967 $ac_cs_success || as_fn_exit 1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015968fi
15969if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
15970 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
15971$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015972fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000015973
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015974
Martin v. Löwisf7afe952006-04-14 15:16:15 +000015975echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015976if test ! -f Modules/Setup
15977then
15978 cp $srcdir/Modules/Setup.dist Modules/Setup
15979fi
15980
Martin v. Löwisf7afe952006-04-14 15:16:15 +000015981echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015982if test ! -f Modules/Setup.local
15983then
15984 echo "# Edit this file for local setup changes" >Modules/Setup.local
15985fi
15986
15987echo "creating Makefile"
15988$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
15989 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000015990 Modules/Setup.local Modules/Setup
Skip Montanaro89e975f2007-08-22 19:05:21 +000015991
15992case $ac_sys_system in
15993BeOS)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015994 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000015995
15996 Support for BeOS is deprecated as of Python 2.6.
15997 See PEP 11 for the gory details.
15998 " >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015999$as_echo "$as_me: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000016000
16001 Support for BeOS is deprecated as of Python 2.6.
16002 See PEP 11 for the gory details.
16003 " >&2;}
16004 ;;
16005*) ;;
16006esac
16007
Neil Schemenauerc761fc82001-02-19 04:50:49 +000016008mv config.c Modules