blob: 8cf777e19b8336f8a471774aa56503558ef53487 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Matthias Klose3cef2a92012-03-14 23:39:33 +01002# From configure.ac Revision.
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004# Generated by GNU Autoconf 2.69 for python 2.7.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Georg Brandl464432d2009-05-20 18:24:08 +00006# Report bugs to <http://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00007#
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008#
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010#
11#
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012# This configure script is free software; the Free Software Foundation
13# gives unlimited permission to copy, distribute and modify it.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014## -------------------- ##
15## M4sh Initialization. ##
16## -------------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +000017
Martin v. Löwiseba40652007-08-30 20:10:57 +000018# Be more Bourne compatible
19DUALCASE=1; export DUALCASE # for MKS sh
Matthias Klosea0bea5d2010-05-08 10:00:28 +000020if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000021 emulate sh
22 NULLCMD=:
Matthias Klosea0bea5d2010-05-08 10:00:28 +000023 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000024 # is contrary to our usage. Disable this feature.
25 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000026 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000027else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000028 case `(set -o) 2>/dev/null` in #(
29 *posix*) :
30 set -o posix ;; #(
31 *) :
32 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000033esac
Martin v. Löwis11437992002-04-12 09:54:03 +000034fi
35
Skip Montanaro6dead952003-09-25 14:50:04 +000036
Matthias Klosea0bea5d2010-05-08 10:00:28 +000037as_nl='
38'
39export as_nl
40# Printing a long string crashes Solaris 7 /usr/bin/printf.
41as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
42as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
43as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
44# Prefer a ksh shell builtin over an external printf program on Solaris,
45# but without wasting forks for bash or zsh.
46if test -z "$BASH_VERSION$ZSH_VERSION" \
47 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
48 as_echo='print -r --'
49 as_echo_n='print -rn --'
50elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
51 as_echo='printf %s\n'
52 as_echo_n='printf %s'
53else
54 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
55 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
56 as_echo_n='/usr/ucb/echo -n'
57 else
58 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
59 as_echo_n_body='eval
60 arg=$1;
61 case $arg in #(
62 *"$as_nl"*)
63 expr "X$arg" : "X\\(.*\\)$as_nl";
64 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
65 esac;
66 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
67 '
68 export as_echo_n_body
69 as_echo_n='sh -c $as_echo_n_body as_echo'
70 fi
71 export as_echo_body
72 as_echo='sh -c $as_echo_body as_echo'
73fi
Martin v. Löwis11437992002-04-12 09:54:03 +000074
75# The user is always right.
76if test "${PATH_SEPARATOR+set}" != set; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000077 PATH_SEPARATOR=:
78 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
79 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
80 PATH_SEPARATOR=';'
81 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000082fi
Martin v. Löwis11437992002-04-12 09:54:03 +000083
Martin v. Löwiseba40652007-08-30 20:10:57 +000084
85# IFS
86# We need space, tab and new line, in precisely that order. Quoting is
87# there to prevent editors from complaining about space-tab.
88# (If _AS_PATH_WALK were called with IFS unset, it would disable word
89# splitting by setting IFS to empty value.)
Martin v. Löwiseba40652007-08-30 20:10:57 +000090IFS=" "" $as_nl"
91
92# Find who we are. Look in the path if we contain no directory separator.
Matthias Klose3cef2a92012-03-14 23:39:33 +010093as_myself=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000094case $0 in #((
Martin v. Löwiseba40652007-08-30 20:10:57 +000095 *[\\/]* ) as_myself=$0 ;;
96 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000097for as_dir in $PATH
98do
99 IFS=$as_save_IFS
100 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000101 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
102 done
Martin v. Löwiseba40652007-08-30 20:10:57 +0000103IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +0000104
Martin v. Löwiseba40652007-08-30 20:10:57 +0000105 ;;
106esac
107# We did not find ourselves, most probably we were run as `sh COMMAND'
108# in which case we are not to be found in the path.
109if test "x$as_myself" = x; then
110 as_myself=$0
111fi
112if test ! -f "$as_myself"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000113 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
114 exit 1
Martin v. Löwiseba40652007-08-30 20:10:57 +0000115fi
116
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000117# Unset variables that we do not need and which cause bugs (e.g. in
118# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
119# suppresses any "Segmentation fault" message there. '((' could
120# trigger a bug in pdksh 5.2.14.
121for as_var in BASH_ENV ENV MAIL MAILPATH
122do eval test x\${$as_var+set} = xset \
123 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Martin v. Löwiseba40652007-08-30 20:10:57 +0000124done
125PS1='$ '
126PS2='> '
127PS4='+ '
128
129# NLS nuisances.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000130LC_ALL=C
131export LC_ALL
132LANGUAGE=C
133export LANGUAGE
Martin v. Löwiseba40652007-08-30 20:10:57 +0000134
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000135# CDPATH.
136(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
137
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100138# Use a proper internal environment variable to ensure we don't fall
139 # into an infinite loop, continuously re-executing ourselves.
140 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
141 _as_can_reexec=no; export _as_can_reexec;
142 # We cannot yet assume a decent shell, so we have to provide a
143# neutralization value for shells without unset; and this also
144# works around shells that cannot unset nonexistent variables.
145# Preserve -v and -x to the replacement shell.
146BASH_ENV=/dev/null
147ENV=/dev/null
148(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
149case $- in # ((((
150 *v*x* | *x*v* ) as_opts=-vx ;;
151 *v* ) as_opts=-v ;;
152 *x* ) as_opts=-x ;;
153 * ) as_opts= ;;
154esac
155exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
156# Admittedly, this is quite paranoid, since all the known shells bail
157# out after a failed `exec'.
158$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
159as_fn_exit 255
160 fi
161 # We don't want this to propagate to other subprocesses.
162 { _as_can_reexec=; unset _as_can_reexec;}
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000163if test "x$CONFIG_SHELL" = x; then
164 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
165 emulate sh
166 NULLCMD=:
167 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
168 # is contrary to our usage. Disable this feature.
169 alias -g '\${1+\"\$@\"}'='\"\$@\"'
170 setopt NO_GLOB_SUBST
171else
172 case \`(set -o) 2>/dev/null\` in #(
173 *posix*) :
174 set -o posix ;; #(
175 *) :
176 ;;
177esac
178fi
179"
180 as_required="as_fn_return () { (exit \$1); }
181as_fn_success () { as_fn_return 0; }
182as_fn_failure () { as_fn_return 1; }
183as_fn_ret_success () { return 0; }
184as_fn_ret_failure () { return 1; }
185
186exitcode=0
187as_fn_success || { exitcode=1; echo as_fn_success failed.; }
188as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
189as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
190as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
191if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
192
193else
194 exitcode=1; echo positional parameters were not saved.
195fi
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100196test x\$exitcode = x0 || exit 1
197test -x / || exit 1"
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000198 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
199 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
200 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
201 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
202test \$(( 1 + 1 )) = 2 || exit 1"
203 if (eval "$as_required") 2>/dev/null; then :
204 as_have_required=yes
205else
206 as_have_required=no
207fi
208 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
209
210else
211 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
212as_found=false
213for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
214do
215 IFS=$as_save_IFS
216 test -z "$as_dir" && as_dir=.
217 as_found=:
218 case $as_dir in #(
219 /*)
220 for as_base in sh bash ksh sh5; do
221 # Try only shells that exist, to save several forks.
222 as_shell=$as_dir/$as_base
223 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
224 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
225 CONFIG_SHELL=$as_shell as_have_required=yes
226 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
227 break 2
228fi
229fi
230 done;;
231 esac
232 as_found=false
233done
234$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
235 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
236 CONFIG_SHELL=$SHELL as_have_required=yes
237fi; }
238IFS=$as_save_IFS
239
240
241 if test "x$CONFIG_SHELL" != x; then :
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100242 export CONFIG_SHELL
243 # We cannot yet assume a decent shell, so we have to provide a
244# neutralization value for shells without unset; and this also
245# works around shells that cannot unset nonexistent variables.
246# Preserve -v and -x to the replacement shell.
247BASH_ENV=/dev/null
248ENV=/dev/null
249(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
250case $- in # ((((
251 *v*x* | *x*v* ) as_opts=-vx ;;
252 *v* ) as_opts=-v ;;
253 *x* ) as_opts=-x ;;
254 * ) as_opts= ;;
255esac
256exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
257# Admittedly, this is quite paranoid, since all the known shells bail
258# out after a failed `exec'.
259$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
260exit 255
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000261fi
262
263 if test x$as_have_required = xno; then :
264 $as_echo "$0: This script requires a shell more modern than all"
265 $as_echo "$0: the shells that I found on your system."
266 if test x${ZSH_VERSION+set} = xset ; then
267 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
268 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
269 else
270 $as_echo "$0: Please tell bug-autoconf@gnu.org and
271$0: http://bugs.python.org/ about your system, including
272$0: any error possibly output before this message. Then
273$0: install a modern shell, or manually run the script
274$0: under such a shell if you do have one."
275 fi
276 exit 1
277fi
278fi
279fi
280SHELL=${CONFIG_SHELL-/bin/sh}
281export SHELL
282# Unset more variables known to interfere with behavior of common tools.
283CLICOLOR_FORCE= GREP_OPTIONS=
284unset CLICOLOR_FORCE GREP_OPTIONS
285
286## --------------------- ##
287## M4sh Shell Functions. ##
288## --------------------- ##
289# as_fn_unset VAR
290# ---------------
291# Portably unset VAR.
292as_fn_unset ()
293{
294 { eval $1=; unset $1;}
295}
296as_unset=as_fn_unset
297
298# as_fn_set_status STATUS
299# -----------------------
300# Set $? to STATUS, without forking.
301as_fn_set_status ()
302{
303 return $1
304} # as_fn_set_status
305
306# as_fn_exit STATUS
307# -----------------
308# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
309as_fn_exit ()
310{
311 set +e
312 as_fn_set_status $1
313 exit $1
314} # as_fn_exit
315
316# as_fn_mkdir_p
317# -------------
318# Create "$as_dir" as a directory, including parents if necessary.
319as_fn_mkdir_p ()
320{
321
322 case $as_dir in #(
323 -*) as_dir=./$as_dir;;
324 esac
325 test -d "$as_dir" || eval $as_mkdir_p || {
326 as_dirs=
327 while :; do
328 case $as_dir in #(
329 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
330 *) as_qdir=$as_dir;;
331 esac
332 as_dirs="'$as_qdir' $as_dirs"
333 as_dir=`$as_dirname -- "$as_dir" ||
334$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
335 X"$as_dir" : 'X\(//\)[^/]' \| \
336 X"$as_dir" : 'X\(//\)$' \| \
337 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
338$as_echo X"$as_dir" |
339 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
340 s//\1/
341 q
342 }
343 /^X\(\/\/\)[^/].*/{
344 s//\1/
345 q
346 }
347 /^X\(\/\/\)$/{
348 s//\1/
349 q
350 }
351 /^X\(\/\).*/{
352 s//\1/
353 q
354 }
355 s/.*/./; q'`
356 test -d "$as_dir" && break
357 done
358 test -z "$as_dirs" || eval "mkdir $as_dirs"
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000359 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000360
361
362} # as_fn_mkdir_p
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100363
364# as_fn_executable_p FILE
365# -----------------------
366# Test if FILE is an executable regular file.
367as_fn_executable_p ()
368{
369 test -f "$1" && test -x "$1"
370} # as_fn_executable_p
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000371# as_fn_append VAR VALUE
372# ----------------------
373# Append the text in VALUE to the end of the definition contained in VAR. Take
374# advantage of any shell optimizations that allow amortized linear growth over
375# repeated appends, instead of the typical quadratic growth present in naive
376# implementations.
377if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
378 eval 'as_fn_append ()
379 {
380 eval $1+=\$2
381 }'
382else
383 as_fn_append ()
384 {
385 eval $1=\$$1\$2
386 }
387fi # as_fn_append
388
389# as_fn_arith ARG...
390# ------------------
391# Perform arithmetic evaluation on the ARGs, and store the result in the
392# global $as_val. Take advantage of shells that can avoid forks. The arguments
393# must be portable across $(()) and expr.
394if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
395 eval 'as_fn_arith ()
396 {
397 as_val=$(( $* ))
398 }'
399else
400 as_fn_arith ()
401 {
402 as_val=`expr "$@" || test $? -eq 1`
403 }
404fi # as_fn_arith
405
406
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000407# as_fn_error STATUS ERROR [LINENO LOG_FD]
408# ----------------------------------------
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000409# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
410# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000411# script with STATUS, using 1 if that was 0.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000412as_fn_error ()
413{
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000414 as_status=$1; test $as_status -eq 0 && as_status=1
415 if test "$4"; then
416 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
417 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000418 fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000419 $as_echo "$as_me: error: $2" >&2
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000420 as_fn_exit $as_status
421} # as_fn_error
422
Martin v. Löwiseba40652007-08-30 20:10:57 +0000423if expr a : '\(a\)' >/dev/null 2>&1 &&
424 test "X`expr 00001 : '.*\(...\)'`" = X001; then
425 as_expr=expr
426else
427 as_expr=false
428fi
429
430if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
431 as_basename=basename
432else
433 as_basename=false
434fi
435
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000436if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
437 as_dirname=dirname
438else
439 as_dirname=false
440fi
Martin v. Löwiseba40652007-08-30 20:10:57 +0000441
Martin v. Löwiseba40652007-08-30 20:10:57 +0000442as_me=`$as_basename -- "$0" ||
443$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
444 X"$0" : 'X\(//\)$' \| \
445 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000446$as_echo X/"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +0000447 sed '/^.*\/\([^/][^/]*\)\/*$/{
448 s//\1/
449 q
450 }
451 /^X\/\(\/\/\)$/{
452 s//\1/
453 q
454 }
455 /^X\/\(\/\).*/{
456 s//\1/
457 q
458 }
459 s/.*/./; q'`
460
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000461# Avoid depending upon Character Ranges.
462as_cr_letters='abcdefghijklmnopqrstuvwxyz'
463as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
464as_cr_Letters=$as_cr_letters$as_cr_LETTERS
465as_cr_digits='0123456789'
466as_cr_alnum=$as_cr_Letters$as_cr_digits
Martin v. Löwiseba40652007-08-30 20:10:57 +0000467
468
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000469 as_lineno_1=$LINENO as_lineno_1a=$LINENO
470 as_lineno_2=$LINENO as_lineno_2a=$LINENO
471 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
472 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
473 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
Martin v. Löwiseba40652007-08-30 20:10:57 +0000474 sed -n '
475 p
476 /[$]LINENO/=
477 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000478 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +0000479 s/[$]LINENO.*/&-/
480 t lineno
481 b
482 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000483 N
Martin v. Löwiseba40652007-08-30 20:10:57 +0000484 :loop
485 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000486 t loop
Martin v. Löwiseba40652007-08-30 20:10:57 +0000487 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000488 ' >$as_me.lineno &&
Martin v. Löwiseba40652007-08-30 20:10:57 +0000489 chmod +x "$as_me.lineno" ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000490 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
Martin v. Löwis11437992002-04-12 09:54:03 +0000491
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100492 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
493 # already done that, so ensure we don't try to do so again and fall
494 # in an infinite loop. This has already happened in practice.
495 _as_can_reexec=no; export _as_can_reexec
Martin v. Löwis11437992002-04-12 09:54:03 +0000496 # Don't try to exec as it changes $[0], causing all sort of problems
497 # (the dirname of $[0] is not the place where we might find the
Martin v. Löwiseba40652007-08-30 20:10:57 +0000498 # original and so on. Autoconf is especially sensitive to this).
499 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000500 # Exit status is that of the last command.
501 exit
502}
503
Martin v. Löwiseba40652007-08-30 20:10:57 +0000504ECHO_C= ECHO_N= ECHO_T=
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000505case `echo -n x` in #(((((
Martin v. Löwiseba40652007-08-30 20:10:57 +0000506-n*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000507 case `echo 'xy\c'` in
Martin v. Löwiseba40652007-08-30 20:10:57 +0000508 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000509 xy) ECHO_C='\c';;
510 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
511 ECHO_T=' ';;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000512 esac;;
513*)
514 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000515esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000516
Martin v. Löwis11437992002-04-12 09:54:03 +0000517rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +0000518if test -d conf$$.dir; then
519 rm -f conf$$.dir/conf$$.file
520else
521 rm -f conf$$.dir
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000522 mkdir conf$$.dir 2>/dev/null
Martin v. Löwiseba40652007-08-30 20:10:57 +0000523fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000524if (echo >conf$$.file) 2>/dev/null; then
525 if ln -s conf$$.file conf$$ 2>/dev/null; then
526 as_ln_s='ln -s'
527 # ... but there are two gotchas:
528 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
529 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100530 # In both cases, we have to default to `cp -pR'.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000531 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100532 as_ln_s='cp -pR'
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000533 elif ln conf$$.file conf$$ 2>/dev/null; then
534 as_ln_s=ln
535 else
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100536 as_ln_s='cp -pR'
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000537 fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000538else
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100539 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +0000540fi
Martin v. Löwiseba40652007-08-30 20:10:57 +0000541rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
542rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000543
Skip Montanaro6dead952003-09-25 14:50:04 +0000544if mkdir -p . 2>/dev/null; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000545 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +0000546else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000547 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000548 as_mkdir_p=false
549fi
550
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100551as_test_x='test -x'
552as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +0000553
554# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000555as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000556
557# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000558as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000559
560
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000561test -n "$DJDIR" || exec 7<&0 </dev/null
562exec 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000563
564# Name of the host.
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000565# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
Martin v. Löwis11437992002-04-12 09:54:03 +0000566# so uname gets run too.
567ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
568
Martin v. Löwis11437992002-04-12 09:54:03 +0000569#
570# Initializations.
571#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000572ac_default_prefix=/usr/local
Martin v. Löwiseba40652007-08-30 20:10:57 +0000573ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000574ac_config_libobj_dir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000575LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000576cross_compiling=no
577subdirs=
578MFLAGS=
579MAKEFLAGS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000580
Martin v. Löwis11437992002-04-12 09:54:03 +0000581# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000582PACKAGE_NAME='python'
583PACKAGE_TARNAME='python'
Martin v. Löwis174440b2008-10-03 08:59:41 +0000584PACKAGE_VERSION='2.7'
585PACKAGE_STRING='python 2.7'
Georg Brandl464432d2009-05-20 18:24:08 +0000586PACKAGE_BUGREPORT='http://bugs.python.org/'
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000587PACKAGE_URL=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000588
589ac_unique_file="Include/object.h"
590# Factoring default headers for most tests.
591ac_includes_default="\
592#include <stdio.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +0000593#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000594# include <sys/types.h>
595#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000596#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000597# include <sys/stat.h>
598#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000599#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000600# include <stdlib.h>
601# include <stddef.h>
602#else
Martin v. Löwiseba40652007-08-30 20:10:57 +0000603# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000604# include <stdlib.h>
605# endif
606#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000607#ifdef HAVE_STRING_H
608# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000609# include <memory.h>
610# endif
611# include <string.h>
612#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000613#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000614# include <strings.h>
615#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000616#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000617# include <inttypes.h>
Martin v. Löwis11437992002-04-12 09:54:03 +0000618#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000619#ifdef HAVE_STDINT_H
620# include <stdint.h>
621#endif
622#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000623# include <unistd.h>
624#endif"
625
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000626ac_subst_vars='LTLIBOBJS
Ned Deily3f1d0b32014-11-20 02:11:03 -0800627ENSUREPIP
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000628SRCDIRS
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000629THREADHEADERS
630UNICODE_OBJS
631LIBC
632LIBM
633HAVE_GETHOSTBYNAME
634HAVE_GETHOSTBYNAME_R
635HAVE_GETHOSTBYNAME_R_3_ARG
636HAVE_GETHOSTBYNAME_R_5_ARG
637HAVE_GETHOSTBYNAME_R_6_ARG
638LIBOBJS
639TRUE
640MACHDEP_OBJS
641DYNLOADFILE
642DLINCLDIR
643THREADOBJ
644LDLAST
645USE_THREAD_MODULE
646SIGNAL_OBJS
647USE_SIGNAL_MODULE
Ned Deilya2a9f572013-10-25 00:30:10 -0700648TCLTK_LIBS
649TCLTK_INCLUDES
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000650LIBFFI_INCLUDEDIR
Benjamin Peterson64e8f6e2014-12-15 00:00:23 -0500651PKG_CONFIG_LIBDIR
652PKG_CONFIG_PATH
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000653PKG_CONFIG
654SHLIBS
655CFLAGSFORSHARED
656LINKFORSHARED
657CCSHARED
658BLDSHARED
659LDCXXSHARED
660LDSHARED
661SO
662LIBTOOL_CRUFT
663OTHER_LIBTOOL_OPT
664UNIVERSAL_ARCH_FLAGS
665BASECFLAGS
666OPT
667LN
Trent Nelsonf6407a12012-08-30 14:56:13 +0000668MKDIR_P
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000669INSTALL_DATA
670INSTALL_SCRIPT
671INSTALL_PROGRAM
Georg Brandl3a5508e2011-03-06 10:42:21 +0100672HAS_HG
673HGBRANCH
674HGTAG
675HGVERSION
Trent Nelsond86ceec2012-10-16 09:42:45 -0400676BASECPPFLAGS
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000677SVNVERSION
678ARFLAGS
doko@python.orgd65e2ba2013-01-31 23:52:03 +0100679ac_ct_AR
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000680AR
681RANLIB
682GNULD
683LINKCC
684RUNSHARED
685INSTSONAME
686LDLIBRARYDIR
687BLDLIBRARY
688DLLLIBRARY
689LDLIBRARY
690LIBRARY
691BUILDEXEEXT
692EGREP
693GREP
694CPP
doko@python.org4e63fbe2013-01-25 13:08:27 +0100695MULTIARCH
doko@python.orgd65e2ba2013-01-31 23:52:03 +0100696ac_ct_CXX
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000697MAINCC
698CXX
699OBJEXT
700EXEEXT
701ac_ct_CC
702CPPFLAGS
703LDFLAGS
704CFLAGS
705CC
706EXPORT_MACOSX_DEPLOYMENT_TARGET
707CONFIGURE_MACOSX_DEPLOYMENT_TARGET
708EXTRAMACHDEPPATH
709EXTRAPLATDIR
doko@ubuntu.coma50b0de2015-04-13 21:55:59 +0200710PLATDIR
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000711SGI_ABI
doko@python.orgd65e2ba2013-01-31 23:52:03 +0100712_PYTHON_HOST_PLATFORM
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000713MACHDEP
714FRAMEWORKINSTALLAPPSPREFIX
715FRAMEWORKUNIXTOOLSPREFIX
716FRAMEWORKALTINSTALLLAST
717FRAMEWORKALTINSTALLFIRST
718FRAMEWORKINSTALLLAST
719FRAMEWORKINSTALLFIRST
720PYTHONFRAMEWORKINSTALLDIR
721PYTHONFRAMEWORKPREFIX
722PYTHONFRAMEWORKDIR
723PYTHONFRAMEWORKIDENTIFIER
724PYTHONFRAMEWORK
725LIPO_32BIT_FLAGS
726ARCH_RUN_32BIT
727UNIVERSALSDK
728CONFIG_ARGS
729SOVERSION
730VERSION
doko@python.orgd65e2ba2013-01-31 23:52:03 +0100731PYTHON_FOR_BUILD
732host_os
733host_vendor
734host_cpu
735host
736build_os
737build_vendor
738build_cpu
739build
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000740target_alias
741host_alias
742build_alias
743LIBS
744ECHO_T
745ECHO_N
746ECHO_C
747DEFS
748mandir
749localedir
750libdir
751psdir
752pdfdir
753dvidir
754htmldir
755infodir
756docdir
757oldincludedir
758includedir
759localstatedir
760sharedstatedir
761sysconfdir
762datadir
763datarootdir
764libexecdir
765sbindir
766bindir
767program_transform_name
768prefix
769exec_prefix
770PACKAGE_URL
771PACKAGE_BUGREPORT
772PACKAGE_STRING
773PACKAGE_VERSION
774PACKAGE_TARNAME
775PACKAGE_NAME
776PATH_SEPARATOR
777SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000778ac_subst_files=''
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000779ac_user_opts='
780enable_option_checking
781enable_universalsdk
782with_universal_archs
783with_framework_name
784enable_framework
785with_gcc
786with_cxx_main
787with_suffix
788enable_shared
789enable_profiling
790with_pydebug
791enable_toolbox_glue
792with_libs
793with_system_expat
794with_system_ffi
Ned Deilya2a9f572013-10-25 00:30:10 -0700795with_tcltk_includes
796with_tcltk_libs
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000797with_dbmliborder
798with_signal_module
799with_dec_threads
800with_threads
801with_thread
802with_pth
803enable_ipv6
804with_doc_strings
805with_tsc
806with_pymalloc
807with_valgrind
808with_wctype_functions
809with_fpectl
810with_libm
811with_libc
812enable_big_digits
813enable_unicode
Ned Deily3f1d0b32014-11-20 02:11:03 -0800814with_ensurepip
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000815'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000816 ac_precious_vars='build_alias
817host_alias
818target_alias
819CC
820CFLAGS
821LDFLAGS
822LIBS
823CPPFLAGS
Benjamin Peterson64e8f6e2014-12-15 00:00:23 -0500824CPP
825PKG_CONFIG
826PKG_CONFIG_PATH
827PKG_CONFIG_LIBDIR'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000828
Guido van Rossum627b2d71993-12-24 10:39:16 +0000829
Guido van Rossum7f43da71994-08-01 12:15:30 +0000830# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000831ac_init_help=
832ac_init_version=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000833ac_unrecognized_opts=
834ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000835# The variables have the same names as the options, with
836# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000837cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000838exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000839no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000840no_recursion=
841prefix=NONE
842program_prefix=NONE
843program_suffix=NONE
844program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000845silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000846site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000847srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000848verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000849x_includes=NONE
850x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000851
852# Installation directory options.
853# These are left unexpanded so users can "make install exec_prefix=/foo"
854# and all the variables that are supposed to be based on exec_prefix
855# by default will actually change.
856# Use braces instead of parens because sh, perl, etc. also accept them.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000857# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000858bindir='${exec_prefix}/bin'
859sbindir='${exec_prefix}/sbin'
860libexecdir='${exec_prefix}/libexec'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000861datarootdir='${prefix}/share'
862datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000863sysconfdir='${prefix}/etc'
864sharedstatedir='${prefix}/com'
865localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000866includedir='${prefix}/include'
867oldincludedir='/usr/include'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000868docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
869infodir='${datarootdir}/info'
870htmldir='${docdir}'
871dvidir='${docdir}'
872pdfdir='${docdir}'
873psdir='${docdir}'
874libdir='${exec_prefix}/lib'
875localedir='${datarootdir}/locale'
876mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000877
Guido van Rossum7f43da71994-08-01 12:15:30 +0000878ac_prev=
Martin v. Löwiseba40652007-08-30 20:10:57 +0000879ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000880for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000881do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000882 # If the previous option needs an argument, assign it.
883 if test -n "$ac_prev"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +0000884 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000885 ac_prev=
886 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000887 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000888
Martin v. Löwiseba40652007-08-30 20:10:57 +0000889 case $ac_option in
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000890 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
891 *=) ac_optarg= ;;
892 *) ac_optarg=yes ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000893 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000894
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000895 # Accept the important Cygnus configure options, so we can diagnose typos.
896
Martin v. Löwiseba40652007-08-30 20:10:57 +0000897 case $ac_dashdash$ac_option in
898 --)
899 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000900
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000901 -bindir | --bindir | --bindi | --bind | --bin | --bi)
902 ac_prev=bindir ;;
903 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000904 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000905
906 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000907 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000908 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000909 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000910
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000911 -cache-file | --cache-file | --cache-fil | --cache-fi \
912 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
913 ac_prev=cache_file ;;
914 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
915 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000916 cache_file=$ac_optarg ;;
917
918 --config-cache | -C)
919 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000920
Martin v. Löwiseba40652007-08-30 20:10:57 +0000921 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000922 ac_prev=datadir ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000923 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000924 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000925
Martin v. Löwiseba40652007-08-30 20:10:57 +0000926 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
927 | --dataroo | --dataro | --datar)
928 ac_prev=datarootdir ;;
929 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
930 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
931 datarootdir=$ac_optarg ;;
932
Guido van Rossum7f43da71994-08-01 12:15:30 +0000933 -disable-* | --disable-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000934 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000935 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000936 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000937 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000938 ac_useropt_orig=$ac_useropt
939 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
940 case $ac_user_opts in
941 *"
942"enable_$ac_useropt"
943"*) ;;
944 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
945 ac_unrecognized_sep=', ';;
946 esac
947 eval enable_$ac_useropt=no ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000948
949 -docdir | --docdir | --docdi | --doc | --do)
950 ac_prev=docdir ;;
951 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
952 docdir=$ac_optarg ;;
953
954 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
955 ac_prev=dvidir ;;
956 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
957 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000958
959 -enable-* | --enable-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000960 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000961 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000962 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000963 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000964 ac_useropt_orig=$ac_useropt
965 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
966 case $ac_user_opts in
967 *"
968"enable_$ac_useropt"
969"*) ;;
970 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
971 ac_unrecognized_sep=', ';;
972 esac
973 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000974
Guido van Rossum7f43da71994-08-01 12:15:30 +0000975 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
976 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
977 | --exec | --exe | --ex)
978 ac_prev=exec_prefix ;;
979 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
980 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
981 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000982 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000983
984 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000985 # Obsolete; use --with-gas.
986 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000987
Martin v. Löwis11437992002-04-12 09:54:03 +0000988 -help | --help | --hel | --he | -h)
989 ac_init_help=long ;;
990 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
991 ac_init_help=recursive ;;
992 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
993 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000994
995 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000996 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000997 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000998 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000999
Martin v. Löwiseba40652007-08-30 20:10:57 +00001000 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1001 ac_prev=htmldir ;;
1002 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1003 | --ht=*)
1004 htmldir=$ac_optarg ;;
1005
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001006 -includedir | --includedir | --includedi | --included | --include \
1007 | --includ | --inclu | --incl | --inc)
1008 ac_prev=includedir ;;
1009 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1010 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001011 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001012
1013 -infodir | --infodir | --infodi | --infod | --info | --inf)
1014 ac_prev=infodir ;;
1015 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001016 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001017
1018 -libdir | --libdir | --libdi | --libd)
1019 ac_prev=libdir ;;
1020 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001021 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001022
1023 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1024 | --libexe | --libex | --libe)
1025 ac_prev=libexecdir ;;
1026 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1027 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001028 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001029
Martin v. Löwiseba40652007-08-30 20:10:57 +00001030 -localedir | --localedir | --localedi | --localed | --locale)
1031 ac_prev=localedir ;;
1032 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1033 localedir=$ac_optarg ;;
1034
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001035 -localstatedir | --localstatedir | --localstatedi | --localstated \
Martin v. Löwiseba40652007-08-30 20:10:57 +00001036 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001037 ac_prev=localstatedir ;;
1038 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Martin v. Löwiseba40652007-08-30 20:10:57 +00001039 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001040 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001041
1042 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1043 ac_prev=mandir ;;
1044 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001045 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001046
Guido van Rossum7f43da71994-08-01 12:15:30 +00001047 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001048 # Obsolete; use --without-fp.
1049 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001050
1051 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001052 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001053 no_create=yes ;;
1054
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001055 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1056 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1057 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001058
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001059 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1060 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1061 | --oldin | --oldi | --old | --ol | --o)
1062 ac_prev=oldincludedir ;;
1063 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1064 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1065 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001066 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001067
Guido van Rossum7f43da71994-08-01 12:15:30 +00001068 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1069 ac_prev=prefix ;;
1070 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001071 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001072
1073 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1074 | --program-pre | --program-pr | --program-p)
1075 ac_prev=program_prefix ;;
1076 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1077 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001078 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001079
1080 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1081 | --program-suf | --program-su | --program-s)
1082 ac_prev=program_suffix ;;
1083 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1084 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001085 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001086
1087 -program-transform-name | --program-transform-name \
1088 | --program-transform-nam | --program-transform-na \
1089 | --program-transform-n | --program-transform- \
1090 | --program-transform | --program-transfor \
1091 | --program-transfo | --program-transf \
1092 | --program-trans | --program-tran \
1093 | --progr-tra | --program-tr | --program-t)
1094 ac_prev=program_transform_name ;;
1095 -program-transform-name=* | --program-transform-name=* \
1096 | --program-transform-nam=* | --program-transform-na=* \
1097 | --program-transform-n=* | --program-transform-=* \
1098 | --program-transform=* | --program-transfor=* \
1099 | --program-transfo=* | --program-transf=* \
1100 | --program-trans=* | --program-tran=* \
1101 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001102 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001103
Martin v. Löwiseba40652007-08-30 20:10:57 +00001104 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1105 ac_prev=pdfdir ;;
1106 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1107 pdfdir=$ac_optarg ;;
1108
1109 -psdir | --psdir | --psdi | --psd | --ps)
1110 ac_prev=psdir ;;
1111 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1112 psdir=$ac_optarg ;;
1113
Guido van Rossum7f43da71994-08-01 12:15:30 +00001114 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1115 | -silent | --silent | --silen | --sile | --sil)
1116 silent=yes ;;
1117
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001118 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1119 ac_prev=sbindir ;;
1120 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1121 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001122 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001123
1124 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1125 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1126 | --sharedst | --shareds | --shared | --share | --shar \
1127 | --sha | --sh)
1128 ac_prev=sharedstatedir ;;
1129 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1130 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1131 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1132 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001133 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001134
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001135 -site | --site | --sit)
1136 ac_prev=site ;;
1137 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001138 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001139
Guido van Rossum7f43da71994-08-01 12:15:30 +00001140 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1141 ac_prev=srcdir ;;
1142 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001143 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001144
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001145 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1146 | --syscon | --sysco | --sysc | --sys | --sy)
1147 ac_prev=sysconfdir ;;
1148 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1149 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001150 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001151
Guido van Rossum7f43da71994-08-01 12:15:30 +00001152 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001153 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001154 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001155 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001156
1157 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1158 verbose=yes ;;
1159
Martin v. Löwis11437992002-04-12 09:54:03 +00001160 -version | --version | --versio | --versi | --vers | -V)
1161 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001162
1163 -with-* | --with-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001164 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001165 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001166 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001167 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001168 ac_useropt_orig=$ac_useropt
1169 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1170 case $ac_user_opts in
1171 *"
1172"with_$ac_useropt"
1173"*) ;;
1174 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1175 ac_unrecognized_sep=', ';;
1176 esac
1177 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001178
1179 -without-* | --without-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001180 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001181 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001182 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001183 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001184 ac_useropt_orig=$ac_useropt
1185 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1186 case $ac_user_opts in
1187 *"
1188"with_$ac_useropt"
1189"*) ;;
1190 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1191 ac_unrecognized_sep=', ';;
1192 esac
1193 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001194
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001195 --x)
1196 # Obsolete; use --with-x.
1197 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001198
1199 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1200 | --x-incl | --x-inc | --x-in | --x-i)
1201 ac_prev=x_includes ;;
1202 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1203 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001204 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001205
1206 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1207 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1208 ac_prev=x_libraries ;;
1209 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1210 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001211 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001212
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001213 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1214Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001215 ;;
1216
Martin v. Löwis11437992002-04-12 09:54:03 +00001217 *=*)
1218 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1219 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001220 case $ac_envvar in #(
1221 '' | [0-9]* | *[!_$as_cr_alnum]* )
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001222 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001223 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001224 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001225 export $ac_envvar ;;
1226
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001227 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001228 # FIXME: should be removed in autoconf 3.0.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001229 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001230 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001231 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Matthias Klose3cef2a92012-03-14 23:39:33 +01001232 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001233 ;;
1234
1235 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001236done
1237
Guido van Rossum7f43da71994-08-01 12:15:30 +00001238if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001239 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001240 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001241fi
1242
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001243if test -n "$ac_unrecognized_opts"; then
1244 case $enable_option_checking in
1245 no) ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001246 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001247 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1248 esac
1249fi
1250
1251# Check all directory arguments for consistency.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001252for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1253 datadir sysconfdir sharedstatedir localstatedir includedir \
1254 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1255 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001256do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001257 eval ac_val=\$$ac_var
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001258 # Remove trailing slashes.
1259 case $ac_val in
1260 */ )
1261 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1262 eval $ac_var=\$ac_val;;
1263 esac
1264 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001265 case $ac_val in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001266 [\\/$]* | ?:[\\/]* ) continue;;
1267 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001268 esac
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001269 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001270done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001271
Martin v. Löwis11437992002-04-12 09:54:03 +00001272# There might be people who depend on the old broken behavior: `$host'
1273# used to hold the argument of --host etc.
1274# FIXME: To remove some day.
1275build=$build_alias
1276host=$host_alias
1277target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001278
Martin v. Löwis11437992002-04-12 09:54:03 +00001279# FIXME: To remove some day.
1280if test "x$host_alias" != x; then
1281 if test "x$build_alias" = x; then
1282 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001283 elif test "x$build_alias" != "x$host_alias"; then
1284 cross_compiling=yes
1285 fi
1286fi
1287
1288ac_tool_prefix=
1289test -n "$host_alias" && ac_tool_prefix=$host_alias-
1290
1291test "$silent" = yes && exec 6>/dev/null
1292
Guido van Rossum627b2d71993-12-24 10:39:16 +00001293
Martin v. Löwiseba40652007-08-30 20:10:57 +00001294ac_pwd=`pwd` && test -n "$ac_pwd" &&
1295ac_ls_di=`ls -di .` &&
1296ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001297 as_fn_error $? "working directory cannot be determined"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001298test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001299 as_fn_error $? "pwd does not report name of working directory"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001300
1301
Guido van Rossum627b2d71993-12-24 10:39:16 +00001302# Find the source files, if location was not specified.
1303if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001304 ac_srcdir_defaulted=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +00001305 # Try the directory containing this script, then the parent directory.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001306 ac_confdir=`$as_dirname -- "$as_myself" ||
1307$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1308 X"$as_myself" : 'X\(//\)[^/]' \| \
1309 X"$as_myself" : 'X\(//\)$' \| \
1310 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1311$as_echo X"$as_myself" |
Martin v. Löwiseba40652007-08-30 20:10:57 +00001312 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1313 s//\1/
1314 q
1315 }
1316 /^X\(\/\/\)[^/].*/{
1317 s//\1/
1318 q
1319 }
1320 /^X\(\/\/\)$/{
1321 s//\1/
1322 q
1323 }
1324 /^X\(\/\).*/{
1325 s//\1/
1326 q
1327 }
1328 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001329 srcdir=$ac_confdir
Martin v. Löwiseba40652007-08-30 20:10:57 +00001330 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001331 srcdir=..
1332 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001333else
1334 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001335fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001336if test ! -r "$srcdir/$ac_unique_file"; then
1337 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001338 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Brett Cannon19fab762007-06-02 03:02:29 +00001339fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001340ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1341ac_abs_confdir=`(
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001342 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001343 pwd)`
1344# When building in place, set srcdir=.
1345if test "$ac_abs_confdir" = "$ac_pwd"; then
1346 srcdir=.
1347fi
1348# Remove unnecessary trailing slashes from srcdir.
1349# Double slashes in file names in object file debugging info
1350# mess up M-x gdb in Emacs.
1351case $srcdir in
1352*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1353esac
1354for ac_var in $ac_precious_vars; do
1355 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1356 eval ac_env_${ac_var}_value=\$${ac_var}
1357 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1358 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1359done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001360
Martin v. Löwis11437992002-04-12 09:54:03 +00001361#
1362# Report the --help message.
1363#
1364if test "$ac_init_help" = "long"; then
1365 # Omit some internal or obsolete options to make the list less imposing.
1366 # This message is too long to be a string in the A/UX 3.1 sh.
1367 cat <<_ACEOF
Martin v. Löwis174440b2008-10-03 08:59:41 +00001368\`configure' configures python 2.7 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001369
1370Usage: $0 [OPTION]... [VAR=VALUE]...
1371
1372To assign environment variables (e.g., CC, CFLAGS...), specify them as
1373VAR=VALUE. See below for descriptions of some of the useful variables.
1374
1375Defaults for the options are specified in brackets.
1376
1377Configuration:
1378 -h, --help display this help and exit
1379 --help=short display options specific to this package
1380 --help=recursive display the short help of all the included packages
1381 -V, --version display version information and exit
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001382 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001383 --cache-file=FILE cache test results in FILE [disabled]
1384 -C, --config-cache alias for \`--cache-file=config.cache'
1385 -n, --no-create do not create output files
1386 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1387
Martin v. Löwis11437992002-04-12 09:54:03 +00001388Installation directories:
1389 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001390 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001391 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001392 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001393
1394By default, \`make install' will install all the files in
1395\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1396an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1397for instance \`--prefix=\$HOME'.
1398
1399For better control, use the options below.
1400
1401Fine tuning of the installation directories:
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001402 --bindir=DIR user executables [EPREFIX/bin]
1403 --sbindir=DIR system admin executables [EPREFIX/sbin]
1404 --libexecdir=DIR program executables [EPREFIX/libexec]
1405 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1406 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1407 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1408 --libdir=DIR object code libraries [EPREFIX/lib]
1409 --includedir=DIR C header files [PREFIX/include]
1410 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1411 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1412 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1413 --infodir=DIR info documentation [DATAROOTDIR/info]
1414 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1415 --mandir=DIR man documentation [DATAROOTDIR/man]
1416 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1417 --htmldir=DIR html documentation [DOCDIR]
1418 --dvidir=DIR dvi documentation [DOCDIR]
1419 --pdfdir=DIR pdf documentation [DOCDIR]
1420 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001421_ACEOF
1422
1423 cat <<\_ACEOF
doko@python.orgd65e2ba2013-01-31 23:52:03 +01001424
1425System types:
1426 --build=BUILD configure for building on BUILD [guessed]
1427 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001428_ACEOF
1429fi
1430
1431if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001432 case $ac_init_help in
Martin v. Löwis174440b2008-10-03 08:59:41 +00001433 short | recursive ) echo "Configuration of python 2.7:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001434 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001435 cat <<\_ACEOF
1436
1437Optional Features:
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001438 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001439 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1440 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Brett Cannon91a1dec2008-02-13 19:15:44 +00001441 --enable-universalsdk[=SDKDIR]
Brett Cannon9a8bb0e2008-02-03 02:07:55 +00001442 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001443 --enable-framework[=INSTALLDIR]
1444 Build (MacOSX|Darwin) framework
1445 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001446 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001447 --enable-toolbox-glue disable/enable MacOSX glue code for extensions
1448 --enable-ipv6 Enable ipv6 (with ipv4) support
1449 --disable-ipv6 Disable ipv6 support
Mark Dickinsonefc82f72009-03-20 15:51:55 +00001450 --enable-big-digits[=BITS]
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001451 use big digits for Python longs [[BITS=30]]
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001452 --enable-unicode[=ucs[24]]
Benjamin Peterson66556b02010-05-25 02:23:32 +00001453 Enable Unicode strings (default is ucs2)
Martin v. Löwis11437992002-04-12 09:54:03 +00001454
1455Optional Packages:
1456 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1457 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001458 --with-universal-archs=ARCH
1459 select architectures for universal build ("32-bit",
Ronald Oussoren23d92532009-09-07 06:12:00 +00001460 "64-bit", "3-way", "intel" or "all")
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001461 --with-framework-name=FRAMEWORK
1462 specify an alternate name of the framework built
1463 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001464 --without-gcc never use gcc
Martin v. Löwis0f48d982006-04-14 14:34:26 +00001465 --with-cxx-main=<compiler>
1466 compile main() and link python executable with C++
1467 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001468 --with-suffix=.exe set executable suffix
1469 --with-pydebug build with Py_DEBUG defined
1470 --with-libs='lib1 ...' link against additional libs
Benjamin Peterson2c196742009-12-31 03:17:18 +00001471 --with-system-expat build pyexpat module using an installed expat
1472 library
Martin v. Löwis9176fc12006-04-11 11:12:43 +00001473 --with-system-ffi build _ctypes module using an installed ffi library
Ned Deilya2a9f572013-10-25 00:30:10 -07001474 --with-tcltk-includes='-I...'
1475 override search for Tcl and Tk include files
1476 --with-tcltk-libs='-L...'
1477 override search for Tcl and Tk libs
Benjamin Peterson867475c2009-04-29 20:36:25 +00001478 --with-dbmliborder=db1:db2:...
1479 order to check db backends for dbm. Valid value is a
1480 colon separated string with the backend names
1481 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001482 --with-signal-module disable/enable signal module
1483 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1484 --with(out)-threads[=DIRECTORY]
1485 disable/enable thread support
1486 --with(out)-thread[=DIRECTORY]
1487 deprecated; use --with(out)-threads
1488 --with-pth use GNU pth threading libraries
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001489 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001490 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001491 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00001492 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001493 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001494 --with-fpectl enable SIGFPE catching
1495 --with-libm=STRING math library
1496 --with-libc=STRING C library
Ned Deily3f1d0b32014-11-20 02:11:03 -08001497 --with(out)-ensurepip=[=OPTION]
1498 "install" or "upgrade" using bundled pip, default is
1499 "no"
Martin v. Löwis11437992002-04-12 09:54:03 +00001500
1501Some influential environment variables:
1502 CC C compiler command
1503 CFLAGS C compiler flags
1504 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1505 nonstandard directory <lib dir>
Martin v. Löwiseba40652007-08-30 20:10:57 +00001506 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001507 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Martin v. Löwiseba40652007-08-30 20:10:57 +00001508 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001509 CPP C preprocessor
Benjamin Peterson64e8f6e2014-12-15 00:00:23 -05001510 PKG_CONFIG path to pkg-config utility
1511 PKG_CONFIG_PATH
1512 directories to add to pkg-config's search path
1513 PKG_CONFIG_LIBDIR
1514 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001515
1516Use these variables to override the choices made by `configure' or to help
1517it to find libraries and programs with nonstandard names/locations.
1518
Georg Brandl464432d2009-05-20 18:24:08 +00001519Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001520_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001521ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001522fi
1523
1524if test "$ac_init_help" = "recursive"; then
1525 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001526 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001527 test -d "$ac_dir" ||
1528 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1529 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001530 ac_builddir=.
1531
Martin v. Löwiseba40652007-08-30 20:10:57 +00001532case "$ac_dir" in
1533.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1534*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001535 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001536 # A ".." for each directory in $ac_dir_suffix.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001537 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001538 case $ac_top_builddir_sub in
1539 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1540 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1541 esac ;;
1542esac
1543ac_abs_top_builddir=$ac_pwd
1544ac_abs_builddir=$ac_pwd$ac_dir_suffix
1545# for backward compatibility:
1546ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001547
1548case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001549 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001550 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001551 ac_top_srcdir=$ac_top_builddir_sub
1552 ac_abs_top_srcdir=$ac_pwd ;;
1553 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001554 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001555 ac_top_srcdir=$srcdir
1556 ac_abs_top_srcdir=$srcdir ;;
1557 *) # Relative name.
1558 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1559 ac_top_srcdir=$ac_top_build_prefix$srcdir
1560 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001561esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001562ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001563
Martin v. Löwiseba40652007-08-30 20:10:57 +00001564 cd "$ac_dir" || { ac_status=$?; continue; }
1565 # Check for guested configure.
1566 if test -f "$ac_srcdir/configure.gnu"; then
1567 echo &&
1568 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1569 elif test -f "$ac_srcdir/configure"; then
1570 echo &&
1571 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001572 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001573 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001574 fi || ac_status=$?
1575 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001576 done
1577fi
1578
Martin v. Löwiseba40652007-08-30 20:10:57 +00001579test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001580if $ac_init_version; then
1581 cat <<\_ACEOF
Martin v. Löwis174440b2008-10-03 08:59:41 +00001582python configure 2.7
Charles-François Natalibe2b9072013-01-08 19:47:00 +01001583generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001584
Charles-François Natalibe2b9072013-01-08 19:47:00 +01001585Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001586This configure script is free software; the Free Software Foundation
1587gives unlimited permission to copy, distribute and modify it.
1588_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001589 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001590fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001591
1592## ------------------------ ##
1593## Autoconf initialization. ##
1594## ------------------------ ##
1595
1596# ac_fn_c_try_compile LINENO
1597# --------------------------
1598# Try to compile conftest.$ac_ext, and return whether this succeeded.
1599ac_fn_c_try_compile ()
1600{
1601 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1602 rm -f conftest.$ac_objext
1603 if { { ac_try="$ac_compile"
1604case "(($ac_try" in
1605 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1606 *) ac_try_echo=$ac_try;;
1607esac
1608eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1609$as_echo "$ac_try_echo"; } >&5
1610 (eval "$ac_compile") 2>conftest.err
1611 ac_status=$?
1612 if test -s conftest.err; then
1613 grep -v '^ *+' conftest.err >conftest.er1
1614 cat conftest.er1 >&5
1615 mv -f conftest.er1 conftest.err
1616 fi
1617 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1618 test $ac_status = 0; } && {
1619 test -z "$ac_c_werror_flag" ||
1620 test ! -s conftest.err
1621 } && test -s conftest.$ac_objext; then :
1622 ac_retval=0
1623else
1624 $as_echo "$as_me: failed program was:" >&5
1625sed 's/^/| /' conftest.$ac_ext >&5
1626
1627 ac_retval=1
1628fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01001629 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001630 as_fn_set_status $ac_retval
1631
1632} # ac_fn_c_try_compile
1633
1634# ac_fn_c_try_cpp LINENO
1635# ----------------------
1636# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1637ac_fn_c_try_cpp ()
1638{
1639 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1640 if { { ac_try="$ac_cpp conftest.$ac_ext"
1641case "(($ac_try" in
1642 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1643 *) ac_try_echo=$ac_try;;
1644esac
1645eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1646$as_echo "$ac_try_echo"; } >&5
1647 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1648 ac_status=$?
1649 if test -s conftest.err; then
1650 grep -v '^ *+' conftest.err >conftest.er1
1651 cat conftest.er1 >&5
1652 mv -f conftest.er1 conftest.err
1653 fi
1654 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001655 test $ac_status = 0; } > conftest.i && {
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001656 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1657 test ! -s conftest.err
1658 }; then :
1659 ac_retval=0
1660else
1661 $as_echo "$as_me: failed program was:" >&5
1662sed 's/^/| /' conftest.$ac_ext >&5
1663
1664 ac_retval=1
1665fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01001666 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001667 as_fn_set_status $ac_retval
1668
1669} # ac_fn_c_try_cpp
1670
1671# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1672# -------------------------------------------------------
1673# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1674# the include files in INCLUDES and setting the cache variable VAR
1675# accordingly.
1676ac_fn_c_check_header_mongrel ()
1677{
1678 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Matthias Klose3cef2a92012-03-14 23:39:33 +01001679 if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001680 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1681$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001682if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001683 $as_echo_n "(cached) " >&6
1684fi
1685eval ac_res=\$$3
1686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1687$as_echo "$ac_res" >&6; }
1688else
1689 # Is the header compilable?
1690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1691$as_echo_n "checking $2 usability... " >&6; }
1692cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1693/* end confdefs.h. */
1694$4
1695#include <$2>
1696_ACEOF
1697if ac_fn_c_try_compile "$LINENO"; then :
1698 ac_header_compiler=yes
1699else
1700 ac_header_compiler=no
1701fi
1702rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1703{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1704$as_echo "$ac_header_compiler" >&6; }
1705
1706# Is the header present?
1707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1708$as_echo_n "checking $2 presence... " >&6; }
1709cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1710/* end confdefs.h. */
1711#include <$2>
1712_ACEOF
1713if ac_fn_c_try_cpp "$LINENO"; then :
1714 ac_header_preproc=yes
1715else
1716 ac_header_preproc=no
1717fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001718rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001719{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1720$as_echo "$ac_header_preproc" >&6; }
1721
1722# So? What about this header?
1723case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1724 yes:no: )
1725 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1726$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1727 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1728$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1729 ;;
1730 no:yes:* )
1731 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1732$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1733 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1734$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1735 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1736$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1737 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1738$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1739 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1740$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001741( $as_echo "## -------------------------------------- ##
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001742## Report this to http://bugs.python.org/ ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001743## -------------------------------------- ##"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001744 ) | sed "s/^/$as_me: WARNING: /" >&2
1745 ;;
1746esac
1747 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1748$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001749if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001750 $as_echo_n "(cached) " >&6
1751else
1752 eval "$3=\$ac_header_compiler"
1753fi
1754eval ac_res=\$$3
1755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1756$as_echo "$ac_res" >&6; }
1757fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01001758 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001759
1760} # ac_fn_c_check_header_mongrel
1761
1762# ac_fn_c_try_run LINENO
1763# ----------------------
1764# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1765# that executables *can* be run.
1766ac_fn_c_try_run ()
1767{
1768 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1769 if { { ac_try="$ac_link"
1770case "(($ac_try" in
1771 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1772 *) ac_try_echo=$ac_try;;
1773esac
1774eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1775$as_echo "$ac_try_echo"; } >&5
1776 (eval "$ac_link") 2>&5
1777 ac_status=$?
1778 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1779 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1780 { { case "(($ac_try" in
1781 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1782 *) ac_try_echo=$ac_try;;
1783esac
1784eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1785$as_echo "$ac_try_echo"; } >&5
1786 (eval "$ac_try") 2>&5
1787 ac_status=$?
1788 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1789 test $ac_status = 0; }; }; then :
1790 ac_retval=0
1791else
1792 $as_echo "$as_me: program exited with status $ac_status" >&5
1793 $as_echo "$as_me: failed program was:" >&5
1794sed 's/^/| /' conftest.$ac_ext >&5
1795
1796 ac_retval=$ac_status
1797fi
1798 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Matthias Klose3cef2a92012-03-14 23:39:33 +01001799 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001800 as_fn_set_status $ac_retval
1801
1802} # ac_fn_c_try_run
1803
1804# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1805# -------------------------------------------------------
1806# Tests whether HEADER exists and can be compiled using the include files in
1807# INCLUDES, setting the cache variable VAR accordingly.
1808ac_fn_c_check_header_compile ()
1809{
1810 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1811 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1812$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001813if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001814 $as_echo_n "(cached) " >&6
1815else
1816 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1817/* end confdefs.h. */
1818$4
1819#include <$2>
1820_ACEOF
1821if ac_fn_c_try_compile "$LINENO"; then :
1822 eval "$3=yes"
1823else
1824 eval "$3=no"
1825fi
1826rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1827fi
1828eval ac_res=\$$3
1829 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1830$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001831 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001832
1833} # ac_fn_c_check_header_compile
1834
1835# ac_fn_c_try_link LINENO
1836# -----------------------
1837# Try to link conftest.$ac_ext, and return whether this succeeded.
1838ac_fn_c_try_link ()
1839{
1840 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1841 rm -f conftest.$ac_objext conftest$ac_exeext
1842 if { { ac_try="$ac_link"
1843case "(($ac_try" in
1844 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1845 *) ac_try_echo=$ac_try;;
1846esac
1847eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1848$as_echo "$ac_try_echo"; } >&5
1849 (eval "$ac_link") 2>conftest.err
1850 ac_status=$?
1851 if test -s conftest.err; then
1852 grep -v '^ *+' conftest.err >conftest.er1
1853 cat conftest.er1 >&5
1854 mv -f conftest.er1 conftest.err
1855 fi
1856 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1857 test $ac_status = 0; } && {
1858 test -z "$ac_c_werror_flag" ||
1859 test ! -s conftest.err
1860 } && test -s conftest$ac_exeext && {
1861 test "$cross_compiling" = yes ||
Charles-François Natalibe2b9072013-01-08 19:47:00 +01001862 test -x conftest$ac_exeext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001863 }; then :
1864 ac_retval=0
1865else
1866 $as_echo "$as_me: failed program was:" >&5
1867sed 's/^/| /' conftest.$ac_ext >&5
1868
1869 ac_retval=1
1870fi
1871 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1872 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1873 # interfere with the next link command; also delete a directory that is
1874 # left behind by Apple's compiler. We do this before executing the actions.
1875 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Matthias Klose3cef2a92012-03-14 23:39:33 +01001876 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001877 as_fn_set_status $ac_retval
1878
1879} # ac_fn_c_try_link
1880
1881# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1882# -------------------------------------------
1883# Tests whether TYPE exists after having included INCLUDES, setting cache
1884# variable VAR accordingly.
1885ac_fn_c_check_type ()
1886{
1887 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1888 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1889$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001890if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001891 $as_echo_n "(cached) " >&6
1892else
1893 eval "$3=no"
1894 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1895/* end confdefs.h. */
1896$4
1897int
1898main ()
1899{
1900if (sizeof ($2))
1901 return 0;
1902 ;
1903 return 0;
1904}
1905_ACEOF
1906if ac_fn_c_try_compile "$LINENO"; then :
1907 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1908/* end confdefs.h. */
1909$4
1910int
1911main ()
1912{
1913if (sizeof (($2)))
1914 return 0;
1915 ;
1916 return 0;
1917}
1918_ACEOF
1919if ac_fn_c_try_compile "$LINENO"; then :
1920
1921else
1922 eval "$3=yes"
1923fi
1924rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1925fi
1926rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1927fi
1928eval ac_res=\$$3
1929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1930$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001931 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001932
1933} # ac_fn_c_check_type
1934
1935# ac_fn_c_find_uintX_t LINENO BITS VAR
1936# ------------------------------------
1937# Finds an unsigned integer type with width BITS, setting cache variable VAR
1938# accordingly.
1939ac_fn_c_find_uintX_t ()
1940{
1941 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1942 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1943$as_echo_n "checking for uint$2_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001944if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001945 $as_echo_n "(cached) " >&6
1946else
1947 eval "$3=no"
1948 # Order is important - never check a type that is potentially smaller
1949 # than half of the expected target width.
1950 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1951 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1952 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1953/* end confdefs.h. */
1954$ac_includes_default
1955int
1956main ()
1957{
1958static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01001959test_array [0] = 0;
1960return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001961
1962 ;
1963 return 0;
1964}
1965_ACEOF
1966if ac_fn_c_try_compile "$LINENO"; then :
1967 case $ac_type in #(
1968 uint$2_t) :
1969 eval "$3=yes" ;; #(
1970 *) :
1971 eval "$3=\$ac_type" ;;
1972esac
1973fi
1974rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001975 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001976
1977else
1978 break
1979fi
1980 done
1981fi
1982eval ac_res=\$$3
1983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1984$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001985 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001986
1987} # ac_fn_c_find_uintX_t
1988
1989# ac_fn_c_find_intX_t LINENO BITS VAR
1990# -----------------------------------
1991# Finds a signed integer type with width BITS, setting cache variable VAR
1992# accordingly.
1993ac_fn_c_find_intX_t ()
1994{
1995 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1996 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
1997$as_echo_n "checking for int$2_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001998if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001999 $as_echo_n "(cached) " >&6
2000else
2001 eval "$3=no"
2002 # Order is important - never check a type that is potentially smaller
2003 # than half of the expected target width.
2004 for ac_type in int$2_t 'int' 'long int' \
2005 'long long int' 'short int' 'signed char'; do
2006 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2007/* end confdefs.h. */
2008$ac_includes_default
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002009 enum { N = $2 / 2 - 1 };
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002010int
2011main ()
2012{
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002013static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002014test_array [0] = 0;
2015return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002016
2017 ;
2018 return 0;
2019}
2020_ACEOF
2021if ac_fn_c_try_compile "$LINENO"; then :
2022 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2023/* end confdefs.h. */
2024$ac_includes_default
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002025 enum { N = $2 / 2 - 1 };
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002026int
2027main ()
2028{
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002029static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002030 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002031test_array [0] = 0;
2032return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002033
2034 ;
2035 return 0;
2036}
2037_ACEOF
2038if ac_fn_c_try_compile "$LINENO"; then :
2039
2040else
2041 case $ac_type in #(
2042 int$2_t) :
2043 eval "$3=yes" ;; #(
2044 *) :
2045 eval "$3=\$ac_type" ;;
2046esac
2047fi
2048rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2049fi
2050rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002051 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002052
2053else
2054 break
2055fi
2056 done
2057fi
2058eval ac_res=\$$3
2059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2060$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002061 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002062
2063} # ac_fn_c_find_intX_t
2064
2065# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2066# --------------------------------------------
2067# Tries to find the compile-time value of EXPR in a program that includes
2068# INCLUDES, setting VAR accordingly. Returns whether the value could be
2069# computed
2070ac_fn_c_compute_int ()
2071{
2072 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2073 if test "$cross_compiling" = yes; then
2074 # Depending upon the size, compute the lo and hi bounds.
2075cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2076/* end confdefs.h. */
2077$4
2078int
2079main ()
2080{
2081static int test_array [1 - 2 * !(($2) >= 0)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002082test_array [0] = 0;
2083return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002084
2085 ;
2086 return 0;
2087}
2088_ACEOF
2089if ac_fn_c_try_compile "$LINENO"; then :
2090 ac_lo=0 ac_mid=0
2091 while :; do
2092 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2093/* end confdefs.h. */
2094$4
2095int
2096main ()
2097{
2098static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002099test_array [0] = 0;
2100return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002101
2102 ;
2103 return 0;
2104}
2105_ACEOF
2106if ac_fn_c_try_compile "$LINENO"; then :
2107 ac_hi=$ac_mid; break
2108else
2109 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2110 if test $ac_lo -le $ac_mid; then
2111 ac_lo= ac_hi=
2112 break
2113 fi
2114 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2115fi
2116rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2117 done
2118else
2119 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2120/* end confdefs.h. */
2121$4
2122int
2123main ()
2124{
2125static int test_array [1 - 2 * !(($2) < 0)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002126test_array [0] = 0;
2127return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002128
2129 ;
2130 return 0;
2131}
2132_ACEOF
2133if ac_fn_c_try_compile "$LINENO"; then :
2134 ac_hi=-1 ac_mid=-1
2135 while :; do
2136 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2137/* end confdefs.h. */
2138$4
2139int
2140main ()
2141{
2142static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002143test_array [0] = 0;
2144return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002145
2146 ;
2147 return 0;
2148}
2149_ACEOF
2150if ac_fn_c_try_compile "$LINENO"; then :
2151 ac_lo=$ac_mid; break
2152else
2153 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2154 if test $ac_mid -le $ac_hi; then
2155 ac_lo= ac_hi=
2156 break
2157 fi
2158 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2159fi
2160rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2161 done
2162else
2163 ac_lo= ac_hi=
2164fi
2165rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2166fi
2167rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2168# Binary search between lo and hi bounds.
2169while test "x$ac_lo" != "x$ac_hi"; do
2170 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2171 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2172/* end confdefs.h. */
2173$4
2174int
2175main ()
2176{
2177static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002178test_array [0] = 0;
2179return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002180
2181 ;
2182 return 0;
2183}
2184_ACEOF
2185if ac_fn_c_try_compile "$LINENO"; then :
2186 ac_hi=$ac_mid
2187else
2188 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2189fi
2190rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2191done
2192case $ac_lo in #((
2193?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2194'') ac_retval=1 ;;
2195esac
2196 else
2197 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2198/* end confdefs.h. */
2199$4
2200static long int longval () { return $2; }
2201static unsigned long int ulongval () { return $2; }
2202#include <stdio.h>
2203#include <stdlib.h>
2204int
2205main ()
2206{
2207
2208 FILE *f = fopen ("conftest.val", "w");
2209 if (! f)
2210 return 1;
2211 if (($2) < 0)
2212 {
2213 long int i = longval ();
2214 if (i != ($2))
2215 return 1;
2216 fprintf (f, "%ld", i);
2217 }
2218 else
2219 {
2220 unsigned long int i = ulongval ();
2221 if (i != ($2))
2222 return 1;
2223 fprintf (f, "%lu", i);
2224 }
2225 /* Do not output a trailing newline, as this causes \r\n confusion
2226 on some platforms. */
2227 return ferror (f) || fclose (f) != 0;
2228
2229 ;
2230 return 0;
2231}
2232_ACEOF
2233if ac_fn_c_try_run "$LINENO"; then :
2234 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2235else
2236 ac_retval=1
2237fi
2238rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2239 conftest.$ac_objext conftest.beam conftest.$ac_ext
2240rm -f conftest.val
2241
2242 fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01002243 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002244 as_fn_set_status $ac_retval
2245
2246} # ac_fn_c_compute_int
2247
2248# ac_fn_c_check_func LINENO FUNC VAR
2249# ----------------------------------
2250# Tests whether FUNC exists, setting the cache variable VAR accordingly
2251ac_fn_c_check_func ()
2252{
2253 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2254 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2255$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002256if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002257 $as_echo_n "(cached) " >&6
2258else
2259 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2260/* end confdefs.h. */
2261/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2262 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2263#define $2 innocuous_$2
2264
2265/* System header to define __stub macros and hopefully few prototypes,
2266 which can conflict with char $2 (); below.
2267 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2268 <limits.h> exists even on freestanding compilers. */
2269
2270#ifdef __STDC__
2271# include <limits.h>
2272#else
2273# include <assert.h>
2274#endif
2275
2276#undef $2
2277
2278/* Override any GCC internal prototype to avoid an error.
2279 Use char because int might match the return type of a GCC
2280 builtin and then its argument prototype would still apply. */
2281#ifdef __cplusplus
2282extern "C"
2283#endif
2284char $2 ();
2285/* The GNU C library defines this for functions which it implements
2286 to always fail with ENOSYS. Some functions are actually named
2287 something starting with __ and the normal name is an alias. */
2288#if defined __stub_$2 || defined __stub___$2
2289choke me
2290#endif
2291
2292int
2293main ()
2294{
2295return $2 ();
2296 ;
2297 return 0;
2298}
2299_ACEOF
2300if ac_fn_c_try_link "$LINENO"; then :
2301 eval "$3=yes"
2302else
2303 eval "$3=no"
2304fi
2305rm -f core conftest.err conftest.$ac_objext \
2306 conftest$ac_exeext conftest.$ac_ext
2307fi
2308eval ac_res=\$$3
2309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2310$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002311 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002312
2313} # ac_fn_c_check_func
2314
2315# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2316# ----------------------------------------------------
2317# Tries to find if the field MEMBER exists in type AGGR, after including
2318# INCLUDES, setting cache variable VAR accordingly.
2319ac_fn_c_check_member ()
2320{
2321 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2322 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2323$as_echo_n "checking for $2.$3... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002324if eval \${$4+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002325 $as_echo_n "(cached) " >&6
2326else
2327 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2328/* end confdefs.h. */
2329$5
2330int
2331main ()
2332{
2333static $2 ac_aggr;
2334if (ac_aggr.$3)
2335return 0;
2336 ;
2337 return 0;
2338}
2339_ACEOF
2340if ac_fn_c_try_compile "$LINENO"; then :
2341 eval "$4=yes"
2342else
2343 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2344/* end confdefs.h. */
2345$5
2346int
2347main ()
2348{
2349static $2 ac_aggr;
2350if (sizeof ac_aggr.$3)
2351return 0;
2352 ;
2353 return 0;
2354}
2355_ACEOF
2356if ac_fn_c_try_compile "$LINENO"; then :
2357 eval "$4=yes"
2358else
2359 eval "$4=no"
2360fi
2361rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2362fi
2363rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2364fi
2365eval ac_res=\$$4
2366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2367$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002368 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002369
2370} # ac_fn_c_check_member
2371
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002372# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2373# ---------------------------------------------
2374# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2375# accordingly.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002376ac_fn_c_check_decl ()
2377{
2378 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002379 as_decl_name=`echo $2|sed 's/ *(.*//'`
2380 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2381 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2382$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002383if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002384 $as_echo_n "(cached) " >&6
2385else
2386 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2387/* end confdefs.h. */
2388$4
2389int
2390main ()
2391{
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002392#ifndef $as_decl_name
2393#ifdef __cplusplus
2394 (void) $as_decl_use;
2395#else
2396 (void) $as_decl_name;
2397#endif
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002398#endif
2399
2400 ;
2401 return 0;
2402}
2403_ACEOF
2404if ac_fn_c_try_compile "$LINENO"; then :
2405 eval "$3=yes"
2406else
2407 eval "$3=no"
2408fi
2409rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2410fi
2411eval ac_res=\$$3
2412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2413$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002414 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002415
2416} # ac_fn_c_check_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +00002417cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002418This file contains any messages produced by compilers while
2419running configure, to aid debugging if configure makes a mistake.
2420
Martin v. Löwis174440b2008-10-03 08:59:41 +00002421It was created by python $as_me 2.7, which was
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002422generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002423
2424 $ $0 $@
2425
2426_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00002427exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002428{
2429cat <<_ASUNAME
2430## --------- ##
2431## Platform. ##
2432## --------- ##
2433
2434hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2435uname -m = `(uname -m) 2>/dev/null || echo unknown`
2436uname -r = `(uname -r) 2>/dev/null || echo unknown`
2437uname -s = `(uname -s) 2>/dev/null || echo unknown`
2438uname -v = `(uname -v) 2>/dev/null || echo unknown`
2439
2440/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2441/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2442
2443/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2444/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2445/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Martin v. Löwiseba40652007-08-30 20:10:57 +00002446/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002447/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2448/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2449/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2450
2451_ASUNAME
2452
2453as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2454for as_dir in $PATH
2455do
2456 IFS=$as_save_IFS
2457 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002458 $as_echo "PATH: $as_dir"
2459 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002460IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002461
2462} >&5
2463
2464cat >&5 <<_ACEOF
2465
2466
2467## ----------- ##
2468## Core tests. ##
2469## ----------- ##
2470
2471_ACEOF
2472
2473
2474# Keep a trace of the command line.
2475# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002476# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002477# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002478# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002479ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002480ac_configure_args0=
2481ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002482ac_must_keep_next=false
2483for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002484do
Skip Montanaro6dead952003-09-25 14:50:04 +00002485 for ac_arg
2486 do
2487 case $ac_arg in
2488 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2489 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2490 | -silent | --silent | --silen | --sile | --sil)
2491 continue ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002492 *\'*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002493 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002494 esac
2495 case $ac_pass in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002496 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002497 2)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002498 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002499 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002500 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002501 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002502 case $ac_arg in
2503 *=* | --config-cache | -C | -disable-* | --disable-* \
2504 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2505 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2506 | -with-* | --with-* | -without-* | --without-* | --x)
2507 case "$ac_configure_args0 " in
2508 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2509 esac
2510 ;;
2511 -* ) ac_must_keep_next=true ;;
2512 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002513 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002514 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002515 ;;
2516 esac
2517 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002518done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002519{ ac_configure_args0=; unset ac_configure_args0;}
2520{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002521
2522# When interrupted or exit'd, cleanup temporary files, and complete
2523# config.log. We remove comments because anyway the quotes in there
2524# would cause problems or look ugly.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002525# WARNING: Use '\'' to represent an apostrophe within the trap.
2526# 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 +00002527trap 'exit_status=$?
2528 # Save into config.log some information that might help in debugging.
2529 {
2530 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002531
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002532 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002533## Cache variables. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002534## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002535 echo
2536 # The following way of writing the cache mishandles newlines in values,
Martin v. Löwiseba40652007-08-30 20:10:57 +00002537(
2538 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2539 eval ac_val=\$$ac_var
2540 case $ac_val in #(
2541 *${as_nl}*)
2542 case $ac_var in #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002543 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2544$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002545 esac
2546 case $ac_var in #(
2547 _ | IFS | as_nl) ;; #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002548 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2549 *) { eval $ac_var=; unset $ac_var;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002550 esac ;;
2551 esac
2552 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002553 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +00002554 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2555 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002556 sed -n \
Martin v. Löwiseba40652007-08-30 20:10:57 +00002557 "s/'\''/'\''\\\\'\'''\''/g;
2558 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2559 ;; #(
Skip Montanaro89e975f2007-08-22 19:05:21 +00002560 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00002561 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaro89e975f2007-08-22 19:05:21 +00002562 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002563 esac |
2564 sort
2565)
Martin v. Löwis11437992002-04-12 09:54:03 +00002566 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002567
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002568 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002569## Output variables. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002570## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002571 echo
2572 for ac_var in $ac_subst_vars
2573 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002574 eval ac_val=\$$ac_var
2575 case $ac_val in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002576 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002577 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002578 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002579 done | sort
2580 echo
2581
2582 if test -n "$ac_subst_files"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002583 $as_echo "## ------------------- ##
Martin v. Löwiseba40652007-08-30 20:10:57 +00002584## File substitutions. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002585## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002586 echo
2587 for ac_var in $ac_subst_files
2588 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002589 eval ac_val=\$$ac_var
2590 case $ac_val in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002591 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002592 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002593 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002594 done | sort
2595 echo
2596 fi
2597
Martin v. Löwis11437992002-04-12 09:54:03 +00002598 if test -s confdefs.h; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002599 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002600## confdefs.h. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002601## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002602 echo
Martin v. Löwiseba40652007-08-30 20:10:57 +00002603 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002604 echo
2605 fi
2606 test "$ac_signal" != 0 &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002607 $as_echo "$as_me: caught signal $ac_signal"
2608 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002609 } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002610 rm -f core *.core core.conftest.* &&
2611 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002612 exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +00002613' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002614for ac_signal in 1 2 13 15; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002615 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002616done
2617ac_signal=0
2618
2619# confdefs.h avoids OS command line length limits that DEFS can exceed.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002620rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002621
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002622$as_echo "/* confdefs.h */" > confdefs.h
2623
Martin v. Löwis11437992002-04-12 09:54:03 +00002624# Predefined preprocessor variables.
2625
2626cat >>confdefs.h <<_ACEOF
2627#define PACKAGE_NAME "$PACKAGE_NAME"
2628_ACEOF
2629
Martin v. Löwis11437992002-04-12 09:54:03 +00002630cat >>confdefs.h <<_ACEOF
2631#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2632_ACEOF
2633
Martin v. Löwis11437992002-04-12 09:54:03 +00002634cat >>confdefs.h <<_ACEOF
2635#define PACKAGE_VERSION "$PACKAGE_VERSION"
2636_ACEOF
2637
Martin v. Löwis11437992002-04-12 09:54:03 +00002638cat >>confdefs.h <<_ACEOF
2639#define PACKAGE_STRING "$PACKAGE_STRING"
2640_ACEOF
2641
Martin v. Löwis11437992002-04-12 09:54:03 +00002642cat >>confdefs.h <<_ACEOF
2643#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2644_ACEOF
2645
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002646cat >>confdefs.h <<_ACEOF
2647#define PACKAGE_URL "$PACKAGE_URL"
2648_ACEOF
2649
Martin v. Löwis11437992002-04-12 09:54:03 +00002650
2651# Let the site file select an alternate cache file if it wants to.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002652# Prefer an explicitly selected file to automatically selected ones.
2653ac_site_file1=NONE
2654ac_site_file2=NONE
Martin v. Löwiseba40652007-08-30 20:10:57 +00002655if test -n "$CONFIG_SITE"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002656 # We do not want a PATH search for config.site.
2657 case $CONFIG_SITE in #((
2658 -*) ac_site_file1=./$CONFIG_SITE;;
2659 */*) ac_site_file1=$CONFIG_SITE;;
2660 *) ac_site_file1=./$CONFIG_SITE;;
2661 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00002662elif test "x$prefix" != xNONE; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002663 ac_site_file1=$prefix/share/config.site
2664 ac_site_file2=$prefix/etc/config.site
Martin v. Löwiseba40652007-08-30 20:10:57 +00002665else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002666 ac_site_file1=$ac_default_prefix/share/config.site
2667 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002668fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002669for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Martin v. Löwiseba40652007-08-30 20:10:57 +00002670do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002671 test "x$ac_site_file" = xNONE && continue
2672 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2673 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2674$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002675 sed 's/^/| /' "$ac_site_file" >&5
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002676 . "$ac_site_file" \
2677 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2678$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2679as_fn_error $? "failed to load site script $ac_site_file
Matthias Klose3cef2a92012-03-14 23:39:33 +01002680See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002681 fi
2682done
2683
2684if test -r "$cache_file"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002685 # Some versions of bash will fail to source /dev/null (special files
2686 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2687 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2688 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2689$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002690 case $cache_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00002691 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2692 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002693 esac
2694 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002695else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002696 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2697$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002698 >$cache_file
2699fi
2700
2701# Check that the precious variables saved in the cache have kept the same
2702# value.
2703ac_cache_corrupted=false
Martin v. Löwiseba40652007-08-30 20:10:57 +00002704for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002705 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2706 eval ac_new_set=\$ac_env_${ac_var}_set
Martin v. Löwiseba40652007-08-30 20:10:57 +00002707 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2708 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002709 case $ac_old_set,$ac_new_set in
2710 set,)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002711 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2712$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 +00002713 ac_cache_corrupted=: ;;
2714 ,set)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002715 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2716$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002717 ac_cache_corrupted=: ;;
2718 ,);;
2719 *)
2720 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002721 # differences in whitespace do not lead to failure.
2722 ac_old_val_w=`echo x $ac_old_val`
2723 ac_new_val_w=`echo x $ac_new_val`
2724 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2725 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2726$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2727 ac_cache_corrupted=:
2728 else
2729 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2730$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2731 eval $ac_var=\$ac_old_val
2732 fi
2733 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2734$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2735 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2736$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002737 fi;;
2738 esac
2739 # Pass precious variables to config.status.
2740 if test "$ac_new_set" = set; then
2741 case $ac_new_val in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002742 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002743 *) ac_arg=$ac_var=$ac_new_val ;;
2744 esac
2745 case " $ac_configure_args " in
2746 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002747 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002748 esac
2749 fi
2750done
2751if $ac_cache_corrupted; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002752 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2753$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2754 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2755$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002756 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002757fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002758## -------------------- ##
2759## Main body of script. ##
2760## -------------------- ##
Martin v. Löwiseba40652007-08-30 20:10:57 +00002761
Guido van Rossum7f43da71994-08-01 12:15:30 +00002762ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002763ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002764ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2765ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2766ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002767
Guido van Rossum627b2d71993-12-24 10:39:16 +00002768
Michael W. Hudson54241132001-12-07 15:38:26 +00002769
Martin v. Löwiseba40652007-08-30 20:10:57 +00002770ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002771
2772
doko@python.orgd65e2ba2013-01-31 23:52:03 +01002773ac_aux_dir=
2774for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2775 if test -f "$ac_dir/install-sh"; then
2776 ac_aux_dir=$ac_dir
2777 ac_install_sh="$ac_aux_dir/install-sh -c"
2778 break
2779 elif test -f "$ac_dir/install.sh"; then
2780 ac_aux_dir=$ac_dir
2781 ac_install_sh="$ac_aux_dir/install.sh -c"
2782 break
2783 elif test -f "$ac_dir/shtool"; then
2784 ac_aux_dir=$ac_dir
2785 ac_install_sh="$ac_aux_dir/shtool install -c"
2786 break
2787 fi
2788done
2789if test -z "$ac_aux_dir"; then
2790 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2791fi
2792
2793# These three variables are undocumented and unsupported,
2794# and are intended to be withdrawn in a future Autoconf release.
2795# They can cause serious problems if a builder's source tree is in a directory
2796# whose full name contains unusual characters.
2797ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2798ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2799ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2800
2801
2802# Make sure we can run config.sub.
2803$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2804 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2805
2806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2807$as_echo_n "checking build system type... " >&6; }
2808if ${ac_cv_build+:} false; then :
2809 $as_echo_n "(cached) " >&6
2810else
2811 ac_build_alias=$build_alias
2812test "x$ac_build_alias" = x &&
2813 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2814test "x$ac_build_alias" = x &&
2815 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2816ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2817 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2818
2819fi
2820{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2821$as_echo "$ac_cv_build" >&6; }
2822case $ac_cv_build in
2823*-*-*) ;;
2824*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2825esac
2826build=$ac_cv_build
2827ac_save_IFS=$IFS; IFS='-'
2828set x $ac_cv_build
2829shift
2830build_cpu=$1
2831build_vendor=$2
2832shift; shift
2833# Remember, the first character of IFS is used to create $*,
2834# except with old shells:
2835build_os=$*
2836IFS=$ac_save_IFS
2837case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2838
2839
2840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2841$as_echo_n "checking host system type... " >&6; }
2842if ${ac_cv_host+:} false; then :
2843 $as_echo_n "(cached) " >&6
2844else
2845 if test "x$host_alias" = x; then
2846 ac_cv_host=$ac_cv_build
2847else
2848 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2849 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2850fi
2851
2852fi
2853{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2854$as_echo "$ac_cv_host" >&6; }
2855case $ac_cv_host in
2856*-*-*) ;;
2857*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2858esac
2859host=$ac_cv_host
2860ac_save_IFS=$IFS; IFS='-'
2861set x $ac_cv_host
2862shift
2863host_cpu=$1
2864host_vendor=$2
2865shift; shift
2866# Remember, the first character of IFS is used to create $*,
2867# except with old shells:
2868host_os=$*
2869IFS=$ac_save_IFS
2870case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2871
2872
2873
2874
2875
Ned Deily983df862014-08-22 13:30:59 -07002876# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2877rm -f pybuilddir.txt
2878
doko@python.orgd65e2ba2013-01-31 23:52:03 +01002879if test "$cross_compiling" = yes; then
2880 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2881$as_echo_n "checking for python interpreter for cross build... " >&6; }
2882 if test -z "$PYTHON_FOR_BUILD"; then
2883 for interp in python$PACKAGE_VERSION python2 python; do
2884 which $interp >/dev/null 2>&1 || continue
2885 if $interp -c 'import sys;sys.exit(not (sys.version_info[:2] >= (2,7) and sys.version_info[0] < 3))'; then
2886 break
2887 fi
2888 interp=
2889 done
2890 if test x$interp = x; then
2891 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2892 fi
2893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2894$as_echo "$interp" >&6; }
doko@ubuntu.coma50b0de2015-04-13 21:55:59 +02002895 PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib:$(srcdir)/Lib/$(PLATDIR) '$interp
doko@python.orgd65e2ba2013-01-31 23:52:03 +01002896 fi
2897elif test "$cross_compiling" = maybe; then
2898 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
2899else
2900 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2901fi
2902
2903
Martin v. Löwis11437992002-04-12 09:54:03 +00002904
Georg Brandlbcd64a32009-03-31 21:45:18 +00002905if test "$prefix" != "/"; then
2906 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2907fi
2908
2909
Martin v. Löwis11437992002-04-12 09:54:03 +00002910
2911
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002912# We don't use PACKAGE_ variables, and they cause conflicts
2913# with other autoconf-based packages that include Python.h
2914grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2915rm confdefs.h
2916mv confdefs.h.new confdefs.h
2917
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002918
Martin v. Löwis174440b2008-10-03 08:59:41 +00002919VERSION=2.7
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002920
Martin v. Löwis1142de32002-03-29 16:28:31 +00002921
2922SOVERSION=1.0
2923
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002924# The later defininition of _XOPEN_SOURCE disables certain features
2925# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2926
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002927$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002928
2929
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002930# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2931# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2932# them.
2933
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002934$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002935
2936
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002937# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2938# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2939# them.
2940
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002941$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002942
2943
Martin v. Löwisd6320502004-08-12 13:45:08 +00002944# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2945# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2946
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002947$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002948
2949
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002950# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2951# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2952# them.
2953
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002954$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002955
2956
2957
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002958define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002959
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002960# Arguments passed to configure.
2961
2962CONFIG_ARGS="$ac_configure_args"
2963
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
2965$as_echo_n "checking for --enable-universalsdk... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002966# Check whether --enable-universalsdk was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002967if test "${enable_universalsdk+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00002968 enableval=$enable_universalsdk;
Ronald Oussoren988117f2006-04-29 11:31:35 +00002969 case $enableval in
2970 yes)
2971 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002972 if test ! -d "${enableval}"
2973 then
2974 enableval=/
2975 fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00002976 ;;
2977 esac
2978 case $enableval in
2979 no)
2980 UNIVERSALSDK=
2981 enable_universalsdk=
2982 ;;
2983 *)
2984 UNIVERSALSDK=$enableval
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002985 if test ! -d "${UNIVERSALSDK}"
2986 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002987 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002988 fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00002989 ;;
2990 esac
2991
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002992
Ronald Oussoren988117f2006-04-29 11:31:35 +00002993else
2994
2995 UNIVERSALSDK=
2996 enable_universalsdk=
2997
Martin v. Löwiseba40652007-08-30 20:10:57 +00002998fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00002999
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003000if test -n "${UNIVERSALSDK}"
3001then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3003$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003004else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003005 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3006$as_echo "no" >&6; }
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003007fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00003008
Martin v. Löwiseba40652007-08-30 20:10:57 +00003009
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +00003010
Ned Deily8e60f6e2013-05-30 00:14:29 -07003011ARCH_RUN_32BIT=""
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +00003012
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003013UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren92919a62009-12-24 13:30:58 +00003014
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3016$as_echo_n "checking for --with-universal-archs... " >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003017
3018# Check whether --with-universal-archs was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003019if test "${with_universal_archs+set}" = set; then :
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003020 withval=$with_universal_archs;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
3022$as_echo "$withval" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003023 UNIVERSAL_ARCHS="$withval"
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00003024 if test "${enable_universalsdk}" ; then
3025 :
3026 else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003027 as_fn_error $? "--with-universal-archs without --enable-universalsdk. See Mac/README" "$LINENO" 5
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00003028 fi
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003029
3030else
3031
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 32-bit" >&5
3033$as_echo "32-bit" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003034
3035fi
3036
3037
3038
3039
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003040
3041# Check whether --with-framework-name was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003042if test "${with_framework_name+set}" = set; then :
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003043 withval=$with_framework_name;
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00003044 if test "${enable_framework}"; then
3045 :
3046 else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003047 as_fn_error $? "--with-framework-name without --enable-framework. See Mac/README" "$LINENO" 5
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00003048 fi
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003049 PYTHONFRAMEWORK=${withval}
3050 PYTHONFRAMEWORKDIR=${withval}.framework
3051 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3052
3053else
3054
3055 PYTHONFRAMEWORK=Python
3056 PYTHONFRAMEWORKDIR=Python.framework
3057 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3058
3059fi
3060
Martin v. Löwiseba40652007-08-30 20:10:57 +00003061# Check whether --enable-framework was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003062if test "${enable_framework+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003063 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003064 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003065 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003066 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003067 esac
3068 case $enableval in
3069 no)
3070 PYTHONFRAMEWORK=
3071 PYTHONFRAMEWORKDIR=no-framework
3072 PYTHONFRAMEWORKPREFIX=
3073 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00003074 FRAMEWORKINSTALLFIRST=
3075 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00003076 FRAMEWORKALTINSTALLFIRST=
3077 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00003078 if test "x${prefix}" = "xNONE"; then
3079 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3080 else
3081 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3082 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003083 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003084 ;;
3085 *)
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003086 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003087 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00003088 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003089 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure bininstall maninstall"
Ronald Oussoren92919a62009-12-24 13:30:58 +00003090 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3091 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003092 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003093
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00003094 if test "x${prefix}" = "xNONE" ; then
3095 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003096
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00003097 else
3098 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3099 fi
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003100
3101 case "${enableval}" in
3102 /System*)
3103 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3104 if test "${prefix}" = "NONE" ; then
3105 # See below
3106 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3107 fi
3108 ;;
3109
3110 /Library*)
3111 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3112 ;;
3113
3114 */Library/Frameworks)
3115 MDIR="`dirname "${enableval}"`"
3116 MDIR="`dirname "${MDIR}"`"
3117 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3118
3119 if test "${prefix}" = "NONE"; then
3120 # User hasn't specified the
3121 # --prefix option, but wants to install
3122 # the framework in a non-default location,
3123 # ensure that the compatibility links get
3124 # installed relative to that prefix as well
3125 # instead of in /usr/local.
3126 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3127 fi
3128 ;;
3129
3130 *)
3131 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3132 ;;
3133 esac
3134
Jack Jansen127e56e2001-09-11 14:41:54 +00003135 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Ronald Oussoren836b0392006-05-14 19:56:34 +00003136
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003137 # Add files for Mac specific code to the list of output
Ronald Oussoren836b0392006-05-14 19:56:34 +00003138 # files:
Martin v. Löwiseba40652007-08-30 20:10:57 +00003139 ac_config_files="$ac_config_files Mac/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00003140
Martin v. Löwiseba40652007-08-30 20:10:57 +00003141 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00003142
Martin v. Löwiseba40652007-08-30 20:10:57 +00003143 ac_config_files="$ac_config_files Mac/IDLE/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00003144
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003145 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3146
3147 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3148
Jack Jansene578a632001-08-15 01:27:14 +00003149 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003150
Guido van Rossum563e7081996-09-10 18:20:48 +00003151else
Martin v. Löwis11437992002-04-12 09:54:03 +00003152
Jack Jansene578a632001-08-15 01:27:14 +00003153 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003154 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003155 PYTHONFRAMEWORKPREFIX=
3156 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00003157 FRAMEWORKINSTALLFIRST=
3158 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00003159 FRAMEWORKALTINSTALLFIRST=
3160 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00003161 if test "x${prefix}" = "xNONE" ; then
3162 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3163 else
3164 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3165 fi
Jack Jansene578a632001-08-15 01:27:14 +00003166 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003167
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003168
Martin v. Löwiseba40652007-08-30 20:10:57 +00003169fi
3170
Michael W. Hudson54241132001-12-07 15:38:26 +00003171
3172
3173
3174
Jack Jansene578a632001-08-15 01:27:14 +00003175
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00003176
3177
Ronald Oussoren5b787322006-06-06 19:50:24 +00003178
3179
3180
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003181
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003182
Jack Jansene578a632001-08-15 01:27:14 +00003183##AC_ARG_WITH(dyld,
Matthias Klose22520ea2010-05-08 10:14:46 +00003184## AS_HELP_STRING([--with-dyld],
3185## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003186##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003187# Set name for machine-dependent library files
3188
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3190$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003191if test -z "$MACHDEP"
3192then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003193 # avoid using uname for cross builds
3194 if test "$cross_compiling" = yes; then
3195 # ac_sys_system and ac_sys_release are only used for setting
3196 # `define_xopen_source' in the case statement below. For the
3197 # current supported cross builds, this macro is not adjusted.
3198 case "$host" in
3199 *-*-linux*)
3200 ac_sys_system=Linux
3201 ;;
3202 *-*-cygwin*)
3203 ac_sys_system=Cygwin
3204 ;;
3205 *)
3206 # for now, limit cross builds to known configurations
3207 MACHDEP="unknown"
3208 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3209 esac
3210 ac_sys_release=
3211 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003212 ac_sys_system=`uname -s`
Georg Brandlfe18a112009-09-04 07:55:14 +00003213 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003214 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003215 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003216 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003217 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003218 fi
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003219 fi
3220 ac_md_system=`echo $ac_sys_system |
3221 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3222 ac_md_release=`echo $ac_sys_release |
3223 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3224 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003225
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003226 case $MACHDEP in
Victor Stinneracacbaa2011-08-20 14:02:38 +02003227 linux*) MACHDEP="linux2";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003228 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003229 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003230 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00003231 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003232 '') MACHDEP="unknown";;
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003233 esac
3234fi
3235
3236
3237if test "$cross_compiling" = yes; then
3238 case "$host" in
3239 *-*-linux*)
3240 case "$host_cpu" in
3241 arm*)
3242 _host_cpu=arm
3243 ;;
3244 *)
3245 _host_cpu=$host_cpu
3246 esac
3247 ;;
3248 *-*-cygwin*)
3249 _host_cpu=
3250 ;;
3251 *)
3252 # for now, limit cross builds to known configurations
3253 MACHDEP="unknown"
3254 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003255 esac
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003256 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003257fi
Guido van Rossum91922671997-10-09 20:24:13 +00003258
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003259# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3260# disable features if it is defined, without any means to access these
3261# features as extensions. For these systems, we skip the definition of
3262# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3263# some feature, make sure there is no alternative way to access this
3264# feature. Also, when using wildcards, make sure you have verified the
3265# need for not defining _XOPEN_SOURCE on all systems matching the
3266# wildcard, and that the wildcard does not include future systems
3267# (which may remove their limitations).
3268case $ac_sys_system/$ac_sys_release in
3269 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3270 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003271 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis7875ef62010-02-15 21:41:12 +00003272 # In addition, Stefan Krah confirms that issue #1244610 exists through
3273 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali97781b02011-07-22 23:43:42 +02003274 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Martin v. Löwiscb78de62007-12-29 18:49:21 +00003275 define_xopen_source=no
3276 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3277 # also defined. This can be overridden by defining _BSD_SOURCE
3278 # As this has a different meaning on Linux, only define it on OpenBSD
3279
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003280$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwiscb78de62007-12-29 18:49:21 +00003281
3282 ;;
Charles-François Natali97781b02011-07-22 23:43:42 +02003283 OpenBSD/*)
Martin v. Löwis5e2dd862010-02-15 08:32:00 +00003284 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3285 # also defined. This can be overridden by defining _BSD_SOURCE
3286 # As this has a different meaning on Linux, only define it on OpenBSD
3287
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003288$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis5e2dd862010-02-15 08:32:00 +00003289
3290 ;;
Martin v. Löwis4d542ec2006-11-25 15:39:19 +00003291 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3292 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3293 # Marc Recht
Benjamin Petersoneac68f42008-11-16 17:54:55 +00003294 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 +00003295 define_xopen_source=no;;
Martin v. Löwisb41afb52010-05-28 15:28:47 +00003296 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3297 # request to enable features supported by the standard as a request
3298 # to disable features not supported by the standard. The best way
3299 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3300 # entirely and define __EXTENSIONS__ instead.
3301 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003302 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003303 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3304 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003305 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003306 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003307 define_xopen_source=no;;
3308 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003309 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003310 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003311 define_xopen_source=no;;
Martin v. Löwisbb86d832008-11-04 20:40:09 +00003312 # On FreeBSD 4, the math functions C89 does not cover are never defined
3313 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3314 FreeBSD/4.*)
3315 define_xopen_source=no;;
3316 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3317 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3318 # identifies itself as Darwin/7.*
3319 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3320 # disables platform specific features beyond repair.
3321 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3322 # has no effect, don't bother defining them
3323 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003324 define_xopen_source=no;;
Ronald Oussorena55af9a2010-01-17 16:25:57 +00003325 Darwin/1[0-9].*)
3326 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003327 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3328 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3329 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003330 AIX/4)
3331 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003332 AIX/5)
3333 if test `uname -r` -eq 1; then
3334 define_xopen_source=no
3335 fi
3336 ;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00003337 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3338 # defining NI_NUMERICHOST.
3339 QNX/6.3.2)
3340 define_xopen_source=no
3341 ;;
Martin v. Löwisa0588362006-04-04 06:03:50 +00003342
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003343esac
3344
3345if test $define_xopen_source = yes
3346then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003347
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003348$as_echo "#define _XOPEN_SOURCE 600" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003349
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003350
3351 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3352 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3353 # several APIs are not declared. Since this is also needed in some
3354 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003355
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003356$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003357
3358
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003359
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003360$as_echo "#define _POSIX_C_SOURCE 200112L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003361
3362
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003363fi
3364
Guido van Rossum91922671997-10-09 20:24:13 +00003365#
3366# SGI compilers allow the specification of the both the ABI and the
3367# ISA on the command line. Depending on the values of these switches,
3368# different and often incompatable code will be generated.
3369#
3370# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3371# thus supply support for various ABI/ISA combinations. The MACHDEP
3372# variable is also adjusted.
3373#
3374
3375if test ! -z "$SGI_ABI"
3376then
3377 CC="cc $SGI_ABI"
3378 LDFLAGS="$SGI_ABI $LDFLAGS"
3379 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3380fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003381{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3382$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003383
doko@ubuntu.coma50b0de2015-04-13 21:55:59 +02003384
3385PLATDIR=plat-$MACHDEP
3386
Jack Jansen83f898c2002-12-30 22:23:40 +00003387# And add extra plat-mac for darwin
3388
Jack Jansen7b59b422003-03-17 15:44:10 +00003389
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking EXTRAPLATDIR" >&5
3391$as_echo_n "checking EXTRAPLATDIR... " >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00003392if test -z "$EXTRAPLATDIR"
3393then
3394 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00003395 darwin)
3396 EXTRAPLATDIR="\$(PLATMACDIRS)"
3397 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
3398 ;;
3399 *)
3400 EXTRAPLATDIR=""
3401 EXTRAMACHDEPPATH=""
3402 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00003403 esac
3404fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003405{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRAPLATDIR" >&5
3406$as_echo "$EXTRAPLATDIR" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00003407
Jack Jansen6b08a402004-06-03 12:41:45 +00003408# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3409# it may influence the way we can build extensions, so distutils
3410# needs to check it
3411
Ronald Oussoren988117f2006-04-29 11:31:35 +00003412
Jack Jansen6b08a402004-06-03 12:41:45 +00003413CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Ronald Oussoren988117f2006-04-29 11:31:35 +00003414EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003415
Guido van Rossum627b2d71993-12-24 10:39:16 +00003416# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003417
3418# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3419# for debug/optimization stuff. BASECFLAGS is for flags that are required
3420# just to get things to compile and link. Users are free to override OPT
3421# when running configure or make. The build should not break if they do.
3422# BASECFLAGS should generally not be messed with, however.
3423
3424# XXX shouldn't some/most/all of this code be merged with the stuff later
3425# on that fiddles with OPT and BASECFLAGS?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003426{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3427$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003428
Martin v. Löwiseba40652007-08-30 20:10:57 +00003429# Check whether --with-gcc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003430if test "${with_gcc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003431 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003432 case $withval in
Mark Dickinson04b27232009-01-04 12:29:36 +00003433 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003434 without_gcc=yes;;
3435 yes) CC=gcc
3436 without_gcc=no;;
3437 *) CC=$withval
3438 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003439 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003440else
Martin v. Löwis11437992002-04-12 09:54:03 +00003441
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003442 case $ac_sys_system in
Antoine Pitrou285cd162010-09-21 15:23:17 +00003443 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003444 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003445 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003446 case $BE_HOST_CPU in
3447 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00003448 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003449 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00003450 BASECFLAGS="$BASECFLAGS -export pragma"
3451 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003452 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003453 ;;
3454 x86)
Fred Drake5790be12000-10-09 17:06:13 +00003455 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003456 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00003457 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003458 ;;
3459 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003460 as_fn_error $? "Unknown BeOS platform \"$BE_HOST_CPU\"" "$LINENO" 5
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003461 ;;
3462 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003463 AR="\$(srcdir)/Modules/ar_beos"
3464 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003465 ;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003466 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003467 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00003468fi
3469
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003470{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3471$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003472
Guido van Rossum8b131c51995-03-09 14:10:13 +00003473# If the user switches compilers, we can't believe the cache
3474if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3475then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003476 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003477(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003478fi
3479
Trent Nelson15daa352012-12-13 06:46:39 +00003480if test "$MACHDEP" = "irix6" && test "$CC" != "gcc"; then
3481 # Normally, MIPSpro CC treats #error directives as warnings, which means
3482 # a successful exit code is returned (0). This is a problem because IRIX
3483 # has a bunch of system headers with this guard at the top:
3484 #
3485 # #ifndef __c99
3486 # #error This header file is to be used only for c99 mode compilations
3487 # #else
3488 #
3489 # When autoconf tests for such a header, like stdint.h, this happens:
3490 #
3491 # configure:4619: cc -c conftest.c >&5
3492 # cc-1035 cc: WARNING File = /usr/include/stdint.h, Line = 5
3493 # #error directive: This header file is to be used only for c99 mode
3494 # compilations
3495 #
3496 # #error This header file is to be used only for c99 mode compilations
3497 # ^
3498 #
3499 # configure:4619: $? = 0
3500 # configure:4619: result: yes
3501 #
3502 # Therefore, we use `-diag_error 1035` to have the compiler treat the
3503 # warning as an error, which causes cc to return a non-zero result,
3504 # which autoconf can interpret correctly.
3505 CFLAGS="$CFLAGS -diag_error 1035"
3506 # Whilst we're here, we might as well make sure CXX defaults to something
3507 # sensible if we're not using gcc.
3508 if test -z "$CXX"; then
3509 CXX="CC"
3510 fi
3511fi
3512
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00003513# If the user set CFLAGS, use this instead of the automatically
3514# determined setting
3515preset_cflags="$CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +00003516ac_ext=c
3517ac_cpp='$CPP $CPPFLAGS'
3518ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3519ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3520ac_compiler_gnu=$ac_cv_c_compiler_gnu
3521if test -n "$ac_tool_prefix"; then
3522 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3523set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3525$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003526if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003527 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003528else
3529 if test -n "$CC"; then
3530 ac_cv_prog_CC="$CC" # Let the user override the test.
3531else
Martin v. Löwis11437992002-04-12 09:54:03 +00003532as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3533for as_dir in $PATH
3534do
3535 IFS=$as_save_IFS
3536 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003537 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003538 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003539 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003540 $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 +00003541 break 2
3542 fi
3543done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003544 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003545IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003546
Jack Jansendd19cf82001-12-06 22:36:17 +00003547fi
3548fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003549CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003550if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3552$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003553else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003554 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3555$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003556fi
3557
Martin v. Löwiseba40652007-08-30 20:10:57 +00003558
Martin v. Löwis11437992002-04-12 09:54:03 +00003559fi
3560if test -z "$ac_cv_prog_CC"; then
3561 ac_ct_CC=$CC
3562 # Extract the first word of "gcc", so it can be a program name with args.
3563set dummy gcc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3565$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003566if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003567 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003568else
3569 if test -n "$ac_ct_CC"; then
3570 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3571else
3572as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3573for as_dir in $PATH
3574do
3575 IFS=$as_save_IFS
3576 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003577 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003578 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003579 ac_cv_prog_ac_ct_CC="gcc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003580 $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 +00003581 break 2
3582 fi
3583done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003584 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003585IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003586
3587fi
3588fi
3589ac_ct_CC=$ac_cv_prog_ac_ct_CC
3590if test -n "$ac_ct_CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003591 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3592$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003593else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3595$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003596fi
3597
Martin v. Löwiseba40652007-08-30 20:10:57 +00003598 if test "x$ac_ct_CC" = x; then
3599 CC=""
3600 else
3601 case $cross_compiling:$ac_tool_warned in
3602yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003603{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3604$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00003605ac_tool_warned=yes ;;
3606esac
3607 CC=$ac_ct_CC
3608 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003609else
3610 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003611fi
3612
Jack Jansendd19cf82001-12-06 22:36:17 +00003613if test -z "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003614 if test -n "$ac_tool_prefix"; then
3615 # 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 +00003616set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3618$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003619if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003620 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003621else
3622 if test -n "$CC"; then
3623 ac_cv_prog_CC="$CC" # Let the user override the test.
3624else
Martin v. Löwis11437992002-04-12 09:54:03 +00003625as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3626for as_dir in $PATH
3627do
3628 IFS=$as_save_IFS
3629 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003630 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003631 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003632 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003633 $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 +00003634 break 2
3635 fi
3636done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003637 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003638IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003639
3640fi
3641fi
3642CC=$ac_cv_prog_CC
3643if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3645$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003646else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3648$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003649fi
3650
Martin v. Löwiseba40652007-08-30 20:10:57 +00003651
Martin v. Löwis11437992002-04-12 09:54:03 +00003652 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003653fi
3654if test -z "$CC"; then
3655 # Extract the first word of "cc", so it can be a program name with args.
3656set dummy cc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3658$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003659if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003660 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003661else
3662 if test -n "$CC"; then
3663 ac_cv_prog_CC="$CC" # Let the user override the test.
3664else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003665 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003666as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3667for as_dir in $PATH
3668do
3669 IFS=$as_save_IFS
3670 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003671 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003672 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003673 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3674 ac_prog_rejected=yes
3675 continue
3676 fi
3677 ac_cv_prog_CC="cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003678 $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 +00003679 break 2
3680 fi
3681done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003682 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003683IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003684
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003685if test $ac_prog_rejected = yes; then
3686 # We found a bogon in the path, so make sure we never use it.
3687 set dummy $ac_cv_prog_CC
3688 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003689 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003690 # We chose a different compiler from the bogus one.
3691 # However, it has the same basename, so the bogon will be chosen
3692 # first if we set CC to just the basename; use the full file name.
3693 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003694 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003695 fi
3696fi
3697fi
3698fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003699CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003700if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3702$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003703else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3705$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003706fi
3707
Martin v. Löwiseba40652007-08-30 20:10:57 +00003708
Martin v. Löwis11437992002-04-12 09:54:03 +00003709fi
3710if test -z "$CC"; then
3711 if test -n "$ac_tool_prefix"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003712 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003713 do
3714 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3715set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3717$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003718if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003719 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003720else
3721 if test -n "$CC"; then
3722 ac_cv_prog_CC="$CC" # Let the user override the test.
3723else
Martin v. Löwis11437992002-04-12 09:54:03 +00003724as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3725for as_dir in $PATH
3726do
3727 IFS=$as_save_IFS
3728 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003729 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003730 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003731 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003732 $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 +00003733 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003734 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003735done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003736 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003737IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003738
3739fi
3740fi
3741CC=$ac_cv_prog_CC
3742if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003743 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3744$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003745else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3747$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003748fi
3749
Martin v. Löwiseba40652007-08-30 20:10:57 +00003750
Martin v. Löwis11437992002-04-12 09:54:03 +00003751 test -n "$CC" && break
3752 done
3753fi
3754if test -z "$CC"; then
3755 ac_ct_CC=$CC
Martin v. Löwiseba40652007-08-30 20:10:57 +00003756 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003757do
3758 # Extract the first word of "$ac_prog", so it can be a program name with args.
3759set dummy $ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3761$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003762if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003763 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003764else
3765 if test -n "$ac_ct_CC"; then
3766 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3767else
3768as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3769for as_dir in $PATH
3770do
3771 IFS=$as_save_IFS
3772 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003773 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003774 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003775 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003776 $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 +00003777 break 2
3778 fi
3779done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003780 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003781IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003782
Martin v. Löwis11437992002-04-12 09:54:03 +00003783fi
3784fi
3785ac_ct_CC=$ac_cv_prog_ac_ct_CC
3786if test -n "$ac_ct_CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3788$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003789else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3791$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003792fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003793
Martin v. Löwiseba40652007-08-30 20:10:57 +00003794
Martin v. Löwis11437992002-04-12 09:54:03 +00003795 test -n "$ac_ct_CC" && break
3796done
Michael W. Hudson54241132001-12-07 15:38:26 +00003797
Martin v. Löwiseba40652007-08-30 20:10:57 +00003798 if test "x$ac_ct_CC" = x; then
3799 CC=""
3800 else
3801 case $cross_compiling:$ac_tool_warned in
3802yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003803{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3804$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00003805ac_tool_warned=yes ;;
3806esac
3807 CC=$ac_ct_CC
3808 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003809fi
3810
3811fi
3812
3813
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003814test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3815$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003816as_fn_error $? "no acceptable C compiler found in \$PATH
Matthias Klose3cef2a92012-03-14 23:39:33 +01003817See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003818
3819# Provide some information about the compiler.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003820$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3821set X $ac_compile
3822ac_compiler=$2
3823for ac_option in --version -v -V -qversion; do
3824 { { ac_try="$ac_compiler $ac_option >&5"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003825case "(($ac_try" in
3826 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3827 *) ac_try_echo=$ac_try;;
3828esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003829eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3830$as_echo "$ac_try_echo"; } >&5
3831 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003832 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003833 if test -s conftest.err; then
3834 sed '10a\
3835... rest of stderr output deleted ...
3836 10q' conftest.err >conftest.er1
3837 cat conftest.er1 >&5
3838 fi
3839 rm -f conftest.er1 conftest.err
3840 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3841 test $ac_status = 0; }
3842done
Martin v. Löwis11437992002-04-12 09:54:03 +00003843
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003844cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003845/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003846
Martin v. Löwis11437992002-04-12 09:54:03 +00003847int
3848main ()
3849{
3850
3851 ;
3852 return 0;
3853}
3854_ACEOF
3855ac_clean_files_save=$ac_clean_files
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003856ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003857# Try to create an executable without -o first, disregard a.out.
3858# It will help us diagnose broken compilers, and finding out an intuition
3859# of exeext.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3861$as_echo_n "checking whether the C compiler works... " >&6; }
3862ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3863
3864# The possible output files:
3865ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3866
Martin v. Löwiseba40652007-08-30 20:10:57 +00003867ac_rmfiles=
3868for ac_file in $ac_files
3869do
3870 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003871 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00003872 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3873 esac
3874done
3875rm -f $ac_rmfiles
3876
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003877if { { ac_try="$ac_link_default"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003878case "(($ac_try" in
3879 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3880 *) ac_try_echo=$ac_try;;
3881esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003882eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3883$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003884 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003885 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003886 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3887 test $ac_status = 0; }; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003888 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3889# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3890# in a Makefile. We should not override ac_cv_exeext if it was cached,
3891# so that the user can short-circuit this test for compilers unknown to
3892# Autoconf.
3893for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003894do
3895 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003896 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003897 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Skip Montanarof0d5f792004-08-15 14:08:23 +00003898 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003899 [ab].out )
Skip Montanarof0d5f792004-08-15 14:08:23 +00003900 # We found the default executable, but exeext='' is most
3901 # certainly right.
3902 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003903 *.* )
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003904 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Martin v. Löwiseba40652007-08-30 20:10:57 +00003905 then :; else
3906 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3907 fi
3908 # We set ac_cv_exeext here because the later test for it is not
3909 # safe: cross compilers may not add the suffix if given an `-o'
3910 # argument, so we may need to know it at that point already.
3911 # Even if this section looks crufty: it has the advantage of
3912 # actually working.
Skip Montanarof0d5f792004-08-15 14:08:23 +00003913 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003914 * )
Skip Montanarof0d5f792004-08-15 14:08:23 +00003915 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003916 esac
3917done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003918test "$ac_cv_exeext" = no && ac_cv_exeext=
3919
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003920else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003921 ac_file=''
3922fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003923if test -z "$ac_file"; then :
3924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3925$as_echo "no" >&6; }
3926$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003927sed 's/^/| /' conftest.$ac_ext >&5
3928
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003929{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3930$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003931as_fn_error 77 "C compiler cannot create executables
Matthias Klose3cef2a92012-03-14 23:39:33 +01003932See \`config.log' for more details" "$LINENO" 5; }
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003933else
3934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3935$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003936fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3938$as_echo_n "checking for C compiler default output file name... " >&6; }
3939{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3940$as_echo "$ac_file" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003941ac_exeext=$ac_cv_exeext
Michael W. Hudson54241132001-12-07 15:38:26 +00003942
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003943rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00003944ac_clean_files=$ac_clean_files_save
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3946$as_echo_n "checking for suffix of executables... " >&6; }
3947if { { ac_try="$ac_link"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003948case "(($ac_try" in
3949 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3950 *) ac_try_echo=$ac_try;;
3951esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003952eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3953$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003954 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003955 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003956 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3957 test $ac_status = 0; }; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00003958 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3959# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3960# work properly (i.e., refer to `conftest.exe'), while it won't with
3961# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00003962for ac_file in conftest.exe conftest conftest.*; do
3963 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003964 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003965 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003966 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
Skip Montanarof0d5f792004-08-15 14:08:23 +00003967 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003968 * ) break;;
3969 esac
3970done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003971else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003972 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3973$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003974as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Matthias Klose3cef2a92012-03-14 23:39:33 +01003975See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003976fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003977rm -f conftest conftest$ac_cv_exeext
3978{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3979$as_echo "$ac_cv_exeext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003980
3981rm -f conftest.$ac_ext
3982EXEEXT=$ac_cv_exeext
3983ac_exeext=$EXEEXT
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003984cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3985/* end confdefs.h. */
3986#include <stdio.h>
3987int
3988main ()
3989{
3990FILE *f = fopen ("conftest.out", "w");
3991 return ferror (f) || fclose (f) != 0;
3992
3993 ;
3994 return 0;
3995}
Skip Montanaro6dead952003-09-25 14:50:04 +00003996_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003997ac_clean_files="$ac_clean_files conftest.out"
3998# Check that the compiler produces executables we can run. If not, either
3999# the compiler is broken, or we cross compile.
4000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4001$as_echo_n "checking whether we are cross compiling... " >&6; }
4002if test "$cross_compiling" != yes; then
4003 { { ac_try="$ac_link"
4004case "(($ac_try" in
4005 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4006 *) ac_try_echo=$ac_try;;
4007esac
4008eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4009$as_echo "$ac_try_echo"; } >&5
4010 (eval "$ac_link") 2>&5
4011 ac_status=$?
4012 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4013 test $ac_status = 0; }
4014 if { ac_try='./conftest$ac_cv_exeext'
4015 { { case "(($ac_try" in
4016 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4017 *) ac_try_echo=$ac_try;;
4018esac
4019eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4020$as_echo "$ac_try_echo"; } >&5
4021 (eval "$ac_try") 2>&5
4022 ac_status=$?
4023 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4024 test $ac_status = 0; }; }; then
4025 cross_compiling=no
4026 else
4027 if test "$cross_compiling" = maybe; then
4028 cross_compiling=yes
4029 else
4030 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4031$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004032as_fn_error $? "cannot run C compiled programs.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004033If you meant to cross compile, use \`--host'.
Matthias Klose3cef2a92012-03-14 23:39:33 +01004034See \`config.log' for more details" "$LINENO" 5; }
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004035 fi
4036 fi
4037fi
4038{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4039$as_echo "$cross_compiling" >&6; }
4040
4041rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4042ac_clean_files=$ac_clean_files_save
4043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4044$as_echo_n "checking for suffix of object files... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004045if ${ac_cv_objext+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004046 $as_echo_n "(cached) " >&6
4047else
4048 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004049/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004050
Martin v. Löwis11437992002-04-12 09:54:03 +00004051int
4052main ()
4053{
4054
4055 ;
4056 return 0;
4057}
4058_ACEOF
4059rm -f conftest.o conftest.obj
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004060if { { ac_try="$ac_compile"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004061case "(($ac_try" in
4062 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4063 *) ac_try_echo=$ac_try;;
4064esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004065eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4066$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00004067 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004068 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004069 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4070 test $ac_status = 0; }; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004071 for ac_file in conftest.o conftest.obj conftest.*; do
4072 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004073 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004074 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004075 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4076 break;;
4077 esac
4078done
4079else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004080 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004081sed 's/^/| /' conftest.$ac_ext >&5
4082
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004083{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4084$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004085as_fn_error $? "cannot compute suffix of object files: cannot compile
Matthias Klose3cef2a92012-03-14 23:39:33 +01004086See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004087fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004088rm -f conftest.$ac_cv_objext conftest.$ac_ext
4089fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004090{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4091$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004092OBJEXT=$ac_cv_objext
4093ac_objext=$OBJEXT
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4095$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004096if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004097 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004098else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004099 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004100/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004101
Martin v. Löwis11437992002-04-12 09:54:03 +00004102int
4103main ()
4104{
4105#ifndef __GNUC__
4106 choke me
4107#endif
4108
4109 ;
4110 return 0;
4111}
4112_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004113if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004114 ac_compiler_gnu=yes
4115else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004116 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004117fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004118rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004119ac_cv_c_compiler_gnu=$ac_compiler_gnu
4120
4121fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004122{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4123$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4124if test $ac_compiler_gnu = yes; then
4125 GCC=yes
4126else
4127 GCC=
4128fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004129ac_test_CFLAGS=${CFLAGS+set}
4130ac_save_CFLAGS=$CFLAGS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4132$as_echo_n "checking whether $CC accepts -g... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004133if ${ac_cv_prog_cc_g+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004134 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004135else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004136 ac_save_c_werror_flag=$ac_c_werror_flag
4137 ac_c_werror_flag=yes
4138 ac_cv_prog_cc_g=no
4139 CFLAGS="-g"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004140 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004141/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004142
Martin v. Löwis11437992002-04-12 09:54:03 +00004143int
4144main ()
4145{
4146
4147 ;
4148 return 0;
4149}
4150_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004151if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004152 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004153else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004154 CFLAGS=""
4155 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004156/* end confdefs.h. */
4157
4158int
4159main ()
4160{
4161
4162 ;
4163 return 0;
4164}
4165_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004166if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004167
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004168else
4169 ac_c_werror_flag=$ac_save_c_werror_flag
Martin v. Löwiseba40652007-08-30 20:10:57 +00004170 CFLAGS="-g"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004171 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004172/* end confdefs.h. */
4173
4174int
4175main ()
4176{
4177
4178 ;
4179 return 0;
4180}
4181_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004182if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004183 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004184fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004185rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004186fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004187rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4188fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004189rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4190 ac_c_werror_flag=$ac_save_c_werror_flag
4191fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004192{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4193$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004194if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004195 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004196elif test $ac_cv_prog_cc_g = yes; then
4197 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004198 CFLAGS="-g -O2"
4199 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004200 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004201 fi
4202else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004203 if test "$GCC" = yes; then
4204 CFLAGS="-O2"
4205 else
4206 CFLAGS=
4207 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004208fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4210$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004211if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004212 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004213else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004214 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004215ac_save_CC=$CC
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004216cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004217/* end confdefs.h. */
4218#include <stdarg.h>
4219#include <stdio.h>
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004220struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004221/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4222struct buf { int x; };
4223FILE * (*rcsopen) (struct buf *, struct stat *, int);
4224static char *e (p, i)
4225 char **p;
4226 int i;
4227{
4228 return p[i];
4229}
4230static char *f (char * (*g) (char **, int), char **p, ...)
4231{
4232 char *s;
4233 va_list v;
4234 va_start (v,p);
4235 s = g (p, va_arg (v,int));
4236 va_end (v);
4237 return s;
4238}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004239
4240/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4241 function prototypes and stuff, but not '\xHH' hex character constants.
4242 These don't provoke an error unfortunately, instead are silently treated
Martin v. Löwiseba40652007-08-30 20:10:57 +00004243 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004244 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4245 array size at least. It's necessary to write '\x00'==0 to get something
Martin v. Löwiseba40652007-08-30 20:10:57 +00004246 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004247int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4248
Martin v. Löwiseba40652007-08-30 20:10:57 +00004249/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4250 inside strings and character constants. */
4251#define FOO(x) 'x'
4252int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4253
Skip Montanaro6dead952003-09-25 14:50:04 +00004254int test (int i, double x);
4255struct s1 {int (*f) (int a);};
4256struct s2 {int (*f) (double a);};
4257int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4258int argc;
4259char **argv;
4260int
4261main ()
4262{
4263return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4264 ;
4265 return 0;
4266}
4267_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00004268for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4269 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004270do
4271 CC="$ac_save_CC $ac_arg"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004272 if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004273 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004274fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004275rm -f core conftest.err conftest.$ac_objext
4276 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004277done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004278rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004279CC=$ac_save_CC
4280
4281fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004282# AC_CACHE_VAL
4283case "x$ac_cv_prog_cc_c89" in
4284 x)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4286$as_echo "none needed" >&6; } ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00004287 xno)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004288 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4289$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004290 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00004291 CC="$CC $ac_cv_prog_cc_c89"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004292 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4293$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004294esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004295if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004296
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004297fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004298
Martin v. Löwis11437992002-04-12 09:54:03 +00004299ac_ext=c
4300ac_cpp='$CPP $CPPFLAGS'
4301ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4302ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4303ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004304
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00004305if test ! -z "$preset_cflags"
4306then
4307 CFLAGS=$preset_cflags
4308fi
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004309
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004310
4311
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4313$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004314
Martin v. Löwiseba40652007-08-30 20:10:57 +00004315# Check whether --with-cxx_main was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004316if test "${with_cxx_main+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004317 withval=$with_cxx_main;
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004318
4319 case $withval in
4320 no) with_cxx_main=no
4321 MAINCC='$(CC)';;
4322 yes) with_cxx_main=yes
4323 MAINCC='$(CXX)';;
4324 *) with_cxx_main=yes
4325 MAINCC=$withval
4326 if test -z "$CXX"
4327 then
4328 CXX=$withval
4329 fi;;
4330 esac
4331else
4332
4333 with_cxx_main=no
4334 MAINCC='$(CC)'
4335
Martin v. Löwiseba40652007-08-30 20:10:57 +00004336fi
4337
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004338{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4339$as_echo "$with_cxx_main" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004340
4341preset_cxx="$CXX"
4342if test -z "$CXX"
4343then
4344 case "$CC" in
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004345 gcc) if test -n "$ac_tool_prefix"; then
4346 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4347set dummy ${ac_tool_prefix}g++; ac_word=$2
4348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4349$as_echo_n "checking for $ac_word... " >&6; }
4350if ${ac_cv_path_CXX+:} false; then :
4351 $as_echo_n "(cached) " >&6
4352else
4353 case $CXX in
4354 [\\/]* | ?:[\\/]*)
4355 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4356 ;;
4357 *)
4358 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4359for as_dir in notfound
4360do
4361 IFS=$as_save_IFS
4362 test -z "$as_dir" && as_dir=.
4363 for ac_exec_ext in '' $ac_executable_extensions; do
4364 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4365 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4366 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4367 break 2
4368 fi
4369done
4370 done
4371IFS=$as_save_IFS
4372
4373 ;;
4374esac
4375fi
4376CXX=$ac_cv_path_CXX
4377if test -n "$CXX"; then
4378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4379$as_echo "$CXX" >&6; }
4380else
4381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4382$as_echo "no" >&6; }
4383fi
4384
4385
4386fi
4387if test -z "$ac_cv_path_CXX"; then
4388 ac_pt_CXX=$CXX
4389 # Extract the first word of "g++", so it can be a program name with args.
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004390set dummy g++; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4392$as_echo_n "checking for $ac_word... " >&6; }
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004393if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004394 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004395else
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004396 case $ac_pt_CXX in
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004397 [\\/]* | ?:[\\/]*)
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004398 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 +00004399 ;;
4400 *)
4401 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4402for as_dir in notfound
4403do
4404 IFS=$as_save_IFS
4405 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004406 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004407 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004408 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004409 $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 +00004410 break 2
4411 fi
4412done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004413 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004414IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004415
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004416 ;;
4417esac
4418fi
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004419ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4420if test -n "$ac_pt_CXX"; then
4421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4422$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004423else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004424 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4425$as_echo "no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004426fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004427
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004428 if test "x$ac_pt_CXX" = x; then
4429 CXX="g++"
4430 else
4431 case $cross_compiling:$ac_tool_warned in
4432yes:)
4433{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4434$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4435ac_tool_warned=yes ;;
4436esac
4437 CXX=$ac_pt_CXX
4438 fi
4439else
4440 CXX="$ac_cv_path_CXX"
4441fi
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004442 ;;
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004443 cc) if test -n "$ac_tool_prefix"; then
4444 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4445set dummy ${ac_tool_prefix}c++; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4447$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004448if ${ac_cv_path_CXX+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004449 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004450else
4451 case $CXX in
4452 [\\/]* | ?:[\\/]*)
4453 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4454 ;;
4455 *)
4456 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4457for as_dir in notfound
4458do
4459 IFS=$as_save_IFS
4460 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004461 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004462 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004463 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004464 $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 +00004465 break 2
4466 fi
4467done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004468 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004469IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004470
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004471 ;;
4472esac
4473fi
4474CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00004475if test -n "$CXX"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4477$as_echo "$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004478else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4480$as_echo "no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004481fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004482
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004483
4484fi
4485if test -z "$ac_cv_path_CXX"; then
4486 ac_pt_CXX=$CXX
4487 # Extract the first word of "c++", so it can be a program name with args.
4488set dummy c++; ac_word=$2
4489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4490$as_echo_n "checking for $ac_word... " >&6; }
4491if ${ac_cv_path_ac_pt_CXX+:} false; then :
4492 $as_echo_n "(cached) " >&6
4493else
4494 case $ac_pt_CXX in
4495 [\\/]* | ?:[\\/]*)
4496 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4497 ;;
4498 *)
4499 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4500for as_dir in notfound
4501do
4502 IFS=$as_save_IFS
4503 test -z "$as_dir" && as_dir=.
4504 for ac_exec_ext in '' $ac_executable_extensions; do
4505 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4506 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4507 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4508 break 2
4509 fi
4510done
4511 done
4512IFS=$as_save_IFS
4513
4514 ;;
4515esac
4516fi
4517ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4518if test -n "$ac_pt_CXX"; then
4519 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4520$as_echo "$ac_pt_CXX" >&6; }
4521else
4522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4523$as_echo "no" >&6; }
4524fi
4525
4526 if test "x$ac_pt_CXX" = x; then
4527 CXX="c++"
4528 else
4529 case $cross_compiling:$ac_tool_warned in
4530yes:)
4531{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4532$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4533ac_tool_warned=yes ;;
4534esac
4535 CXX=$ac_pt_CXX
4536 fi
4537else
4538 CXX="$ac_cv_path_CXX"
4539fi
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004540 ;;
4541 esac
4542 if test "$CXX" = "notfound"
4543 then
4544 CXX=""
4545 fi
4546fi
4547if test -z "$CXX"
4548then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004549 if test -n "$ac_tool_prefix"; then
4550 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4551 do
4552 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4553set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4555$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004556if ${ac_cv_prog_CXX+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004557 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004558else
4559 if test -n "$CXX"; then
4560 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4561else
4562as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4563for as_dir in $PATH
4564do
4565 IFS=$as_save_IFS
4566 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004567 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004568 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004569 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004570 $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 +00004571 break 2
4572 fi
4573done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004574 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004575IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004576
4577fi
4578fi
4579CXX=$ac_cv_prog_CXX
4580if test -n "$CXX"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004581 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4582$as_echo "$CXX" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004583else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004584 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4585$as_echo "no" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004586fi
4587
Martin v. Löwiseba40652007-08-30 20:10:57 +00004588
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004589 test -n "$CXX" && break
4590 done
4591fi
4592if test -z "$CXX"; then
4593 ac_ct_CXX=$CXX
4594 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4595do
4596 # Extract the first word of "$ac_prog", so it can be a program name with args.
4597set dummy $ac_prog; ac_word=$2
4598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4599$as_echo_n "checking for $ac_word... " >&6; }
4600if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4601 $as_echo_n "(cached) " >&6
4602else
4603 if test -n "$ac_ct_CXX"; then
4604 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4605else
4606as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4607for as_dir in $PATH
4608do
4609 IFS=$as_save_IFS
4610 test -z "$as_dir" && as_dir=.
4611 for ac_exec_ext in '' $ac_executable_extensions; do
4612 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4613 ac_cv_prog_ac_ct_CXX="$ac_prog"
4614 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4615 break 2
4616 fi
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004617done
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004618 done
4619IFS=$as_save_IFS
4620
4621fi
4622fi
4623ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4624if test -n "$ac_ct_CXX"; then
4625 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4626$as_echo "$ac_ct_CXX" >&6; }
4627else
4628 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4629$as_echo "no" >&6; }
4630fi
4631
4632
4633 test -n "$ac_ct_CXX" && break
4634done
4635
4636 if test "x$ac_ct_CXX" = x; then
4637 CXX="notfound"
4638 else
4639 case $cross_compiling:$ac_tool_warned in
4640yes:)
4641{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4642$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4643ac_tool_warned=yes ;;
4644esac
4645 CXX=$ac_ct_CXX
4646 fi
4647fi
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004648
4649 if test "$CXX" = "notfound"
4650 then
4651 CXX=""
4652 fi
4653fi
4654if test "$preset_cxx" != "$CXX"
4655then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004656 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004657
4658 By default, distutils will build C++ extension modules with \"$CXX\".
4659 If this is not intended, then set CXX on the configure command line.
4660 " >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004661$as_echo "$as_me: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004662
4663 By default, distutils will build C++ extension modules with \"$CXX\".
4664 If this is not intended, then set CXX on the configure command line.
4665 " >&2;}
4666fi
4667
doko@python.org4e63fbe2013-01-25 13:08:27 +01004668MULTIARCH=$($CC --print-multiarch 2>/dev/null)
4669
4670
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004671
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004672# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004673
4674ac_ext=c
4675ac_cpp='$CPP $CPPFLAGS'
4676ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4677ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4678ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4680$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004681# On Suns, sometimes $CPP names a directory.
4682if test -n "$CPP" && test -d "$CPP"; then
4683 CPP=
4684fi
4685if test -z "$CPP"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +01004686 if ${ac_cv_prog_CPP+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004687 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004688else
Martin v. Löwis11437992002-04-12 09:54:03 +00004689 # Double quotes because CPP needs to be expanded
4690 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4691 do
4692 ac_preproc_ok=false
4693for ac_c_preproc_warn_flag in '' yes
4694do
4695 # Use a header file that comes with gcc, so configuring glibc
4696 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004697 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4698 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004699 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004700 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004701 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004702/* end confdefs.h. */
4703#ifdef __STDC__
4704# include <limits.h>
4705#else
4706# include <assert.h>
4707#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004708 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004709_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004710if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004711
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004712else
Martin v. Löwis11437992002-04-12 09:54:03 +00004713 # Broken: fails on valid input.
4714continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004715fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004716rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004717
Martin v. Löwiseba40652007-08-30 20:10:57 +00004718 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004719 # can be detected and how.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004720 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004721/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004722#include <ac_nonexistent.h>
4723_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004724if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004725 # Broken: success on invalid input.
4726continue
4727else
Martin v. Löwis11437992002-04-12 09:54:03 +00004728 # Passes both tests.
4729ac_preproc_ok=:
4730break
4731fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004732rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004733
4734done
4735# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004736rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004737if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004738 break
4739fi
4740
4741 done
4742 ac_cv_prog_CPP=$CPP
4743
4744fi
4745 CPP=$ac_cv_prog_CPP
4746else
4747 ac_cv_prog_CPP=$CPP
4748fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004749{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4750$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004751ac_preproc_ok=false
4752for ac_c_preproc_warn_flag in '' yes
4753do
4754 # Use a header file that comes with gcc, so configuring glibc
4755 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004756 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4757 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004758 # On the NeXT, cc -E runs the code through the compiler's parser,
4759 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004760 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004761/* end confdefs.h. */
4762#ifdef __STDC__
4763# include <limits.h>
4764#else
4765# include <assert.h>
4766#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004767 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004768_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004769if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004770
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004771else
Martin v. Löwis11437992002-04-12 09:54:03 +00004772 # Broken: fails on valid input.
4773continue
4774fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004775rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004776
Martin v. Löwiseba40652007-08-30 20:10:57 +00004777 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004778 # can be detected and how.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004779 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004780/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004781#include <ac_nonexistent.h>
4782_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004783if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004784 # Broken: success on invalid input.
4785continue
4786else
Martin v. Löwis11437992002-04-12 09:54:03 +00004787 # Passes both tests.
4788ac_preproc_ok=:
4789break
4790fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004791rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004792
4793done
4794# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004795rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004796if $ac_preproc_ok; then :
4797
Martin v. Löwis11437992002-04-12 09:54:03 +00004798else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004799 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4800$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004801as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
Matthias Klose3cef2a92012-03-14 23:39:33 +01004802See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004803fi
4804
4805ac_ext=c
4806ac_cpp='$CPP $CPPFLAGS'
4807ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4808ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4809ac_compiler_gnu=$ac_cv_c_compiler_gnu
4810
4811
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4813$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004814if ${ac_cv_path_GREP+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004815 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004816else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004817 if test -z "$GREP"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004818 ac_path_GREP_found=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004819 # Loop through the user's path and test for each of PROGNAME-LIST
4820 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00004821for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4822do
4823 IFS=$as_save_IFS
4824 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004825 for ac_prog in grep ggrep; do
4826 for ac_exec_ext in '' $ac_executable_extensions; do
4827 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004828 as_fn_executable_p "$ac_path_GREP" || continue
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004829# Check for GNU ac_path_GREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004830 # Check for GNU $ac_path_GREP
4831case `"$ac_path_GREP" --version 2>&1` in
4832*GNU*)
4833 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4834*)
4835 ac_count=0
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004836 $as_echo_n 0123456789 >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004837 while :
4838 do
4839 cat "conftest.in" "conftest.in" >"conftest.tmp"
4840 mv "conftest.tmp" "conftest.in"
4841 cp "conftest.in" "conftest.nl"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004842 $as_echo 'GREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004843 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4844 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004845 as_fn_arith $ac_count + 1 && ac_count=$as_val
Martin v. Löwiseba40652007-08-30 20:10:57 +00004846 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4847 # Best one so far, save it but keep looking for a better one
4848 ac_cv_path_GREP="$ac_path_GREP"
4849 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00004850 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004851 # 10*(2^10) chars as input seems more than enough
4852 test $ac_count -gt 10 && break
4853 done
4854 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4855esac
4856
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004857 $ac_path_GREP_found && break 3
4858 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004859 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004860 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004861IFS=$as_save_IFS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004862 if test -z "$ac_cv_path_GREP"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004863 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 +00004864 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004865else
4866 ac_cv_path_GREP=$GREP
4867fi
4868
Martin v. Löwiseba40652007-08-30 20:10:57 +00004869fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004870{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4871$as_echo "$ac_cv_path_GREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00004872 GREP="$ac_cv_path_GREP"
4873
4874
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4876$as_echo_n "checking for egrep... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004877if ${ac_cv_path_EGREP+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004878 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +00004879else
4880 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4881 then ac_cv_path_EGREP="$GREP -E"
4882 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004883 if test -z "$EGREP"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004884 ac_path_EGREP_found=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004885 # Loop through the user's path and test for each of PROGNAME-LIST
4886 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00004887for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4888do
4889 IFS=$as_save_IFS
4890 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004891 for ac_prog in egrep; do
4892 for ac_exec_ext in '' $ac_executable_extensions; do
4893 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004894 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004895# Check for GNU ac_path_EGREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004896 # Check for GNU $ac_path_EGREP
4897case `"$ac_path_EGREP" --version 2>&1` in
4898*GNU*)
4899 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4900*)
4901 ac_count=0
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004902 $as_echo_n 0123456789 >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004903 while :
4904 do
4905 cat "conftest.in" "conftest.in" >"conftest.tmp"
4906 mv "conftest.tmp" "conftest.in"
4907 cp "conftest.in" "conftest.nl"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004908 $as_echo 'EGREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004909 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4910 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004911 as_fn_arith $ac_count + 1 && ac_count=$as_val
Martin v. Löwiseba40652007-08-30 20:10:57 +00004912 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4913 # Best one so far, save it but keep looking for a better one
4914 ac_cv_path_EGREP="$ac_path_EGREP"
4915 ac_path_EGREP_max=$ac_count
4916 fi
4917 # 10*(2^10) chars as input seems more than enough
4918 test $ac_count -gt 10 && break
4919 done
4920 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4921esac
4922
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004923 $ac_path_EGREP_found && break 3
4924 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004925 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004926 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004927IFS=$as_save_IFS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004928 if test -z "$ac_cv_path_EGREP"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004929 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 +00004930 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004931else
4932 ac_cv_path_EGREP=$EGREP
4933fi
4934
Martin v. Löwiseba40652007-08-30 20:10:57 +00004935 fi
4936fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004937{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4938$as_echo "$ac_cv_path_EGREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00004939 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00004940
4941
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4943$as_echo_n "checking for ANSI C header files... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004944if ${ac_cv_header_stdc+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004945 $as_echo_n "(cached) " >&6
4946else
4947 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00004948/* end confdefs.h. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004949#include <stdlib.h>
4950#include <stdarg.h>
4951#include <string.h>
4952#include <float.h>
4953
4954int
4955main ()
4956{
4957
4958 ;
4959 return 0;
4960}
4961_ACEOF
4962if ac_fn_c_try_compile "$LINENO"; then :
4963 ac_cv_header_stdc=yes
4964else
4965 ac_cv_header_stdc=no
4966fi
4967rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4968
4969if test $ac_cv_header_stdc = yes; then
4970 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4971 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4972/* end confdefs.h. */
4973#include <string.h>
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00004974
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00004975_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004976if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004977 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004978
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004979else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004980 ac_cv_header_stdc=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004981fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00004982rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004983
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004984fi
4985
4986if test $ac_cv_header_stdc = yes; then
4987 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4988 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4989/* end confdefs.h. */
4990#include <stdlib.h>
4991
4992_ACEOF
4993if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4994 $EGREP "free" >/dev/null 2>&1; then :
4995
4996else
4997 ac_cv_header_stdc=no
4998fi
4999rm -f conftest*
5000
5001fi
5002
5003if test $ac_cv_header_stdc = yes; then
5004 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5005 if test "$cross_compiling" = yes; then :
5006 :
5007else
5008 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5009/* end confdefs.h. */
5010#include <ctype.h>
5011#include <stdlib.h>
5012#if ((' ' & 0x0FF) == 0x020)
5013# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5014# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5015#else
5016# define ISLOWER(c) \
5017 (('a' <= (c) && (c) <= 'i') \
5018 || ('j' <= (c) && (c) <= 'r') \
5019 || ('s' <= (c) && (c) <= 'z'))
5020# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5021#endif
5022
5023#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5024int
5025main ()
5026{
5027 int i;
5028 for (i = 0; i < 256; i++)
5029 if (XOR (islower (i), ISLOWER (i))
5030 || toupper (i) != TOUPPER (i))
5031 return 2;
5032 return 0;
5033}
5034_ACEOF
5035if ac_fn_c_try_run "$LINENO"; then :
5036
5037else
5038 ac_cv_header_stdc=no
5039fi
5040rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5041 conftest.$ac_objext conftest.beam conftest.$ac_ext
5042fi
5043
5044fi
5045fi
5046{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5047$as_echo "$ac_cv_header_stdc" >&6; }
5048if test $ac_cv_header_stdc = yes; then
5049
5050$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5051
5052fi
5053
5054# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5055for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5056 inttypes.h stdint.h unistd.h
5057do :
5058 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5059ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5060"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00005061if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005062 cat >>confdefs.h <<_ACEOF
5063#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5064_ACEOF
5065
5066fi
5067
5068done
5069
5070
5071
5072 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 +01005073if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005074 MINIX=yes
5075else
5076 MINIX=
5077fi
5078
5079
5080 if test "$MINIX" = yes; then
5081
5082$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5083
5084
5085$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5086
5087
5088$as_echo "#define _MINIX 1" >>confdefs.h
5089
5090 fi
5091
5092
5093 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5094$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005095if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005096 $as_echo_n "(cached) " >&6
5097else
5098 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5099/* end confdefs.h. */
5100
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005101# define __EXTENSIONS__ 1
5102 $ac_includes_default
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005103int
5104main ()
5105{
5106
5107 ;
5108 return 0;
5109}
5110_ACEOF
5111if ac_fn_c_try_compile "$LINENO"; then :
5112 ac_cv_safe_to_define___extensions__=yes
5113else
5114 ac_cv_safe_to_define___extensions__=no
5115fi
5116rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5117fi
5118{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5119$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5120 test $ac_cv_safe_to_define___extensions__ = yes &&
5121 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5122
5123 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5124
5125 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5126
5127 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5128
5129 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5130
5131
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005132
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005133# Check for unsupported systems
5134case $ac_sys_system/$ac_sys_release in
5135atheos*|Linux*/1*)
5136 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5137 echo See README for details.
5138 exit 1;;
5139esac
5140
5141
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5143$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005144
5145# Check whether --with-suffix was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005146if test "${with_suffix+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005147 withval=$with_suffix;
5148 case $withval in
5149 no) EXEEXT=;;
5150 yes) EXEEXT=.exe;;
5151 *) EXEEXT=$withval;;
5152 esac
5153fi
5154
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005155{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5156$as_echo "$EXEEXT" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005157
5158# Test whether we're running on a non-case-sensitive system, in which
5159# case we give a warning if no ext is given
5160
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5162$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005163if test ! -d CaseSensitiveTestDir; then
5164mkdir CaseSensitiveTestDir
5165fi
5166
5167if test -d casesensitivetestdir
5168then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005169 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5170$as_echo "yes" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005171 BUILDEXEEXT=.exe
5172else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005173 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5174$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005175 BUILDEXEEXT=$EXEEXT
5176fi
5177rmdir CaseSensitiveTestDir
5178
5179case $MACHDEP in
5180bsdos*)
5181 case $CC in
5182 gcc) CC="$CC -D_HAVE_BSDI";;
5183 esac;;
5184esac
5185
5186case $ac_sys_system in
5187hp*|HP*)
5188 case $CC in
5189 cc|*/cc) CC="$CC -Ae";;
5190 esac;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005191SunOS*)
5192 # Some functions have a prototype only with that define, e.g. confstr
5193
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005194$as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005195
5196 ;;
5197esac
5198
5199
5200
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5202$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005203if test -z "$LIBRARY"
5204then
5205 LIBRARY='libpython$(VERSION).a'
5206fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005207{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5208$as_echo "$LIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005209
5210# LDLIBRARY is the name of the library to link against (as opposed to the
5211# name of the library into which to insert object files). BLDLIBRARY is also
5212# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5213# is blank as the main program is not linked directly against LDLIBRARY.
5214# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5215# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5216# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5217# DLLLIBRARY is the shared (i.e., DLL) library.
5218#
5219# RUNSHARED is used to run shared python without installed libraries
5220#
5221# INSTSONAME is the name of the shared library that will be use to install
5222# on the system - some systems like version suffix, others don't
5223
5224
5225
5226
5227
5228
5229LDLIBRARY="$LIBRARY"
5230BLDLIBRARY='$(LDLIBRARY)'
5231INSTSONAME='$(LDLIBRARY)'
5232DLLLIBRARY=''
5233LDLIBRARYDIR=''
5234RUNSHARED=''
5235
5236# LINKCC is the command that links the python executable -- default is $(CC).
5237# If CXX is set, and if it is needed to link a main function that was
5238# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5239# python might then depend on the C++ runtime
5240# This is altered for AIX in order to build the export list before
5241# linking.
5242
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005243{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5244$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005245if test -z "$LINKCC"
5246then
5247 LINKCC='$(PURIFY) $(MAINCC)'
5248 case $ac_sys_system in
5249 AIX*)
5250 exp_extra="\"\""
5251 if test $ac_sys_release -ge 5 -o \
5252 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5253 exp_extra="."
5254 fi
5255 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005256 QNX*)
5257 # qcc must be used because the other compilers do not
5258 # support -N.
5259 LINKCC=qcc;;
5260 esac
5261fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005262{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5263$as_echo "$LINKCC" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005264
5265# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5266# make sure we default having it set to "no": this is used by
5267# distutils.unixccompiler to know if it should add --enable-new-dtags
5268# to linker command lines, and failing to detect GNU ld simply results
5269# in the same bahaviour as before.
5270
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005271{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5272$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005273ac_prog=ld
5274if test "$GCC" = yes; then
5275 ac_prog=`$CC -print-prog-name=ld`
5276fi
5277case `"$ac_prog" -V 2>&1 < /dev/null` in
5278 *GNU*)
5279 GNULD=yes;;
5280 *)
5281 GNULD=no;;
5282esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005283{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5284$as_echo "$GNULD" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005285
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005286{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5287$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005288# Check whether --enable-shared was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005289if test "${enable_shared+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005290 enableval=$enable_shared;
5291fi
5292
5293
5294if test -z "$enable_shared"
5295then
5296 case $ac_sys_system in
5297 CYGWIN* | atheos*)
5298 enable_shared="yes";;
5299 *)
5300 enable_shared="no";;
5301 esac
5302fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005303{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5304$as_echo "$enable_shared" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005305
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5307$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005308# Check whether --enable-profiling was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005309if test "${enable_profiling+set}" = set; then :
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005310 enableval=$enable_profiling;
5311fi
5312
5313if test "x$enable_profiling" = xyes; then
5314 ac_save_cc="$CC"
Benjamin Petersonb9be7bb2013-03-26 08:55:37 -04005315 CC="$CC -pg"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005316 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005317/* end confdefs.h. */
5318int main() { return 0; }
5319_ACEOF
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005320if ac_fn_c_try_link "$LINENO"; then :
5321
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005322else
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005323 enable_profiling=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005324fi
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005325rm -f core conftest.err conftest.$ac_objext \
5326 conftest$ac_exeext conftest.$ac_ext
5327 CC="$ac_save_cc"
5328else
5329 enable_profiling=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005330fi
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005331{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5332$as_echo "$enable_profiling" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005333
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005334if test "x$enable_profiling" = xyes; then
5335 BASECFLAGS="-pg $BASECFLAGS"
5336 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005337fi
5338
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005339{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5340$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005341
5342# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5343# library that we build, but we do not want to link against it (we
5344# will find it with a -framework option). For this reason there is an
5345# extra variable BLDLIBRARY against which Python and the extension
5346# modules are linked, BLDLIBRARY. This is normally the same as
5347# LDLIBRARY, but empty for MacOSX framework builds.
5348if test "$enable_framework"
5349then
5350 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005351 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005352 BLDLIBRARY=''
5353else
5354 BLDLIBRARY='$(LDLIBRARY)'
5355fi
5356
5357# Other platforms follow
5358if test $enable_shared = "yes"; then
5359
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005360$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005361
5362 case $ac_sys_system in
5363 BeOS*)
5364 LDLIBRARY='libpython$(VERSION).so'
5365 ;;
5366 CYGWIN*)
5367 LDLIBRARY='libpython$(VERSION).dll.a'
5368 DLLLIBRARY='libpython$(VERSION).dll'
5369 ;;
5370 SunOS*)
5371 LDLIBRARY='libpython$(VERSION).so'
5372 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005373 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005374 INSTSONAME="$LDLIBRARY".$SOVERSION
5375 ;;
Charles-François Natali3de8c732011-07-24 22:33:35 +02005376 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005377 LDLIBRARY='libpython$(VERSION).so'
5378 BLDLIBRARY='-L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005379 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005380 case $ac_sys_system in
5381 FreeBSD*)
5382 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
5383 ;;
5384 esac
5385 INSTSONAME="$LDLIBRARY".$SOVERSION
5386 ;;
5387 hp*|HP*)
5388 case `uname -m` in
5389 ia64)
5390 LDLIBRARY='libpython$(VERSION).so'
5391 ;;
5392 *)
5393 LDLIBRARY='libpython$(VERSION).sl'
5394 ;;
5395 esac
5396 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005397 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005398 ;;
5399 OSF*)
5400 LDLIBRARY='libpython$(VERSION).so'
5401 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005402 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005403 ;;
5404 atheos*)
5405 LDLIBRARY='libpython$(VERSION).so'
5406 BLDLIBRARY='-L. -lpython$(VERSION)'
5407 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
5408 ;;
5409 Darwin*)
5410 LDLIBRARY='libpython$(VERSION).dylib'
5411 BLDLIBRARY='-L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005412 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005413 ;;
Antoine Pitrouaabdceb2010-09-10 20:03:17 +00005414 AIX*)
5415 LDLIBRARY='libpython$(VERSION).so'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005416 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrouaabdceb2010-09-10 20:03:17 +00005417 ;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005418
5419 esac
5420else # shared is disabled
5421 case $ac_sys_system in
5422 CYGWIN*)
5423 BLDLIBRARY='$(LIBRARY)'
5424 LDLIBRARY='libpython$(VERSION).dll.a'
5425 ;;
5426 esac
5427fi
5428
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005429if test "$cross_compiling" = yes; then
5430 RUNSHARED=
5431fi
5432
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005433{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5434$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005435
5436if test -n "$ac_tool_prefix"; then
5437 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5438set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5440$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005441if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005442 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005443else
5444 if test -n "$RANLIB"; then
5445 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5446else
5447as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5448for as_dir in $PATH
5449do
5450 IFS=$as_save_IFS
5451 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005452 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005453 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005454 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005455 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005456 break 2
5457 fi
5458done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005459 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005460IFS=$as_save_IFS
5461
5462fi
5463fi
5464RANLIB=$ac_cv_prog_RANLIB
5465if test -n "$RANLIB"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005466 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5467$as_echo "$RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005468else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005469 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5470$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005471fi
5472
5473
5474fi
5475if test -z "$ac_cv_prog_RANLIB"; then
5476 ac_ct_RANLIB=$RANLIB
5477 # Extract the first word of "ranlib", so it can be a program name with args.
5478set dummy ranlib; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005479{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5480$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005481if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005482 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005483else
5484 if test -n "$ac_ct_RANLIB"; then
5485 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5486else
5487as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5488for as_dir in $PATH
5489do
5490 IFS=$as_save_IFS
5491 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005492 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005493 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005494 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005495 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005496 break 2
5497 fi
5498done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005499 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005500IFS=$as_save_IFS
5501
5502fi
5503fi
5504ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5505if test -n "$ac_ct_RANLIB"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5507$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005508else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005509 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5510$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005511fi
5512
5513 if test "x$ac_ct_RANLIB" = x; then
5514 RANLIB=":"
5515 else
5516 case $cross_compiling:$ac_tool_warned in
5517yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005518{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5519$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005520ac_tool_warned=yes ;;
5521esac
5522 RANLIB=$ac_ct_RANLIB
5523 fi
5524else
5525 RANLIB="$ac_cv_prog_RANLIB"
5526fi
5527
5528
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005529if test -n "$ac_tool_prefix"; then
5530 for ac_prog in ar aal
5531 do
5532 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5533set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5535$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005536if ${ac_cv_prog_AR+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005537 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005538else
5539 if test -n "$AR"; then
5540 ac_cv_prog_AR="$AR" # Let the user override the test.
5541else
5542as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5543for as_dir in $PATH
5544do
5545 IFS=$as_save_IFS
5546 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005547 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005548 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005549 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005550 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005551 break 2
5552 fi
5553done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005554 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005555IFS=$as_save_IFS
5556
5557fi
5558fi
5559AR=$ac_cv_prog_AR
5560if test -n "$AR"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5562$as_echo "$AR" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005563else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5565$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005566fi
5567
5568
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005569 test -n "$AR" && break
5570 done
5571fi
5572if test -z "$AR"; then
5573 ac_ct_AR=$AR
5574 for ac_prog in ar aal
5575do
5576 # Extract the first word of "$ac_prog", so it can be a program name with args.
5577set dummy $ac_prog; ac_word=$2
5578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5579$as_echo_n "checking for $ac_word... " >&6; }
5580if ${ac_cv_prog_ac_ct_AR+:} false; then :
5581 $as_echo_n "(cached) " >&6
5582else
5583 if test -n "$ac_ct_AR"; then
5584 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5585else
5586as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5587for as_dir in $PATH
5588do
5589 IFS=$as_save_IFS
5590 test -z "$as_dir" && as_dir=.
5591 for ac_exec_ext in '' $ac_executable_extensions; do
5592 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5593 ac_cv_prog_ac_ct_AR="$ac_prog"
5594 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5595 break 2
5596 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005597done
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005598 done
5599IFS=$as_save_IFS
5600
5601fi
5602fi
5603ac_ct_AR=$ac_cv_prog_ac_ct_AR
5604if test -n "$ac_ct_AR"; then
5605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5606$as_echo "$ac_ct_AR" >&6; }
5607else
5608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5609$as_echo "no" >&6; }
5610fi
5611
5612
5613 test -n "$ac_ct_AR" && break
5614done
5615
5616 if test "x$ac_ct_AR" = x; then
5617 AR="ar"
5618 else
5619 case $cross_compiling:$ac_tool_warned in
5620yes:)
5621{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5622$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5623ac_tool_warned=yes ;;
5624esac
5625 AR=$ac_ct_AR
5626 fi
5627fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005628
5629
5630# tweak ARFLAGS only if the user didn't set it on the command line
5631
5632if test -z "$ARFLAGS"
5633then
5634 ARFLAGS="rc"
5635fi
5636
5637
5638# Extract the first word of "svnversion", so it can be a program name with args.
5639set dummy svnversion; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5641$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005642if ${ac_cv_prog_SVNVERSION+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005643 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005644else
5645 if test -n "$SVNVERSION"; then
5646 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
5647else
5648as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5649for as_dir in $PATH
5650do
5651 IFS=$as_save_IFS
5652 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005653 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005654 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005655 ac_cv_prog_SVNVERSION="found"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005656 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005657 break 2
5658 fi
5659done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005660 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005661IFS=$as_save_IFS
5662
5663 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
5664fi
5665fi
5666SVNVERSION=$ac_cv_prog_SVNVERSION
5667if test -n "$SVNVERSION"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SVNVERSION" >&5
5669$as_echo "$SVNVERSION" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005670else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5672$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005673fi
5674
5675
5676if test $SVNVERSION = found
5677then
5678 SVNVERSION="svnversion \$(srcdir)"
5679else
5680 SVNVERSION="echo Unversioned directory"
5681fi
5682
Trent Nelsond86ceec2012-10-16 09:42:45 -04005683
Trent Nelsonabf20512012-10-17 04:32:49 -04005684if test "$abs_srcdir" != "$abs_builddir"; then
Trent Nelsond86ceec2012-10-16 09:42:45 -04005685 # If we're building out-of-tree make sure Include (in the current dir)
5686 # gets picked up before its $srcdir counterpart in order for Python-ast.h
5687 # and graminit.h to get picked up from the correct directory.
5688 # (A side effect of this is that these resources will automatically be
5689 # regenerated when building out-of-tree, regardless of whether or not
5690 # the $srcdir counterpart is up-to-date. This is an acceptable trade
5691 # off.)
5692 BASECPPFLAGS="-IInclude"
5693else
5694 BASECPPFLAGS=""
5695fi
5696
Georg Brandl3a5508e2011-03-06 10:42:21 +01005697
5698
5699
5700# Extract the first word of "hg", so it can be a program name with args.
5701set dummy hg; ac_word=$2
5702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5703$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005704if ${ac_cv_prog_HAS_HG+:} false; then :
Georg Brandl3a5508e2011-03-06 10:42:21 +01005705 $as_echo_n "(cached) " >&6
5706else
5707 if test -n "$HAS_HG"; then
5708 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
5709else
5710as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5711for as_dir in $PATH
5712do
5713 IFS=$as_save_IFS
5714 test -z "$as_dir" && as_dir=.
5715 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005716 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Georg Brandl3a5508e2011-03-06 10:42:21 +01005717 ac_cv_prog_HAS_HG="found"
5718 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5719 break 2
5720 fi
5721done
5722 done
5723IFS=$as_save_IFS
5724
5725 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
5726fi
5727fi
5728HAS_HG=$ac_cv_prog_HAS_HG
5729if test -n "$HAS_HG"; then
5730 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
5731$as_echo "$HAS_HG" >&6; }
5732else
5733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5734$as_echo "no" >&6; }
5735fi
5736
5737
5738if test $HAS_HG = found
5739then
5740 HGVERSION="hg id -i \$(srcdir)"
5741 HGTAG="hg id -t \$(srcdir)"
5742 HGBRANCH="hg id -b \$(srcdir)"
5743else
5744 HGVERSION=""
5745 HGTAG=""
5746 HGBRANCH=""
5747fi
5748
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005749case $MACHDEP in
5750bsdos*|hp*|HP*)
5751 # install -d does not work on BSDI or HP-UX
5752 if test -z "$INSTALL"
5753 then
5754 INSTALL="${srcdir}/install-sh -c"
5755 fi
5756esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005757# Find a good install program. We prefer a C program (faster),
5758# so one script is as good as another. But avoid the broken or
5759# incompatible versions:
5760# SysV /etc/install, /usr/sbin/install
5761# SunOS /usr/etc/install
5762# IRIX /sbin/install
5763# AIX /bin/install
5764# AmigaOS /C/install, which installs bootblocks on floppy discs
5765# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5766# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5767# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5768# OS/2's system install, which has a completely different semantic
5769# ./install, which can be erroneously created by make from ./install.sh.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005770# Reject install programs that cannot install multiple files.
5771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5772$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005773if test -z "$INSTALL"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +01005774if ${ac_cv_path_install+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005775 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005776else
5777 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5778for as_dir in $PATH
5779do
5780 IFS=$as_save_IFS
5781 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005782 # Account for people who put trailing slashes in PATH elements.
5783case $as_dir/ in #((
5784 ./ | .// | /[cC]/* | \
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005785 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005786 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005787 /usr/ucb/* ) ;;
5788 *)
5789 # OSF1 and SCO ODT 3.0 have their own names for install.
5790 # Don't use installbsd from OSF since it installs stuff as root
5791 # by default.
5792 for ac_prog in ginstall scoinst install; do
5793 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005794 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005795 if test $ac_prog = install &&
5796 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5797 # AIX install. It has an incompatible calling convention.
5798 :
5799 elif test $ac_prog = install &&
5800 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5801 # program-specific install script used by HP pwplus--don't use.
5802 :
5803 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005804 rm -rf conftest.one conftest.two conftest.dir
5805 echo one > conftest.one
5806 echo two > conftest.two
5807 mkdir conftest.dir
5808 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5809 test -s conftest.one && test -s conftest.two &&
5810 test -s conftest.dir/conftest.one &&
5811 test -s conftest.dir/conftest.two
5812 then
5813 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5814 break 3
5815 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005816 fi
5817 fi
5818 done
5819 done
5820 ;;
5821esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005822
5823 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005824IFS=$as_save_IFS
5825
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005826rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005827
5828fi
5829 if test "${ac_cv_path_install+set}" = set; then
5830 INSTALL=$ac_cv_path_install
5831 else
5832 # As a last resort, use the slow shell script. Don't cache a
5833 # value for INSTALL within a source directory, because that will
5834 # break other packages using the cache if that directory is
5835 # removed, or if the value is a relative name.
5836 INSTALL=$ac_install_sh
5837 fi
5838fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005839{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5840$as_echo "$INSTALL" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005841
5842# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5843# It thinks the first close brace ends the variable substitution.
5844test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5845
5846test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5847
5848test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5849
Trent Nelsonf6407a12012-08-30 14:56:13 +00005850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
5851$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
5852if test -z "$MKDIR_P"; then
5853 if ${ac_cv_path_mkdir+:} false; then :
5854 $as_echo_n "(cached) " >&6
5855else
5856 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5857for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
5858do
5859 IFS=$as_save_IFS
5860 test -z "$as_dir" && as_dir=.
5861 for ac_prog in mkdir gmkdir; do
5862 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005863 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Trent Nelsonf6407a12012-08-30 14:56:13 +00005864 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
5865 'mkdir (GNU coreutils) '* | \
5866 'mkdir (coreutils) '* | \
5867 'mkdir (fileutils) '4.1*)
5868 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
5869 break 3;;
5870 esac
5871 done
5872 done
5873 done
5874IFS=$as_save_IFS
5875
5876fi
5877
5878 test -d ./--version && rmdir ./--version
5879 if test "${ac_cv_path_mkdir+set}" = set; then
5880 MKDIR_P="$ac_cv_path_mkdir -p"
5881 else
5882 # As a last resort, use the slow shell script. Don't cache a
5883 # value for MKDIR_P within a source directory, because that will
5884 # break other packages using the cache if that directory is
5885 # removed, or if the value is a relative name.
5886 MKDIR_P="$ac_install_sh -d"
5887 fi
5888fi
5889{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
5890$as_echo "$MKDIR_P" >&6; }
5891
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005892
5893# Not every filesystem supports hard links
5894
5895if test -z "$LN" ; then
5896 case $ac_sys_system in
5897 BeOS*) LN="ln -s";;
5898 CYGWIN*) LN="ln -s";;
5899 atheos*) LN="ln -s";;
5900 *) LN=ln;;
5901 esac
5902fi
5903
5904# Check for --with-pydebug
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
5906$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005907
5908# Check whether --with-pydebug was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005909if test "${with_pydebug+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005910 withval=$with_pydebug;
5911if test "$withval" != no
5912then
5913
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005914$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005915
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5917$as_echo "yes" >&6; };
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005918 Py_DEBUG='true'
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005919else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5920$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005921fi
5922else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5924$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005925fi
5926
5927
5928# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5929# merged with this chunk of code?
5930
5931# Optimizer/debugger flags
5932# ------------------------
5933# (The following bit of code is complicated enough - please keep things
5934# indented properly. Just pretend you're editing Python code. ;-)
5935
5936# There are two parallel sets of case statements below, one that checks to
5937# see if OPT was set and one that does BASECFLAGS setting based upon
5938# compiler and platform. BASECFLAGS tweaks need to be made even if the
5939# user set OPT.
5940
5941# tweak OPT based on compiler and platform, only if the user didn't set
5942# it on the command line
5943
Benjamin Petersond4b721b2010-03-23 20:58:37 +00005944if test "${OPT-unset}" = "unset"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005945then
5946 case $GCC in
5947 yes)
5948 if test "$CC" != 'g++' ; then
5949 STRICT_PROTO="-Wstrict-prototypes"
5950 fi
5951 # For gcc 4.x we need to use -fwrapv so lets check if its supported
5952 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
5953 WRAP="-fwrapv"
5954 fi
Stefan Krah503e5e12011-09-14 15:19:42 +02005955
5956 # Clang also needs -fwrapv
Stefan Krah2bc1e8f2011-12-08 22:26:06 +01005957 case $CC in
5958 *clang*) WRAP="-fwrapv"
5959 ;;
5960 esac
Stefan Krah503e5e12011-09-14 15:19:42 +02005961
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005962 case $ac_cv_prog_cc_g in
5963 yes)
5964 if test "$Py_DEBUG" = 'true' ; then
5965 # Optimization messes up debuggers, so turn it off for
5966 # debug builds.
Mark Dickinsond2f3e3f2010-05-05 22:23:58 +00005967 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005968 else
5969 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
5970 fi
5971 ;;
5972 *)
5973 OPT="-O3 -Wall $STRICT_PROTO"
5974 ;;
5975 esac
5976 case $ac_sys_system in
5977 SCO_SV*) OPT="$OPT -m486 -DSCO5"
5978 ;;
5979 esac
5980 ;;
5981
5982 *)
5983 OPT="-O"
5984 ;;
5985 esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005986fi
5987
5988
5989
5990# The -arch flags for universal builds on OSX
5991UNIVERSAL_ARCH_FLAGS=
5992
5993
5994# tweak BASECFLAGS based on compiler and platform
5995case $GCC in
5996yes)
5997 # Python violates C99 rules, by casting between incompatible
5998 # pointer types. GCC may generate bad code as a result of that,
5999 # so use -fno-strict-aliasing if supported.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006000 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -fno-strict-aliasing" >&5
6001$as_echo_n "checking whether $CC accepts -fno-strict-aliasing... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006002 ac_save_cc="$CC"
6003 CC="$CC -fno-strict-aliasing"
Matthias Klose3cef2a92012-03-14 23:39:33 +01006004 if ${ac_cv_no_strict_aliasing_ok+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006005 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00006006else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006007 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006008/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00006009
6010int
6011main ()
6012{
Mark Dickinson5e13e292010-05-11 08:55:06 +00006013
Gregory P. Smith373469a2009-11-01 21:03:38 +00006014 ;
6015 return 0;
6016}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006017_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006018if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006019 ac_cv_no_strict_aliasing_ok=yes
6020else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006021 ac_cv_no_strict_aliasing_ok=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006022fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00006023rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00006024fi
6025
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006026 CC="$ac_save_cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing_ok" >&5
6028$as_echo "$ac_cv_no_strict_aliasing_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006029 if test $ac_cv_no_strict_aliasing_ok = yes
6030 then
6031 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6032 fi
6033
6034 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
6035 # support. Without this, treatment of subnormals doesn't follow
6036 # the standard.
doko@python.orgd65e2ba2013-01-31 23:52:03 +01006037 case $host in
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006038 alpha*)
6039 BASECFLAGS="$BASECFLAGS -mieee"
6040 ;;
6041 esac
6042
6043 case $ac_sys_system in
6044 SCO_SV*)
6045 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
6046 ;;
6047 # is there any other compiler on Darwin besides gcc?
6048 Darwin*)
6049 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
6050 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006051 if test "${CC}" = gcc
6052 then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006053 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
6054$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006055 case "${UNIVERSALSDK}" in
6056 */MacOSX10.4u.sdk)
6057 # Build using 10.4 SDK, force usage of gcc when the
6058 # compiler is gcc, otherwise the user will get very
6059 # confusing error messages when building on OSX 10.6
6060 CC=gcc-4.0
6061 CPP=cpp-4.0
6062 ;;
6063 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
6065$as_echo "$CC" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006066 fi
6067
6068 # Calculate the right deployment target for this build.
6069 #
Ned Deilyc40b9032014-06-25 13:48:46 -07006070 cur_target_major=`sw_vers -productVersion | \
6071 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
6072 cur_target_minor=`sw_vers -productVersion | \
6073 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
6074 cur_target="${cur_target_major}.${cur_target_minor}"
6075 if test ${cur_target_major} -eq 10 && \
6076 test ${cur_target_minor} -ge 3
6077 then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006078 cur_target=10.3
Ronald Oussoren25967582009-09-06 10:00:26 +00006079 if test ${enable_universalsdk}; then
6080 if test "${UNIVERSAL_ARCHS}" = "all"; then
6081 # Ensure that the default platform for a
6082 # 4-way universal build is OSX 10.5,
6083 # that's the first OS release where
6084 # 4-way builds make sense.
6085 cur_target='10.5'
Ronald Oussoren23d92532009-09-07 06:12:00 +00006086
6087 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
6088 cur_target='10.5'
6089
6090 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
6091 cur_target='10.5'
6092
6093 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
6094 cur_target='10.5'
Ronald Oussoren25967582009-09-06 10:00:26 +00006095 fi
6096 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00006097 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren25967582009-09-06 10:00:26 +00006098 # On Intel macs default to a deployment
6099 # target of 10.4, that's the first OSX
6100 # release with Intel support.
6101 cur_target="10.4"
6102 fi
6103 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006104 fi
6105 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
6106
6107 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
6108 # environment with a value that is the same as what we'll use
6109 # in the Makefile to ensure that we'll get the same compiler
6110 # environment during configure and build time.
6111 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
6112 export MACOSX_DEPLOYMENT_TARGET
6113 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
6114
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006115 if test "${enable_universalsdk}"; then
6116 UNIVERSAL_ARCH_FLAGS=""
6117 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
6118 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
6119 ARCH_RUN_32BIT=""
Ronald Oussoren75912852010-04-08 08:13:31 +00006120 LIPO_32BIT_FLAGS=""
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006121
6122 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
6123 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
6124 LIPO_32BIT_FLAGS=""
6125 ARCH_RUN_32BIT="true"
6126
6127 elif test "$UNIVERSAL_ARCHS" = "all" ; then
6128 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
6129 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren92397ce2010-01-17 19:32:00 +00006130 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006131
6132 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
6133 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
6134 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren92397ce2010-01-17 19:32:00 +00006135 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006136
6137 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
6138 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
6139 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren9922f172010-02-11 13:19:34 +00006140 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006141
6142 else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006143 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 +00006144
6145 fi
6146
6147
Ronald Oussoren974eb5e2010-04-18 17:59:37 +00006148 CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
6149 if test "${UNIVERSALSDK}" != "/"
6150 then
6151 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
6152 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
6153 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006154 fi
6155
6156 fi
6157
6158
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006159 ;;
6160 OSF*)
6161 BASECFLAGS="$BASECFLAGS -mieee"
6162 ;;
6163 esac
6164 ;;
6165
6166*)
6167 case $ac_sys_system in
6168 OpenUNIX*|UnixWare*)
6169 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
6170 ;;
6171 OSF*)
6172 BASECFLAGS="$BASECFLAGS -ieee -std"
6173 ;;
6174 SCO_SV*)
6175 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
6176 ;;
6177 esac
6178 ;;
6179esac
6180
6181if test "$Py_DEBUG" = 'true'; then
6182 :
6183else
6184 OPT="-DNDEBUG $OPT"
6185fi
6186
6187if test "$ac_arch_flags"
6188then
6189 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
6190fi
6191
6192# disable check for icc since it seems to pass, but generates a warning
6193if test "$CC" = icc
6194then
6195 ac_cv_opt_olimit_ok=no
6196fi
6197
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -OPT:Olimit=0" >&5
6199$as_echo_n "checking whether $CC accepts -OPT:Olimit=0... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006200if ${ac_cv_opt_olimit_ok+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006201 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006202else
6203 ac_save_cc="$CC"
6204CC="$CC -OPT:Olimit=0"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006205cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006206/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00006207
6208int
6209main ()
6210{
Mark Dickinson5e13e292010-05-11 08:55:06 +00006211
Gregory P. Smith373469a2009-11-01 21:03:38 +00006212 ;
6213 return 0;
6214}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006215_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006216if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006217 ac_cv_opt_olimit_ok=yes
6218else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006219 ac_cv_opt_olimit_ok=no
Matthias Klosec511b472010-05-08 11:01:39 +00006220
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006221fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00006222rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006223CC="$ac_save_cc"
6224fi
6225
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006226{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_opt_olimit_ok" >&5
6227$as_echo "$ac_cv_opt_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006228if test $ac_cv_opt_olimit_ok = yes; then
6229 case $ac_sys_system in
6230 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
6231 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
6232 # environment?
6233 Darwin*)
6234 ;;
Trent Nelson34562e12012-10-17 18:01:12 -04006235 # XXX thankfully this useless troublemaker of a flag has been
6236 # eradicated in the 3.x line. For now, make sure it isn't picked
6237 # up by any of our other platforms that use CC.
6238 AIX*|SunOS*|HP-UX*|IRIX*)
6239 ;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006240 *)
6241 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
6242 ;;
6243 esac
6244else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006245 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Olimit 1500" >&5
6246$as_echo_n "checking whether $CC accepts -Olimit 1500... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006247 if ${ac_cv_olimit_ok+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006248 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006249else
6250 ac_save_cc="$CC"
6251 CC="$CC -Olimit 1500"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006252 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006253/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00006254
6255int
6256main ()
6257{
Mark Dickinson5e13e292010-05-11 08:55:06 +00006258
Gregory P. Smith373469a2009-11-01 21:03:38 +00006259 ;
6260 return 0;
6261}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006262_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006263if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006264 ac_cv_olimit_ok=yes
6265else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006266 ac_cv_olimit_ok=no
Matthias Klosec511b472010-05-08 11:01:39 +00006267
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006268fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00006269rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006270 CC="$ac_save_cc"
6271fi
6272
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006273 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_olimit_ok" >&5
6274$as_echo "$ac_cv_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006275 if test $ac_cv_olimit_ok = yes; then
Stefan Krah67473262012-11-29 00:17:05 +01006276 case $ac_sys_system in
6277 # Issue #16534: On HP-UX ac_cv_olimit_ok=yes is a false positive.
6278 HP-UX*)
6279 ;;
6280 *)
6281 BASECFLAGS="$BASECFLAGS -Olimit 1500"
6282 ;;
6283 esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006284 fi
6285fi
6286
6287# Check whether GCC supports PyArg_ParseTuple format
6288if test "$GCC" = "yes"
6289then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006290 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
6291$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006292 save_CFLAGS=$CFLAGS
Benjamin Petersonc8759662013-05-11 13:00:05 -05006293 CFLAGS="$CFLAGS -Werror -Wformat"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006294 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006295/* end confdefs.h. */
6296
6297 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006298int
6299main ()
6300{
6301
6302 ;
6303 return 0;
6304}
Matthias Klosec511b472010-05-08 11:01:39 +00006305
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006306_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006307if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006308
Matthias Klosec511b472010-05-08 11:01:39 +00006309
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006310$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006311
Matthias Klosec511b472010-05-08 11:01:39 +00006312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006313$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00006314
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006315else
Matthias Klosec511b472010-05-08 11:01:39 +00006316
6317 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006318$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006319
6320fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006321rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6322 CFLAGS=$save_CFLAGS
6323fi
6324
6325# On some compilers, pthreads are available without further options
6326# (e.g. MacOS X). On some of these systems, the compiler will not
6327# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
6328# So we have to see first whether pthreads are available without
6329# options before we can check whether -Kpthread improves anything.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
6331$as_echo_n "checking whether pthreads are available without options... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006332if ${ac_cv_pthread_is_default+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006333 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006334else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006335 if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006336 ac_cv_pthread_is_default=no
6337else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006338 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006339/* end confdefs.h. */
6340
Stefan Krahae66ca62012-11-22 22:36:57 +01006341#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006342#include <pthread.h>
6343
6344void* routine(void* p){return NULL;}
6345
6346int main(){
6347 pthread_t p;
6348 if(pthread_create(&p,NULL,routine,NULL)!=0)
6349 return 1;
6350 (void)pthread_detach(p);
6351 return 0;
6352}
6353
6354_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006355if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006356
6357 ac_cv_pthread_is_default=yes
6358 ac_cv_kthread=no
6359 ac_cv_pthread=no
6360
6361else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006362 ac_cv_pthread_is_default=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006363fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006364rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6365 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006366fi
6367
6368
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006369fi
6370
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006371{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
6372$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006373
6374
6375if test $ac_cv_pthread_is_default = yes
6376then
6377 ac_cv_kpthread=no
6378else
6379# -Kpthread, if available, provides the right #defines
6380# and linker options to make pthread_create available
6381# Some compilers won't report that they do not support -Kpthread,
6382# so we need to run a program to see whether it really made the
6383# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
6385$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006386if ${ac_cv_kpthread+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006387 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006388else
6389 ac_save_cc="$CC"
6390CC="$CC -Kpthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006391if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006392 ac_cv_kpthread=no
6393else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006394 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006395/* end confdefs.h. */
6396
Stefan Krahae66ca62012-11-22 22:36:57 +01006397#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006398#include <pthread.h>
6399
6400void* routine(void* p){return NULL;}
6401
6402int main(){
6403 pthread_t p;
6404 if(pthread_create(&p,NULL,routine,NULL)!=0)
6405 return 1;
6406 (void)pthread_detach(p);
6407 return 0;
6408}
6409
6410_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006411if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006412 ac_cv_kpthread=yes
6413else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006414 ac_cv_kpthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006415fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006416rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6417 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006418fi
6419
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006420CC="$ac_save_cc"
6421fi
6422
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006423{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
6424$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006425fi
6426
6427if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
6428then
6429# -Kthread, if available, provides the right #defines
6430# and linker options to make pthread_create available
6431# Some compilers won't report that they do not support -Kthread,
6432# so we need to run a program to see whether it really made the
6433# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
6435$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006436if ${ac_cv_kthread+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006437 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006438else
6439 ac_save_cc="$CC"
6440CC="$CC -Kthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006441if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006442 ac_cv_kthread=no
6443else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006444 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006445/* end confdefs.h. */
6446
Stefan Krahae66ca62012-11-22 22:36:57 +01006447#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006448#include <pthread.h>
6449
6450void* routine(void* p){return NULL;}
6451
6452int main(){
6453 pthread_t p;
6454 if(pthread_create(&p,NULL,routine,NULL)!=0)
6455 return 1;
6456 (void)pthread_detach(p);
6457 return 0;
6458}
6459
6460_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006461if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006462 ac_cv_kthread=yes
6463else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006464 ac_cv_kthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006465fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006466rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6467 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006468fi
6469
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006470CC="$ac_save_cc"
6471fi
6472
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006473{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
6474$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006475fi
6476
6477if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
6478then
6479# -pthread, if available, provides the right #defines
6480# and linker options to make pthread_create available
6481# Some compilers won't report that they do not support -pthread,
6482# so we need to run a program to see whether it really made the
6483# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006484{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
6485$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.orgfa3f9a32013-01-25 15:32:31 +01006486if ${ac_cv_pthread+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006487 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006488else
6489 ac_save_cc="$CC"
6490CC="$CC -pthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006491if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006492 ac_cv_pthread=no
6493else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006494 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006495/* end confdefs.h. */
6496
Stefan Krahae66ca62012-11-22 22:36:57 +01006497#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006498#include <pthread.h>
6499
6500void* routine(void* p){return NULL;}
6501
6502int main(){
6503 pthread_t p;
6504 if(pthread_create(&p,NULL,routine,NULL)!=0)
6505 return 1;
6506 (void)pthread_detach(p);
6507 return 0;
6508}
6509
6510_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006511if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006512 ac_cv_pthread=yes
6513else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006514 ac_cv_pthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006515fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006516rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6517 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006518fi
6519
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006520CC="$ac_save_cc"
6521fi
6522
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006523{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
6524$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006525fi
6526
6527# If we have set a CC compiler flag for thread support then
6528# check if it works for CXX, too.
6529ac_cv_cxx_thread=no
6530if test ! -z "$CXX"
6531then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
6533$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006534ac_save_cxx="$CXX"
6535
6536if test "$ac_cv_kpthread" = "yes"
6537then
6538 CXX="$CXX -Kpthread"
6539 ac_cv_cxx_thread=yes
6540elif test "$ac_cv_kthread" = "yes"
6541then
6542 CXX="$CXX -Kthread"
6543 ac_cv_cxx_thread=yes
6544elif test "$ac_cv_pthread" = "yes"
6545then
6546 CXX="$CXX -pthread"
6547 ac_cv_cxx_thread=yes
6548fi
6549
6550if test $ac_cv_cxx_thread = yes
6551then
6552 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
6553 $CXX -c conftest.$ac_ext 2>&5
6554 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
6555 && test -s conftest$ac_exeext && ./conftest$ac_exeext
6556 then
6557 ac_cv_cxx_thread=yes
6558 else
6559 ac_cv_cxx_thread=no
6560 fi
6561 rm -fr conftest*
6562fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006563{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
6564$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006565fi
6566CXX="$ac_save_cxx"
6567
6568
6569# checks for header files
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6571$as_echo_n "checking for ANSI C header files... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006572if ${ac_cv_header_stdc+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006573 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006574else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006575 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006576/* end confdefs.h. */
6577#include <stdlib.h>
6578#include <stdarg.h>
6579#include <string.h>
6580#include <float.h>
6581
6582int
6583main ()
6584{
6585
6586 ;
6587 return 0;
6588}
6589_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006590if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006591 ac_cv_header_stdc=yes
6592else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006593 ac_cv_header_stdc=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006594fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006595rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6596
6597if test $ac_cv_header_stdc = yes; then
6598 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006599 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006600/* end confdefs.h. */
6601#include <string.h>
6602
6603_ACEOF
6604if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006605 $EGREP "memchr" >/dev/null 2>&1; then :
6606
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006607else
6608 ac_cv_header_stdc=no
6609fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006610rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006611
6612fi
6613
6614if test $ac_cv_header_stdc = yes; then
6615 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006616 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006617/* end confdefs.h. */
6618#include <stdlib.h>
6619
6620_ACEOF
6621if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006622 $EGREP "free" >/dev/null 2>&1; then :
6623
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006624else
6625 ac_cv_header_stdc=no
6626fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006627rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006628
6629fi
6630
6631if test $ac_cv_header_stdc = yes; then
6632 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006633 if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006634 :
6635else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006636 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006637/* end confdefs.h. */
6638#include <ctype.h>
6639#include <stdlib.h>
6640#if ((' ' & 0x0FF) == 0x020)
6641# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6642# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6643#else
6644# define ISLOWER(c) \
6645 (('a' <= (c) && (c) <= 'i') \
6646 || ('j' <= (c) && (c) <= 'r') \
6647 || ('s' <= (c) && (c) <= 'z'))
6648# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6649#endif
6650
6651#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6652int
6653main ()
6654{
6655 int i;
6656 for (i = 0; i < 256; i++)
6657 if (XOR (islower (i), ISLOWER (i))
6658 || toupper (i) != TOUPPER (i))
6659 return 2;
6660 return 0;
6661}
6662_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006663if ac_fn_c_try_run "$LINENO"; then :
6664
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006665else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006666 ac_cv_header_stdc=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006667fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006668rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6669 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006670fi
6671
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006672fi
6673fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006674{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6675$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006676if test $ac_cv_header_stdc = yes; then
6677
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006678$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006679
6680fi
6681
doko@ubuntu.comf27ec3e2014-04-17 20:11:19 +02006682for ac_header in asm/types.h conio.h direct.h dlfcn.h errno.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00006683fcntl.h grp.h \
doko@ubuntu.comf27ec3e2014-04-17 20:11:19 +02006684ieeefp.h io.h langinfo.h libintl.h poll.h process.h pthread.h \
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00006685shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006686unistd.h utime.h \
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00006687sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
6688sys/lock.h sys/mkdev.h sys/modem.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00006689sys/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 +00006690sys/termio.h sys/time.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00006691sys/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 +00006692sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimes3aa138f2013-06-18 13:25:24 +02006693bluetooth/bluetooth.h linux/tipc.h spawn.h util.h alloca.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006694do :
6695 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6696ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006697if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006698 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006699#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006700_ACEOF
6701
6702fi
6703
Guido van Rossum627b2d71993-12-24 10:39:16 +00006704done
6705
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006706ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006707for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006708 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6710$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006711if eval \${$as_ac_Header+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006712 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006713else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006714 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006715/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006716#include <sys/types.h>
6717#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006718
Martin v. Löwis11437992002-04-12 09:54:03 +00006719int
6720main ()
6721{
6722if ((DIR *) 0)
6723return 0;
6724 ;
6725 return 0;
6726}
6727_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006728if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006729 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006730else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006731 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006732fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006733rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006734fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006735eval ac_res=\$$as_ac_Header
6736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6737$as_echo "$ac_res" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006738if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006739 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006740#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006741_ACEOF
6742
6743ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006744fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006745
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006746done
6747# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6748if test $ac_header_dirent = dirent.h; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006749 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6750$as_echo_n "checking for library containing opendir... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006751if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006752 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006753else
Martin v. Löwis11437992002-04-12 09:54:03 +00006754 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006755cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006756/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006757
Martin v. Löwiseba40652007-08-30 20:10:57 +00006758/* Override any GCC internal prototype to avoid an error.
6759 Use char because int might match the return type of a GCC
6760 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006761#ifdef __cplusplus
6762extern "C"
6763#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006764char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006765int
6766main ()
6767{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006768return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006769 ;
6770 return 0;
6771}
6772_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006773for ac_lib in '' dir; do
6774 if test -z "$ac_lib"; then
6775 ac_res="none required"
6776 else
6777 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00006778 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00006779 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006780 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006781 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00006782fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006783rm -f core conftest.err conftest.$ac_objext \
6784 conftest$ac_exeext
Matthias Klose3cef2a92012-03-14 23:39:33 +01006785 if ${ac_cv_search_opendir+:} false; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006786 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00006787fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006788done
Matthias Klose3cef2a92012-03-14 23:39:33 +01006789if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006790
Martin v. Löwiseba40652007-08-30 20:10:57 +00006791else
6792 ac_cv_search_opendir=no
6793fi
6794rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006795LIBS=$ac_func_search_save_LIBS
6796fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006797{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6798$as_echo "$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006799ac_res=$ac_cv_search_opendir
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006800if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006801 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006802
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006803fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006804
Michael W. Hudson54241132001-12-07 15:38:26 +00006805else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006806 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6807$as_echo_n "checking for library containing opendir... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006808if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006809 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006810else
6811 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006812cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006813/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006814
Martin v. Löwiseba40652007-08-30 20:10:57 +00006815/* Override any GCC internal prototype to avoid an error.
6816 Use char because int might match the return type of a GCC
6817 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006818#ifdef __cplusplus
6819extern "C"
6820#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006821char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006822int
6823main ()
6824{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006825return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006826 ;
6827 return 0;
6828}
6829_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006830for ac_lib in '' x; do
6831 if test -z "$ac_lib"; then
6832 ac_res="none required"
6833 else
6834 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00006835 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00006836 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006837 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006838 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00006839fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006840rm -f core conftest.err conftest.$ac_objext \
6841 conftest$ac_exeext
Matthias Klose3cef2a92012-03-14 23:39:33 +01006842 if ${ac_cv_search_opendir+:} false; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006843 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00006844fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006845done
Matthias Klose3cef2a92012-03-14 23:39:33 +01006846if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006847
Martin v. Löwiseba40652007-08-30 20:10:57 +00006848else
6849 ac_cv_search_opendir=no
6850fi
6851rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006852LIBS=$ac_func_search_save_LIBS
6853fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006854{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6855$as_echo "$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006856ac_res=$ac_cv_search_opendir
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006857if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006858 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006859
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006860fi
6861
6862fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006863
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
6865$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006866if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006867 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006868else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006869 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006870/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006871#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006872int
6873main ()
6874{
6875return makedev(0, 0);
6876 ;
6877 return 0;
6878}
6879_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006880if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006881 ac_cv_header_sys_types_h_makedev=yes
6882else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006883 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006884fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006885rm -f core conftest.err conftest.$ac_objext \
6886 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006887
6888fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006889{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
6890$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006891
6892if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006893ac_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 +01006894if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006895
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006896$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006897
6898fi
6899
6900
6901
6902 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006903 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 +01006904if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006905
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006906$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006907
6908fi
6909
6910
6911 fi
6912fi
6913
Michael W. Hudson54241132001-12-07 15:38:26 +00006914
Martin v. Löwis11017b12006-01-14 18:12:57 +00006915# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00006916for ac_header in linux/netlink.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006917do :
6918 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 +00006919#ifdef HAVE_ASM_TYPES_H
6920#include <asm/types.h>
6921#endif
6922#ifdef HAVE_SYS_SOCKET_H
6923#include <sys/socket.h>
6924#endif
6925
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006926"
Matthias Klose3cef2a92012-03-14 23:39:33 +01006927if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00006928 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006929#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006930_ACEOF
6931
6932fi
6933
6934done
6935
6936
Guido van Rossum627b2d71993-12-24 10:39:16 +00006937# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006938was_it_defined=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
6940$as_echo_n "checking for clock_t in time.h... " >&6; }
6941cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006942/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006943#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006944
6945_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006946if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006947 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00006948 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006949else
Martin v. Löwis11437992002-04-12 09:54:03 +00006950
6951
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006952$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00006953
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006954
Guido van Rossum627b2d71993-12-24 10:39:16 +00006955fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006956rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006957
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006958{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
6959$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006960
Neal Norwitz11690112002-07-30 01:08:28 +00006961# Check whether using makedev requires defining _OSF_SOURCE
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
6963$as_echo_n "checking for makedev... " >&6; }
6964cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006965/* end confdefs.h. */
Jesus Cea616de772010-04-28 10:32:30 +00006966
6967#if defined(MAJOR_IN_MKDEV)
6968#include <sys/mkdev.h>
6969#elif defined(MAJOR_IN_SYSMACROS)
6970#include <sys/sysmacros.h>
6971#else
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006972#include <sys/types.h>
Jesus Cea616de772010-04-28 10:32:30 +00006973#endif
Neal Norwitz11690112002-07-30 01:08:28 +00006974int
6975main ()
6976{
6977 makedev(0, 0)
6978 ;
6979 return 0;
6980}
6981_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006982if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006983 ac_cv_has_makedev=yes
6984else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006985 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006986fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006987rm -f core conftest.err conftest.$ac_objext \
6988 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006989if test "$ac_cv_has_makedev" = "no"; then
6990 # we didn't link, try if _OSF_SOURCE will allow us to link
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006991 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006992/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006993
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006994#define _OSF_SOURCE 1
6995#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006996
Neal Norwitz11690112002-07-30 01:08:28 +00006997int
6998main ()
6999{
7000 makedev(0, 0)
7001 ;
7002 return 0;
7003}
7004_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007005if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007006 ac_cv_has_makedev=yes
7007else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007008 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007009fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007010rm -f core conftest.err conftest.$ac_objext \
7011 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00007012 if test "$ac_cv_has_makedev" = "yes"; then
7013
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007014$as_echo "#define _OSF_SOURCE 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007015
7016 fi
7017fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007018{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
7019$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007020if test "$ac_cv_has_makedev" = "yes"; then
7021
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007022$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007023
7024fi
7025
Martin v. Löwis399a6892002-10-04 10:22:02 +00007026# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
7027# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
7028# defined, but the compiler does not support pragma redefine_extname,
7029# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
7030# structures (such as rlimit64) without declaring them. As a
7031# work-around, disable LFS on such configurations
7032
7033use_lfs=yes
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
7035$as_echo_n "checking Solaris LFS bug... " >&6; }
7036cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007037/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00007038
7039#define _LARGEFILE_SOURCE 1
7040#define _FILE_OFFSET_BITS 64
7041#include <sys/resource.h>
7042
Martin v. Löwis399a6892002-10-04 10:22:02 +00007043int
7044main ()
7045{
7046struct rlimit foo;
7047 ;
7048 return 0;
7049}
7050_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007051if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00007052 sol_lfs_bug=no
7053else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007054 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00007055fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007056rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007057{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
7058$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00007059if test "$sol_lfs_bug" = "yes"; then
7060 use_lfs=no
7061fi
7062
7063if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00007064# Two defines needed to enable largefile support on various platforms
7065# These may affect some typedefs
Georg Brandl94800df2011-02-25 11:09:02 +00007066case $ac_sys_system/$ac_sys_release in
7067AIX*)
7068
7069$as_echo "#define _LARGE_FILES 1" >>confdefs.h
7070
7071 ;;
7072esac
Guido van Rossum810cc512001-09-09 23:51:39 +00007073
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007074$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007075
7076
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007077$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00007078
Martin v. Löwis399a6892002-10-04 10:22:02 +00007079fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007080
Guido van Rossum84e7b241996-08-19 21:59:00 +00007081# Add some code to confdefs.h so that the test for off_t works on SCO
7082cat >> confdefs.h <<\EOF
7083#if defined(SCO_DS)
7084#undef _OFF_T
7085#endif
7086EOF
7087
Guido van Rossumef2255b2000-03-10 22:30:29 +00007088# Type availability checks
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007089ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007090if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007091
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007092else
Martin v. Löwis11437992002-04-12 09:54:03 +00007093
7094cat >>confdefs.h <<_ACEOF
7095#define mode_t int
7096_ACEOF
7097
7098fi
7099
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007100ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007101if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007102
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007103else
Martin v. Löwis11437992002-04-12 09:54:03 +00007104
7105cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007106#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00007107_ACEOF
7108
7109fi
7110
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007111ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007112if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007113
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007114else
Martin v. Löwis11437992002-04-12 09:54:03 +00007115
7116cat >>confdefs.h <<_ACEOF
7117#define pid_t int
7118_ACEOF
7119
7120fi
7121
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007122
Martin v. Löwis11437992002-04-12 09:54:03 +00007123cat >>confdefs.h <<_ACEOF
Matthias Klosecbf54b12010-05-08 11:04:18 +00007124#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00007125_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007126
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007127ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007128if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007129
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007130else
Martin v. Löwis11437992002-04-12 09:54:03 +00007131
7132cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007133#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007134_ACEOF
7135
7136fi
7137
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
7139$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007140if ${ac_cv_type_uid_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007141 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007142else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007143 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007144/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007145#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007146
7147_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007148if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007149 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007150 ac_cv_type_uid_t=yes
7151else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007152 ac_cv_type_uid_t=no
7153fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00007154rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007155
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007156fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007157{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
7158$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007159if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007160
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007161$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007162
7163
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007164$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007165
7166fi
7167
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007168
7169# There are two separate checks for each of the exact-width integer types we
7170# need. First we check whether the type is available using the usual
7171# AC_CHECK_TYPE macro with the default includes (which includes <inttypes.h>
7172# and <stdint.h> where available). We then also use the special type checks of
7173# the form AC_TYPE_UINT32_T, which in the case that uint32_t is not available
7174# directly, #define's uint32_t to be a suitable type.
7175
7176ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
7177if test "x$ac_cv_type_uint32_t" = xyes; then :
7178
7179$as_echo "#define HAVE_UINT32_T 1" >>confdefs.h
7180
7181fi
7182
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007183ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
7184case $ac_cv_c_uint32_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007185 no|yes) ;; #(
7186 *)
7187
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007188$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007189
7190
7191cat >>confdefs.h <<_ACEOF
7192#define uint32_t $ac_cv_c_uint32_t
7193_ACEOF
7194;;
7195 esac
7196
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007197
7198ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
7199if test "x$ac_cv_type_uint64_t" = xyes; then :
7200
7201$as_echo "#define HAVE_UINT64_T 1" >>confdefs.h
7202
7203fi
7204
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007205ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
7206case $ac_cv_c_uint64_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007207 no|yes) ;; #(
7208 *)
7209
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007210$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007211
7212
7213cat >>confdefs.h <<_ACEOF
7214#define uint64_t $ac_cv_c_uint64_t
7215_ACEOF
7216;;
7217 esac
7218
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007219
7220ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
7221if test "x$ac_cv_type_int32_t" = xyes; then :
7222
7223$as_echo "#define HAVE_INT32_T 1" >>confdefs.h
7224
7225fi
7226
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007227ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
7228case $ac_cv_c_int32_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007229 no|yes) ;; #(
7230 *)
7231
7232cat >>confdefs.h <<_ACEOF
7233#define int32_t $ac_cv_c_int32_t
7234_ACEOF
7235;;
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007236esac
7237
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007238
7239ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
7240if test "x$ac_cv_type_int64_t" = xyes; then :
7241
7242$as_echo "#define HAVE_INT64_T 1" >>confdefs.h
7243
7244fi
7245
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007246ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
7247case $ac_cv_c_int64_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007248 no|yes) ;; #(
7249 *)
7250
7251cat >>confdefs.h <<_ACEOF
7252#define int64_t $ac_cv_c_int64_t
7253_ACEOF
7254;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007255esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00007256
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007257
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007258ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007259if test "x$ac_cv_type_ssize_t" = xyes; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007260
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007261$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00007262
7263fi
7264
Jack Jansendd19cf82001-12-06 22:36:17 +00007265
Michael W. Hudson54241132001-12-07 15:38:26 +00007266# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007267# ANSI C requires sizeof(char) == 1, so no need to check it
Martin v. Löwiseba40652007-08-30 20:10:57 +00007268# The cast to long int works around a bug in the HP C Compiler
7269# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7270# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7271# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
7273$as_echo_n "checking size of int... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007274if ${ac_cv_sizeof_int+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007275 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007276else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007277 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 +00007278
Martin v. Löwis11437992002-04-12 09:54:03 +00007279else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007280 if test "$ac_cv_type_int" = yes; then
7281 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7282$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007283as_fn_error 77 "cannot compute sizeof (int)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007284See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007285 else
7286 ac_cv_sizeof_int=0
7287 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007288fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007289
Martin v. Löwis11437992002-04-12 09:54:03 +00007290fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007291{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
7292$as_echo "$ac_cv_sizeof_int" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007293
7294
7295
Martin v. Löwis11437992002-04-12 09:54:03 +00007296cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007297#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007298_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007299
7300
Martin v. Löwiseba40652007-08-30 20:10:57 +00007301# The cast to long int works around a bug in the HP C Compiler
7302# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7303# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7304# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
7306$as_echo_n "checking size of long... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007307if ${ac_cv_sizeof_long+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007308 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007309else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007310 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 +00007311
Martin v. Löwis11437992002-04-12 09:54:03 +00007312else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007313 if test "$ac_cv_type_long" = yes; then
7314 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7315$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007316as_fn_error 77 "cannot compute sizeof (long)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007317See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007318 else
7319 ac_cv_sizeof_long=0
7320 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007321fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007322
Martin v. Löwis11437992002-04-12 09:54:03 +00007323fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007324{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
7325$as_echo "$ac_cv_sizeof_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007326
7327
7328
Martin v. Löwis11437992002-04-12 09:54:03 +00007329cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007330#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007331_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007332
7333
Martin v. Löwiseba40652007-08-30 20:10:57 +00007334# The cast to long int works around a bug in the HP C Compiler
7335# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7336# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7337# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
7339$as_echo_n "checking size of void *... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007340if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007341 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007342else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007343 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 +00007344
Martin v. Löwis11437992002-04-12 09:54:03 +00007345else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007346 if test "$ac_cv_type_void_p" = yes; then
7347 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7348$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007349as_fn_error 77 "cannot compute sizeof (void *)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007350See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007351 else
7352 ac_cv_sizeof_void_p=0
7353 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007354fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007355
Martin v. Löwis11437992002-04-12 09:54:03 +00007356fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007357{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
7358$as_echo "$ac_cv_sizeof_void_p" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007359
7360
7361
Martin v. Löwis11437992002-04-12 09:54:03 +00007362cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007363#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00007364_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007365
7366
Martin v. Löwiseba40652007-08-30 20:10:57 +00007367# The cast to long int works around a bug in the HP C Compiler
7368# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7369# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7370# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
7372$as_echo_n "checking size of short... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007373if ${ac_cv_sizeof_short+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007374 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007375else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007376 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 +00007377
Martin v. Löwis11437992002-04-12 09:54:03 +00007378else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007379 if test "$ac_cv_type_short" = yes; then
7380 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7381$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007382as_fn_error 77 "cannot compute sizeof (short)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007383See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007384 else
7385 ac_cv_sizeof_short=0
7386 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007387fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007388
Martin v. Löwis11437992002-04-12 09:54:03 +00007389fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007390{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
7391$as_echo "$ac_cv_sizeof_short" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007392
7393
7394
Martin v. Löwis11437992002-04-12 09:54:03 +00007395cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007396#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007397_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007398
7399
Martin v. Löwiseba40652007-08-30 20:10:57 +00007400# The cast to long int works around a bug in the HP C Compiler
7401# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7402# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7403# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007404{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
7405$as_echo_n "checking size of float... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007406if ${ac_cv_sizeof_float+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007407 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007408else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007409 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 +00007410
Martin v. Löwis11437992002-04-12 09:54:03 +00007411else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007412 if test "$ac_cv_type_float" = yes; then
7413 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7414$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007415as_fn_error 77 "cannot compute sizeof (float)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007416See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007417 else
7418 ac_cv_sizeof_float=0
7419 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007420fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007421
Martin v. Löwis11437992002-04-12 09:54:03 +00007422fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007423{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
7424$as_echo "$ac_cv_sizeof_float" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007425
7426
7427
Martin v. Löwis11437992002-04-12 09:54:03 +00007428cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007429#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007430_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007431
7432
Martin v. Löwiseba40652007-08-30 20:10:57 +00007433# The cast to long int works around a bug in the HP C Compiler
7434# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7435# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7436# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
7438$as_echo_n "checking size of double... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007439if ${ac_cv_sizeof_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007440 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007441else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007442 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 +00007443
Martin v. Löwis11437992002-04-12 09:54:03 +00007444else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007445 if test "$ac_cv_type_double" = yes; then
7446 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7447$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007448as_fn_error 77 "cannot compute sizeof (double)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007449See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007450 else
7451 ac_cv_sizeof_double=0
7452 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007453fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007454
Martin v. Löwis11437992002-04-12 09:54:03 +00007455fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007456{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
7457$as_echo "$ac_cv_sizeof_double" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007458
7459
7460
Martin v. Löwis11437992002-04-12 09:54:03 +00007461cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007462#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007463_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007464
7465
Martin v. Löwiseba40652007-08-30 20:10:57 +00007466# The cast to long int works around a bug in the HP C Compiler
7467# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7468# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7469# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
7471$as_echo_n "checking size of fpos_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007472if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007473 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007474else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007475 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 +00007476
Martin v. Löwis11437992002-04-12 09:54:03 +00007477else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007478 if test "$ac_cv_type_fpos_t" = yes; then
7479 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7480$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007481as_fn_error 77 "cannot compute sizeof (fpos_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007482See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007483 else
7484 ac_cv_sizeof_fpos_t=0
7485 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007486fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007487
Martin v. Löwis11437992002-04-12 09:54:03 +00007488fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007489{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
7490$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007491
7492
7493
Martin v. Löwis11437992002-04-12 09:54:03 +00007494cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007495#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007496_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007497
Michael W. Hudson54241132001-12-07 15:38:26 +00007498
Martin v. Löwiseba40652007-08-30 20:10:57 +00007499# The cast to long int works around a bug in the HP C Compiler
7500# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7501# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7502# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
7504$as_echo_n "checking size of size_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007505if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007506 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007507else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007508 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 +00007509
Martin v. Löwis18e16552006-02-15 17:27:45 +00007510else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007511 if test "$ac_cv_type_size_t" = yes; then
7512 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7513$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007514as_fn_error 77 "cannot compute sizeof (size_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007515See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007516 else
7517 ac_cv_sizeof_size_t=0
7518 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00007519fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007520
Martin v. Löwis18e16552006-02-15 17:27:45 +00007521fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007522{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
7523$as_echo "$ac_cv_sizeof_size_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007524
7525
7526
Martin v. Löwis18e16552006-02-15 17:27:45 +00007527cat >>confdefs.h <<_ACEOF
7528#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
7529_ACEOF
7530
7531
Christian Heimes951cc0f2008-01-31 23:08:23 +00007532# The cast to long int works around a bug in the HP C Compiler
7533# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7534# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7535# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
7537$as_echo_n "checking size of pid_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007538if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007539 $as_echo_n "(cached) " >&6
Christian Heimes951cc0f2008-01-31 23:08:23 +00007540else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007541 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 +00007542
Christian Heimes951cc0f2008-01-31 23:08:23 +00007543else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007544 if test "$ac_cv_type_pid_t" = yes; then
7545 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7546$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007547as_fn_error 77 "cannot compute sizeof (pid_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007548See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes951cc0f2008-01-31 23:08:23 +00007549 else
7550 ac_cv_sizeof_pid_t=0
7551 fi
7552fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007553
Christian Heimes951cc0f2008-01-31 23:08:23 +00007554fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007555{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
7556$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes951cc0f2008-01-31 23:08:23 +00007557
7558
7559
7560cat >>confdefs.h <<_ACEOF
7561#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
7562_ACEOF
7563
7564
Michael W. Hudson54241132001-12-07 15:38:26 +00007565
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
7567$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007568have_long_long=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007569cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007570/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007571
Martin v. Löwis11437992002-04-12 09:54:03 +00007572int
7573main ()
7574{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007575long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007576 ;
7577 return 0;
7578}
7579_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007580if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007581
7582
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007583$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007584
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007585 have_long_long=yes
7586
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007587fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007588rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007589{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
7590$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007591if test "$have_long_long" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00007592# The cast to long int works around a bug in the HP C Compiler
7593# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7594# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7595# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
7597$as_echo_n "checking size of long long... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007598if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007599 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007600else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007601 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 +00007602
Martin v. Löwis11437992002-04-12 09:54:03 +00007603else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007604 if test "$ac_cv_type_long_long" = yes; then
7605 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7606$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007607as_fn_error 77 "cannot compute sizeof (long long)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007608See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007609 else
7610 ac_cv_sizeof_long_long=0
7611 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007612fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007613
Martin v. Löwis11437992002-04-12 09:54:03 +00007614fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007615{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
7616$as_echo "$ac_cv_sizeof_long_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007617
7618
7619
Martin v. Löwis11437992002-04-12 09:54:03 +00007620cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007621#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007622_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007623
Michael W. Hudson54241132001-12-07 15:38:26 +00007624
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007625fi
7626
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
7628$as_echo_n "checking for long double support... " >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007629have_long_double=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007630cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007631/* end confdefs.h. */
7632
7633int
7634main ()
7635{
Matthias Klosec511b472010-05-08 11:01:39 +00007636long double x; x = (long double)0;
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007637 ;
7638 return 0;
7639}
7640_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007641if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007642
7643
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007644$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007645
7646 have_long_double=yes
7647
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007648fi
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007649rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007650{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
7651$as_echo "$have_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007652if test "$have_long_double" = yes ; then
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007653# The cast to long int works around a bug in the HP C Compiler
7654# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7655# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7656# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
7658$as_echo_n "checking size of long double... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007659if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007660 $as_echo_n "(cached) " >&6
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007661else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007662 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 +00007663
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007664else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007665 if test "$ac_cv_type_long_double" = yes; then
7666 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7667$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007668as_fn_error 77 "cannot compute sizeof (long double)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007669See \`config.log' for more details" "$LINENO" 5; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007670 else
7671 ac_cv_sizeof_long_double=0
7672 fi
7673fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007674
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007675fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007676{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
7677$as_echo "$ac_cv_sizeof_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007678
7679
7680
7681cat >>confdefs.h <<_ACEOF
7682#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
7683_ACEOF
7684
7685
7686fi
7687
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
7689$as_echo_n "checking for _Bool support... " >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007690have_c99_bool=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007691cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007692/* end confdefs.h. */
7693
7694int
7695main ()
7696{
7697_Bool x; x = (_Bool)0;
7698 ;
7699 return 0;
7700}
7701_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007702if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007703
7704
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007705$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007706
7707 have_c99_bool=yes
7708
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007709fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007710rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007711{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7712$as_echo "$have_c99_bool" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007713if test "$have_c99_bool" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00007714# The cast to long int works around a bug in the HP C Compiler
7715# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7716# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7717# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7719$as_echo_n "checking size of _Bool... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007720if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007721 $as_echo_n "(cached) " >&6
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007722else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007723 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 +00007724
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007725else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007726 if test "$ac_cv_type__Bool" = yes; then
7727 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7728$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007729as_fn_error 77 "cannot compute sizeof (_Bool)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007730See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007731 else
7732 ac_cv_sizeof__Bool=0
7733 fi
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007734fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007735
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007736fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007737{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7738$as_echo "$ac_cv_sizeof__Bool" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007739
7740
7741
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007742cat >>confdefs.h <<_ACEOF
7743#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7744_ACEOF
7745
7746
7747fi
7748
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007749ac_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 +00007750 #include <stdint.h>
7751 #endif
Antoine Pitrou7be5a652010-10-10 08:14:41 +00007752 #ifdef HAVE_INTTYPES_H
7753 #include <inttypes.h>
7754 #endif
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007755"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007756if test "x$ac_cv_type_uintptr_t" = xyes; then :
Martin v. Löwisebe26702006-10-02 14:55:51 +00007757
7758cat >>confdefs.h <<_ACEOF
7759#define HAVE_UINTPTR_T 1
7760_ACEOF
7761
Martin v. Löwiseba40652007-08-30 20:10:57 +00007762# The cast to long int works around a bug in the HP C Compiler
7763# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7764# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7765# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7767$as_echo_n "checking size of uintptr_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007768if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007769 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007770else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007771 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 +00007772
Martin v. Löwis11437992002-04-12 09:54:03 +00007773else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007774 if test "$ac_cv_type_uintptr_t" = yes; then
7775 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7776$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007777as_fn_error 77 "cannot compute sizeof (uintptr_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007778See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007779 else
7780 ac_cv_sizeof_uintptr_t=0
7781 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007782fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007783
Martin v. Löwis11437992002-04-12 09:54:03 +00007784fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007785{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7786$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007787
7788
7789
Martin v. Löwis11437992002-04-12 09:54:03 +00007790cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007791#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007792_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007793
Michael W. Hudson54241132001-12-07 15:38:26 +00007794
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007795fi
7796
Martin v. Löwisebe26702006-10-02 14:55:51 +00007797
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007798# The cast to long int works around a bug in the HP C Compiler
7799# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7800# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7801# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
7803$as_echo_n "checking size of off_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007804if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007805 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007806else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007807 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007808#ifdef HAVE_SYS_TYPES_H
7809#include <sys/types.h>
7810#endif
7811
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007812"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007813
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007814else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007815 if test "$ac_cv_type_off_t" = yes; then
7816 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7817$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007818as_fn_error 77 "cannot compute sizeof (off_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007819See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007820 else
7821 ac_cv_sizeof_off_t=0
7822 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007823fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007824
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007825fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007826{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
7827$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007828
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007829
7830
Martin v. Löwis11437992002-04-12 09:54:03 +00007831cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007832#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007833_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007834
Michael W. Hudson54241132001-12-07 15:38:26 +00007835
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007836
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
7838$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson0ef0b912009-12-31 21:11:48 +00007839if test "$have_long_long" = yes
7840then
7841if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007842 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007843
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007844$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007845
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7847$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007848else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7850$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007851fi
Mark Dickinson0ef0b912009-12-31 21:11:48 +00007852else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7854$as_echo "no" >&6; }
Mark Dickinson0ef0b912009-12-31 21:11:48 +00007855fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007856
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007857# The cast to long int works around a bug in the HP C Compiler
7858# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7859# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7860# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
7862$as_echo_n "checking size of time_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007863if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007864 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007865else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007866 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007867#ifdef HAVE_SYS_TYPES_H
7868#include <sys/types.h>
7869#endif
7870#ifdef HAVE_TIME_H
7871#include <time.h>
7872#endif
7873
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007874"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007875
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007876else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007877 if test "$ac_cv_type_time_t" = yes; then
7878 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7879$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007880as_fn_error 77 "cannot compute sizeof (time_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007881See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007882 else
7883 ac_cv_sizeof_time_t=0
7884 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007885fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007886
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007887fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007888{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
7889$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007890
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007891
7892
Martin v. Löwis11437992002-04-12 09:54:03 +00007893cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007894#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007895_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007896
Michael W. Hudson54241132001-12-07 15:38:26 +00007897
7898
Trent Mick635f6fb2000-08-23 21:33:05 +00007899# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007900ac_save_cc="$CC"
7901if test "$ac_cv_kpthread" = "yes"
7902then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00007903elif test "$ac_cv_kthread" = "yes"
7904then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00007905elif test "$ac_cv_pthread" = "yes"
7906then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007907fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
7909$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007910have_pthread_t=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007911cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007912/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00007913
7914 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007915int
7916main ()
7917{
Guido van Rossum12580492000-09-24 16:47:19 +00007918pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007919 ;
7920 return 0;
7921}
Matthias Klosec511b472010-05-08 11:01:39 +00007922
Martin v. Löwis11437992002-04-12 09:54:03 +00007923_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007924if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00007925 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00007926fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007927rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007928{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
7929$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007930if test "$have_pthread_t" = yes ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007931 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007932# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7933# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7934# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
7936$as_echo_n "checking size of pthread_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007937if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007938 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007939else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007940 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007941#ifdef HAVE_PTHREAD_H
7942#include <pthread.h>
7943#endif
7944
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007945"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007946
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007947else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007948 if test "$ac_cv_type_pthread_t" = yes; then
7949 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7950$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007951as_fn_error 77 "cannot compute sizeof (pthread_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007952See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007953 else
7954 ac_cv_sizeof_pthread_t=0
7955 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00007956fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007957
Trent Mick635f6fb2000-08-23 21:33:05 +00007958fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007959{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
7960$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007961
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007962
7963
Martin v. Löwis11437992002-04-12 09:54:03 +00007964cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007965#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007966_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007967
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007968
Trent Mick635f6fb2000-08-23 21:33:05 +00007969fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007970CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00007971
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-toolbox-glue" >&5
7973$as_echo_n "checking for --enable-toolbox-glue... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007974# Check whether --enable-toolbox-glue was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007975if test "${enable_toolbox_glue+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007976 enableval=$enable_toolbox_glue;
7977fi
Jack Jansene578a632001-08-15 01:27:14 +00007978
7979
7980if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +00007981then
Jack Jansene578a632001-08-15 01:27:14 +00007982 case $ac_sys_system/$ac_sys_release in
7983 Darwin/*)
7984 enable_toolbox_glue="yes";;
7985 *)
7986 enable_toolbox_glue="no";;
7987 esac
7988fi
7989case "$enable_toolbox_glue" in
7990yes)
Jack Jansene578a632001-08-15 01:27:14 +00007991 extra_machdep_objs="Python/mactoolboxglue.o"
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007992 extra_undefs="-u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +00007993
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007994$as_echo "#define USE_TOOLBOX_OBJECT_GLUE 1" >>confdefs.h
Jack Jansene578a632001-08-15 01:27:14 +00007995
7996 ;;
7997*)
Jack Jansene578a632001-08-15 01:27:14 +00007998 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00007999 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00008000 ;;
8001esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008002{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_toolbox_glue" >&5
8003$as_echo "$enable_toolbox_glue" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008004
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008005
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00008006
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008007case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +00008008 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008009 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8010 ;;
8011 Darwin/*)
8012 OTHER_LIBTOOL_OPT=""
8013 ;;
8014esac
8015
8016
Ronald Oussoren25967582009-09-06 10:00:26 +00008017
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008018case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +00008019 Darwin/[01567]\..*)
Ronald Oussoren988117f2006-04-29 11:31:35 +00008020 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8021 if test "${enable_universalsdk}"; then
8022 :
8023 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00008024 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Ronald Oussoren988117f2006-04-29 11:31:35 +00008025 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008026 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008027 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008028 Darwin/*)
Ronald Oussorena55af9a2010-01-17 16:25:57 +00008029 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008030 if test ${gcc_version} '<' 4.0
8031 then
8032 LIBTOOL_CRUFT="-lcc_dynamic"
8033 else
8034 LIBTOOL_CRUFT=""
8035 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008036 if test "$cross_compiling" = yes; then :
Ronald Oussoren23d92532009-09-07 06:12:00 +00008037 ac_osx_32bit=yes
Ronald Oussoren25967582009-09-06 10:00:26 +00008038else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008039 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren25967582009-09-06 10:00:26 +00008040/* end confdefs.h. */
Ronald Oussoren23d92532009-09-07 06:12:00 +00008041
Ronald Oussoren25967582009-09-06 10:00:26 +00008042 #include <unistd.h>
8043 int main(int argc, char*argv[])
8044 {
8045 if (sizeof(long) == 4) {
8046 return 0;
8047 } else {
8048 return 1;
8049 }
Ronald Oussoren84ddd722009-09-08 07:17:10 +00008050 }
Ronald Oussoren23d92532009-09-07 06:12:00 +00008051
Ronald Oussoren25967582009-09-06 10:00:26 +00008052_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008053if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren25967582009-09-06 10:00:26 +00008054 ac_osx_32bit=yes
8055else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008056 ac_osx_32bit=no
Ronald Oussoren25967582009-09-06 10:00:26 +00008057fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008058rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8059 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren25967582009-09-06 10:00:26 +00008060fi
8061
8062
Ronald Oussoren25967582009-09-06 10:00:26 +00008063 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00008064 case `/usr/bin/arch` in
Ronald Oussoren25967582009-09-06 10:00:26 +00008065 i386)
8066 MACOSX_DEFAULT_ARCH="i386"
8067 ;;
8068 ppc)
8069 MACOSX_DEFAULT_ARCH="ppc"
8070 ;;
8071 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008072 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren25967582009-09-06 10:00:26 +00008073 ;;
8074 esac
8075 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00008076 case `/usr/bin/arch` in
Ronald Oussoren25967582009-09-06 10:00:26 +00008077 i386)
8078 MACOSX_DEFAULT_ARCH="x86_64"
8079 ;;
8080 ppc)
8081 MACOSX_DEFAULT_ARCH="ppc64"
8082 ;;
8083 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008084 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren25967582009-09-06 10:00:26 +00008085 ;;
8086 esac
8087
8088 #ARCH_RUN_32BIT="true"
8089 fi
8090
8091 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00008092 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008093 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008094esac
8095
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
8097$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008098if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008099then
Skip Montanarodecc6a42003-01-01 20:07:49 +00008100 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00008101 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008102 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008103
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008104$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008105
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8107$as_echo "yes" >&6; }
Ronald Oussoren450d5612009-06-08 21:12:41 +00008108 if test $enable_shared = "yes"
8109 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008110 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 +00008111 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008112else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8114$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008115fi
8116
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
8118$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008119case $ac_sys_system/$ac_sys_release in
8120 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008121
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008122$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008123
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
8125$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008126 ;;
8127 *)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8129$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008130 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008131esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008132
Guido van Rossum0a516c91994-09-12 10:58:40 +00008133# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008134
Michael W. Hudson54241132001-12-07 15:38:26 +00008135
8136
8137
8138
Ronald Oussoren75912852010-04-08 08:13:31 +00008139
Guido van Rossum0a516c91994-09-12 10:58:40 +00008140# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00008141# -- usually .so, .sl on HP-UX, .dll on Cygwin
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
8143$as_echo_n "checking SO... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008144if test -z "$SO"
8145then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008146 case $ac_sys_system in
Neal Norwitz58e28882006-05-19 07:00:58 +00008147 hp*|HP*)
8148 case `uname -m` in
8149 ia64) SO=.so;;
8150 *) SO=.sl;;
8151 esac
8152 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00008153 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00008154 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008155 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +00008156else
8157 # this might also be a termcap variable, see #610332
8158 echo
8159 echo '====================================================================='
8160 echo '+ +'
8161 echo '+ WARNING: You have set SO in your environment. +'
8162 echo '+ Do you really mean to change the extension for shared libraries? +'
8163 echo '+ Continuing in 10 seconds to let you to ponder. +'
8164 echo '+ +'
8165 echo '====================================================================='
8166 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +00008167fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008168{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
8169$as_echo "$SO" >&6; }
Neal Norwitz58e28882006-05-19 07:00:58 +00008170
Ronald Oussoren79f90492009-01-02 10:44:46 +00008171
Neal Norwitz58e28882006-05-19 07:00:58 +00008172cat >>confdefs.h <<_ACEOF
8173#define SHLIB_EXT "$SO"
8174_ACEOF
8175
Guido van Rossum0a516c91994-09-12 10:58:40 +00008176# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00008177# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008178# (Shared libraries in this instance are shared modules to be loaded into
8179# Python, as opposed to building Python itself as a shared library.)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
8181$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008182if test -z "$LDSHARED"
8183then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008184 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008185 AIX*)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008186 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00008187 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008188 ;;
8189 BeOS*)
8190 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +00008191 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008192 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00008193 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00008194 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008195 SunOS/5*)
Ronald Oussoren75912852010-04-08 08:13:31 +00008196 if test "$GCC" = "yes" ; then
8197 LDSHARED='$(CC) -shared'
8198 LDCXXSHARED='$(CXX) -shared'
8199 else
8200 LDSHARED='$(CC) -G'
8201 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a662000-05-26 12:22:54 +00008202 fi ;;
Thomas Hellerdc96a772008-04-04 10:07:55 +00008203 hp*|HP*)
Ronald Oussoren75912852010-04-08 08:13:31 +00008204 if test "$GCC" = "yes" ; then
8205 LDSHARED='$(CC) -shared'
8206 LDCXXSHARED='$(CXX) -shared'
8207 else
8208 LDSHARED='ld -b'
Thomas Hellerdc96a772008-04-04 10:07:55 +00008209 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +00008210 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +00008211 Darwin/1.3*)
Stefan Krah3a3e2032010-11-28 15:30:05 +00008212 LDSHARED='$(CC) -bundle'
8213 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00008214 if test "$enable_framework" ; then
8215 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008216 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8217 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008218 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008219 else
8220 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00008221 LDSHARED="$LDSHARED -undefined suppress"
Ronald Oussoren75912852010-04-08 08:13:31 +00008222 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00008223 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008224 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Stefan Krah3a3e2032010-11-28 15:30:05 +00008225 LDSHARED='$(CC) -bundle'
8226 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00008227 if test "$enable_framework" ; then
8228 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008229 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8230 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008231 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008232 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00008233 # No framework, use the Python app as bundle-loader
8234 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00008235 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008236 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008237 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008238 Darwin/*)
8239 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
8240 # This allows an extension to be used in any Python
Ronald Oussoren38f1b982007-09-02 09:46:07 +00008241
Ned Deilyc40b9032014-06-25 13:48:46 -07008242 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
8243 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
8244 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
8245 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
8246 if test ${dep_target_major} -eq 10 && \
8247 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00008248 then
Ned Deilyc40b9032014-06-25 13:48:46 -07008249 # building for OS X 10.0 through 10.2
Stefan Krah3a3e2032010-11-28 15:30:05 +00008250 LDSHARED='$(CC) -bundle'
8251 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00008252 if test "$enable_framework" ; then
8253 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008254 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8255 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008256 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008257 else
8258 # No framework, use the Python app as bundle-loader
8259 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
8260 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008261 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008262 fi
Ned Deilyc40b9032014-06-25 13:48:46 -07008263 else
8264 # building for OS X 10.3 and later
8265 if test "${enable_universalsdk}"; then
8266 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
8267 fi
8268 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
8269 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
8270 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00008271 fi
8272 ;;
Ronald Oussoren75912852010-04-08 08:13:31 +00008273 Linux*|GNU*|QNX*)
8274 LDSHARED='$(CC) -shared'
8275 LDCXXSHARED='$(CXX) -shared';;
8276 BSD/OS*/4*)
8277 LDSHARED="gcc -shared"
8278 LDCXXSHARED="g++ -shared";;
Martin v. Löwis222c5152006-06-03 07:37:13 +00008279 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00008280 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00008281 then
Stefan Krah3a3e2032010-11-28 15:30:05 +00008282 LDSHARED='$(CC) -shared'
8283 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00008284 else
Stefan Krah3a3e2032010-11-28 15:30:05 +00008285 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00008286 fi;;
Martin v. Löwis222c5152006-06-03 07:37:13 +00008287 OpenBSD*)
8288 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8289 then
Stefan Krah3a3e2032010-11-28 15:30:05 +00008290 LDSHARED='$(CC) -shared $(CCSHARED)'
8291 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Martin v. Löwis222c5152006-06-03 07:37:13 +00008292 else
8293 case `uname -r` in
8294 [01].* | 2.[0-7] | 2.[0-7].*)
8295 LDSHARED="ld -Bshareable ${LDFLAGS}"
8296 ;;
8297 *)
Stefan Krah3a3e2032010-11-28 15:30:05 +00008298 LDSHARED='$(CC) -shared $(CCSHARED)'
8299 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Martin v. Löwis222c5152006-06-03 07:37:13 +00008300 ;;
8301 esac
8302 fi;;
Ronald Oussoren75912852010-04-08 08:13:31 +00008303 NetBSD*|DragonFly*)
Antoine Pitroucb402772011-01-02 20:51:34 +00008304 LDSHARED='$(CC) -shared'
8305 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008306 OpenUNIX*|UnixWare*)
Ronald Oussoren75912852010-04-08 08:13:31 +00008307 if test "$GCC" = "yes" ; then
8308 LDSHARED='$(CC) -shared'
8309 LDCXXSHARED='$(CXX) -shared'
8310 else
8311 LDSHARED='$(CC) -G'
8312 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00008313 fi;;
Ronald Oussoren75912852010-04-08 08:13:31 +00008314 SCO_SV*)
8315 LDSHARED='$(CC) -Wl,-G,-Bexport'
8316 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
8317 CYGWIN*)
8318 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
8319 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
8320 atheos*)
8321 LDSHARED="gcc -shared"
8322 LDCXXSHARED="g++ -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008323 *) LDSHARED="ld";;
8324 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008325fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008326{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
8327$as_echo "$LDSHARED" >&6; }
Ronald Oussoren75912852010-04-08 08:13:31 +00008328LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008329BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00008330# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008331# library (module) -- this is only needed for a few systems
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
8333$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008334if test -z "$CCSHARED"
8335then
Guido van Rossum07397971997-04-29 21:49:50 +00008336 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008337 SunOS*) if test "$GCC" = yes;
Martin v. Löwiseb623572007-03-12 10:50:39 +00008338 then CCSHARED="-fPIC";
8339 elif test `uname -p` = sparc;
8340 then CCSHARED="-xcode=pic32";
8341 else CCSHARED="-Kpic";
8342 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00008343 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00008344 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00008345 else CCSHARED="+z";
8346 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008347 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008348 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008349 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008350 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008351 if test "$GCC" = "yes"
8352 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008353 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008354 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008355 SCO_SV*)
8356 if test "$GCC" = "yes"
8357 then CCSHARED="-fPIC"
8358 else CCSHARED="-Kpic -belf"
8359 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008360 IRIX*/6*) case $CC in
8361 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00008362 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008363 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008364 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008365 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008366fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008367{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
8368$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008369# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008370# the python executable -- this is only needed for a few systems
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
8372$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008373if test -z "$LINKFORSHARED"
8374then
Guido van Rossum07397971997-04-29 21:49:50 +00008375 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008376 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008377 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00008378 LINKFORSHARED="-Wl,-E -Wl,+s";;
8379# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008380 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008381 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008382 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00008383 Darwin/*)
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008384 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
8385 # which is
Jack Jansene578a632001-08-15 01:27:14 +00008386 # not used by the core itself but which needs to be in the core so
8387 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +00008388 # -prebind is no longer used, because it actually seems to give a
8389 # slowdown in stead of a speedup, maybe due to the large number of
8390 # dynamic loads Python does.
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008391
8392 LINKFORSHARED="$extra_undefs"
Jack Jansene578a632001-08-15 01:27:14 +00008393 if test "$enable_framework"
8394 then
Jack Jansenda49e192005-01-07 13:08:22 +00008395 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008396 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008397 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008398 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008399 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00008400 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008401 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00008402 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8403 then
8404 LINKFORSHARED="-Wl,--export-dynamic"
8405 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008406 SunOS/5*) case $CC in
8407 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00008408 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00008409 then
8410 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008411 fi;;
8412 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00008413 CYGWIN*)
8414 if test $enable_shared = "no"
8415 then
8416 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
8417 fi;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00008418 QNX*)
8419 # -Wl,-E causes the symbols to be added to the dynamic
8420 # symbol table so that they can be found when a module
8421 # is loaded. -N 2048K causes the stack size to be set
8422 # to 2048 kilobytes so that the stack doesn't overflow
8423 # when running test_compile.py.
8424 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008425 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008426fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008427{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
8428$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008429
Michael W. Hudson54241132001-12-07 15:38:26 +00008430
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00008431
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
8433$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008434if test ! "$LIBRARY" = "$LDLIBRARY"
8435then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00008436 case $ac_sys_system in
8437 CYGWIN*)
8438 # Cygwin needs CCSHARED when building extension DLLs
8439 # but not when building the interpreter DLL.
8440 CFLAGSFORSHARED='';;
8441 *)
8442 CFLAGSFORSHARED='$(CCSHARED)'
8443 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008444fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008445{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
8446$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008447
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008448# SHLIBS are libraries (except -lc and -lm) to link to the python shared
8449# library (with --enable-shared).
8450# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008451# symbols, this must be set to $(LIBS) (expanded by make). We do this even
8452# if it is not required, since it creates a dependency of the shared library
8453# to LIBS. This, in turn, means that applications linking the shared libpython
8454# don't need to link LIBS explicitly. The default should be only changed
8455# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008456
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
8458$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008459case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008460 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008461 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008462esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008463{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
8464$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008465
8466
Guido van Rossum627b2d71993-12-24 10:39:16 +00008467# checks for libraries
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
8469$as_echo_n "checking for dlopen in -ldl... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008470if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008471 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008472else
Martin v. Löwis11437992002-04-12 09:54:03 +00008473 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008474LIBS="-ldl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008475cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008476/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008477
Martin v. Löwiseba40652007-08-30 20:10:57 +00008478/* Override any GCC internal prototype to avoid an error.
8479 Use char because int might match the return type of a GCC
8480 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008481#ifdef __cplusplus
8482extern "C"
8483#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008484char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008485int
8486main ()
8487{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008488return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008489 ;
8490 return 0;
8491}
8492_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008493if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008494 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008495else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008496 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008497fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008498rm -f core conftest.err conftest.$ac_objext \
8499 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008500LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008501fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008502{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
8503$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008504if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008505 cat >>confdefs.h <<_ACEOF
8506#define HAVE_LIBDL 1
8507_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008508
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008509 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00008510
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008511fi
8512 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
8514$as_echo_n "checking for shl_load in -ldld... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008515if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008516 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008517else
Martin v. Löwis11437992002-04-12 09:54:03 +00008518 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008519LIBS="-ldld $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008520cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008521/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008522
Martin v. Löwiseba40652007-08-30 20:10:57 +00008523/* Override any GCC internal prototype to avoid an error.
8524 Use char because int might match the return type of a GCC
8525 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008526#ifdef __cplusplus
8527extern "C"
8528#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008529char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008530int
8531main ()
8532{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008533return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008534 ;
8535 return 0;
8536}
8537_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008538if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008539 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008540else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008541 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008542fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008543rm -f core conftest.err conftest.$ac_objext \
8544 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008545LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008546fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008547{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
8548$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008549if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008550 cat >>confdefs.h <<_ACEOF
8551#define HAVE_LIBDLD 1
8552_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008553
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008554 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008555
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008556fi
8557 # Dynamic linking for HP-UX
Victor Stinner7c906672015-01-06 13:53:37 +01008558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for RAND_egd in -lcrypto" >&5
8559$as_echo_n "checking for RAND_egd in -lcrypto... " >&6; }
8560if ${ac_cv_lib_crypto_RAND_egd+:} false; then :
8561 $as_echo_n "(cached) " >&6
8562else
8563 ac_check_lib_save_LIBS=$LIBS
8564LIBS="-lcrypto $LIBS"
8565cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8566/* end confdefs.h. */
8567
8568/* Override any GCC internal prototype to avoid an error.
8569 Use char because int might match the return type of a GCC
8570 builtin and then its argument prototype would still apply. */
8571#ifdef __cplusplus
8572extern "C"
8573#endif
8574char RAND_egd ();
8575int
8576main ()
8577{
8578return RAND_egd ();
8579 ;
8580 return 0;
8581}
8582_ACEOF
8583if ac_fn_c_try_link "$LINENO"; then :
8584 ac_cv_lib_crypto_RAND_egd=yes
8585else
8586 ac_cv_lib_crypto_RAND_egd=no
8587fi
8588rm -f core conftest.err conftest.$ac_objext \
8589 conftest$ac_exeext conftest.$ac_ext
8590LIBS=$ac_check_lib_save_LIBS
8591fi
8592{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_RAND_egd" >&5
8593$as_echo "$ac_cv_lib_crypto_RAND_egd" >&6; }
8594if test "x$ac_cv_lib_crypto_RAND_egd" = xyes; then :
8595
8596$as_echo "#define HAVE_RAND_EGD 1" >>confdefs.h
8597
8598fi
8599
Martin v. Löwis519adae2003-09-20 10:47:47 +00008600
Ronald Oussoren79f90492009-01-02 10:44:46 +00008601# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00008602if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008603 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
8604$as_echo_n "checking for library containing sem_init... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008605if ${ac_cv_search_sem_init+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008606 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008607else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008608 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008609cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008610/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008611
Martin v. Löwiseba40652007-08-30 20:10:57 +00008612/* Override any GCC internal prototype to avoid an error.
8613 Use char because int might match the return type of a GCC
8614 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008615#ifdef __cplusplus
8616extern "C"
8617#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008618char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008619int
8620main ()
8621{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008622return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008623 ;
8624 return 0;
8625}
8626_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00008627for ac_lib in '' pthread rt posix4; do
8628 if test -z "$ac_lib"; then
8629 ac_res="none required"
8630 else
8631 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00008632 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00008633 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008634 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008635 ac_cv_search_sem_init=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00008636fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008637rm -f core conftest.err conftest.$ac_objext \
8638 conftest$ac_exeext
Matthias Klose3cef2a92012-03-14 23:39:33 +01008639 if ${ac_cv_search_sem_init+:} false; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008640 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00008641fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008642done
Matthias Klose3cef2a92012-03-14 23:39:33 +01008643if ${ac_cv_search_sem_init+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008644
Martin v. Löwiseba40652007-08-30 20:10:57 +00008645else
8646 ac_cv_search_sem_init=no
8647fi
8648rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008649LIBS=$ac_func_search_save_LIBS
8650fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008651{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
8652$as_echo "$ac_cv_search_sem_init" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008653ac_res=$ac_cv_search_sem_init
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008654if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008655 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008656
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008657fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00008658 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00008659 # posix4 on Solaris 2.6
8660 # pthread (first!) on Linux
8661fi
8662
Martin v. Löwis19d17342003-06-14 21:03:05 +00008663# check if we need libintl for locale functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
8665$as_echo_n "checking for textdomain in -lintl... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008666if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008667 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00008668else
8669 ac_check_lib_save_LIBS=$LIBS
8670LIBS="-lintl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008671cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008672/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008673
Martin v. Löwiseba40652007-08-30 20:10:57 +00008674/* Override any GCC internal prototype to avoid an error.
8675 Use char because int might match the return type of a GCC
8676 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008677#ifdef __cplusplus
8678extern "C"
8679#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00008680char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008681int
8682main ()
8683{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008684return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008685 ;
8686 return 0;
8687}
8688_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008689if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008690 ac_cv_lib_intl_textdomain=yes
8691else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008692 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00008693fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008694rm -f core conftest.err conftest.$ac_objext \
8695 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00008696LIBS=$ac_check_lib_save_LIBS
8697fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008698{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
8699$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008700if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008701
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008702$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00008703
8704fi
8705
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008706
8707# checks for system dependent C++ extensions support
8708case "$ac_sys_system" in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008709 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
8710$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
8711 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008712/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00008713
Georg Brandl94800df2011-02-25 11:09:02 +00008714 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008715int
8716main ()
8717{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008718loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00008719 ;
8720 return 0;
8721}
Matthias Klosec511b472010-05-08 11:01:39 +00008722
Martin v. Löwis11437992002-04-12 09:54:03 +00008723_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008724if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008725
Matthias Klosec511b472010-05-08 11:01:39 +00008726
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008727$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008728
Matthias Klosec511b472010-05-08 11:01:39 +00008729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008730$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00008731
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008732else
Matthias Klosec511b472010-05-08 11:01:39 +00008733
8734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008735$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00008736
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008737fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008738rm -f core conftest.err conftest.$ac_objext \
8739 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008740 *) ;;
8741esac
8742
Guido van Rossum70c7f481998-03-26 18:44:10 +00008743# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008744# BeOS' sockets are stashed in libnet.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
8746$as_echo_n "checking for t_open in -lnsl... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008747if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008748 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008749else
Martin v. Löwis11437992002-04-12 09:54:03 +00008750 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008751LIBS="-lnsl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008752cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008753/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008754
Martin v. Löwiseba40652007-08-30 20:10:57 +00008755/* Override any GCC internal prototype to avoid an error.
8756 Use char because int might match the return type of a GCC
8757 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008758#ifdef __cplusplus
8759extern "C"
8760#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008761char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008762int
8763main ()
8764{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008765return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008766 ;
8767 return 0;
8768}
8769_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008770if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008771 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008772else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008773 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008774fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008775rm -f core conftest.err conftest.$ac_objext \
8776 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008777LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008778fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008779{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
8780$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008781if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008782 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008783fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00008784 # SVR4
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8786$as_echo_n "checking for socket in -lsocket... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008787if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008788 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008789else
Martin v. Löwis11437992002-04-12 09:54:03 +00008790 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008791LIBS="-lsocket $LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008792cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008793/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008794
Martin v. Löwiseba40652007-08-30 20:10:57 +00008795/* Override any GCC internal prototype to avoid an error.
8796 Use char because int might match the return type of a GCC
8797 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008798#ifdef __cplusplus
8799extern "C"
8800#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008801char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008802int
8803main ()
8804{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008805return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008806 ;
8807 return 0;
8808}
8809_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008810if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008811 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008812else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008813 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008814fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008815rm -f core conftest.err conftest.$ac_objext \
8816 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008817LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008818fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008819{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8820$as_echo "$ac_cv_lib_socket_socket" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008821if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00008822 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00008823fi
8824 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00008825
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +00008826case "$ac_sys_system" in
8827BeOS*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lnet" >&5
8829$as_echo_n "checking for socket in -lnet... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008830if ${ac_cv_lib_net_socket+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008831 $as_echo_n "(cached) " >&6
Guido van Rossumad678af1998-10-02 14:42:15 +00008832else
Martin v. Löwis11437992002-04-12 09:54:03 +00008833 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00008834LIBS="-lnet $LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008835cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008836/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008837
Martin v. Löwiseba40652007-08-30 20:10:57 +00008838/* Override any GCC internal prototype to avoid an error.
8839 Use char because int might match the return type of a GCC
8840 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008841#ifdef __cplusplus
8842extern "C"
8843#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008844char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008845int
8846main ()
8847{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008848return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008849 ;
8850 return 0;
8851}
8852_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008853if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008854 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +00008855else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008856 ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +00008857fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008858rm -f core conftest.err conftest.$ac_objext \
8859 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008860LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00008861fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008862{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_net_socket" >&5
8863$as_echo "$ac_cv_lib_net_socket" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008864if test "x$ac_cv_lib_net_socket" = xyes; then :
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008865 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008866fi
8867 # BeOS
8868;;
8869esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00008870
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
8872$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008873
Martin v. Löwiseba40652007-08-30 20:10:57 +00008874# Check whether --with-libs was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008875if test "${with_libs+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008876 withval=$with_libs;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008877{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8878$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00008879LIBS="$withval $LIBS"
8880
8881else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008882 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8883$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008884fi
8885
Guido van Rossum7f43da71994-08-01 12:15:30 +00008886
Benjamin Peterson64e8f6e2014-12-15 00:00:23 -05008887
8888
8889
8890
8891
8892
8893
8894if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
8895 if test -n "$ac_tool_prefix"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008896 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8897set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8899$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008900if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008901 $as_echo_n "(cached) " >&6
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008902else
8903 case $PKG_CONFIG in
8904 [\\/]* | ?:[\\/]*)
8905 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8906 ;;
8907 *)
8908 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8909for as_dir in $PATH
8910do
8911 IFS=$as_save_IFS
8912 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008913 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01008914 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008915 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008916 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008917 break 2
8918 fi
8919done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008920 done
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008921IFS=$as_save_IFS
8922
8923 ;;
8924esac
8925fi
8926PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8927if test -n "$PKG_CONFIG"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8929$as_echo "$PKG_CONFIG" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008930else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8932$as_echo "no" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008933fi
8934
8935
8936fi
8937if test -z "$ac_cv_path_PKG_CONFIG"; then
8938 ac_pt_PKG_CONFIG=$PKG_CONFIG
8939 # Extract the first word of "pkg-config", so it can be a program name with args.
8940set dummy pkg-config; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8942$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008943if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008944 $as_echo_n "(cached) " >&6
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008945else
8946 case $ac_pt_PKG_CONFIG in
8947 [\\/]* | ?:[\\/]*)
8948 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8949 ;;
8950 *)
8951 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8952for as_dir in $PATH
8953do
8954 IFS=$as_save_IFS
8955 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008956 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01008957 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008958 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008959 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008960 break 2
8961 fi
8962done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008963 done
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008964IFS=$as_save_IFS
8965
8966 ;;
8967esac
8968fi
8969ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8970if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
8972$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008973else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8975$as_echo "no" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008976fi
8977
8978 if test "x$ac_pt_PKG_CONFIG" = x; then
8979 PKG_CONFIG=""
8980 else
8981 case $cross_compiling:$ac_tool_warned in
8982yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008983{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8984$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008985ac_tool_warned=yes ;;
8986esac
8987 PKG_CONFIG=$ac_pt_PKG_CONFIG
8988 fi
8989else
8990 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8991fi
8992
Benjamin Peterson64e8f6e2014-12-15 00:00:23 -05008993fi
8994if test -n "$PKG_CONFIG"; then
8995 _pkg_min_version=0.9.0
8996 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
8997$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
8998 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
8999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9000$as_echo "yes" >&6; }
9001 else
9002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9003$as_echo "no" >&6; }
9004 PKG_CONFIG=""
9005 fi
9006fi
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009007
9008# Check for use of the system expat library
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
9010$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009011
9012# Check whether --with-system_expat was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009013if test "${with_system_expat+set}" = set; then :
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009014 withval=$with_system_expat;
Benjamin Petersonf2d1b2a2010-10-31 16:53:53 +00009015else
9016 with_system_expat="no"
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009017fi
9018
9019
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009020{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
9021$as_echo "$with_system_expat" >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009022
9023# Check for use of the system libffi library
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
9025$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009026
9027# Check whether --with-system_ffi was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009028if test "${with_system_ffi+set}" = set; then :
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009029 withval=$with_system_ffi;
Benjamin Petersonf2d1b2a2010-10-31 16:53:53 +00009030else
9031 with_system_ffi="no"
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009032fi
9033
9034
9035if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009036 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
9037else
9038 LIBFFI_INCLUDEDIR=""
9039fi
9040
9041
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009042{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
9043$as_echo "$with_system_ffi" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +00009044
Ned Deilya2a9f572013-10-25 00:30:10 -07009045# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
9046
9047
9048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
9049$as_echo_n "checking for --with-tcltk-includes... " >&6; }
9050
9051# Check whether --with-tcltk-includes was given.
9052if test "${with_tcltk_includes+set}" = set; then :
9053 withval=$with_tcltk_includes;
9054else
9055 with_tcltk_includes="default"
9056fi
9057
9058{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
9059$as_echo "$with_tcltk_includes" >&6; }
9060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
9061$as_echo_n "checking for --with-tcltk-libs... " >&6; }
9062
9063# Check whether --with-tcltk-libs was given.
9064if test "${with_tcltk_libs+set}" = set; then :
9065 withval=$with_tcltk_libs;
9066else
9067 with_tcltk_libs="default"
9068fi
9069
9070{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
9071$as_echo "$with_tcltk_libs" >&6; }
9072if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
9073then
9074 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
9075 then
9076 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
9077 fi
9078 TCLTK_INCLUDES=""
9079 TCLTK_LIBS=""
9080else
9081 TCLTK_INCLUDES="$with_tcltk_includes"
9082 TCLTK_LIBS="$with_tcltk_libs"
9083fi
9084
Benjamin Peterson867475c2009-04-29 20:36:25 +00009085# Check for --with-dbmliborder
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
9087$as_echo_n "checking for --with-dbmliborder... " >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +00009088
9089# Check whether --with-dbmliborder was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009090if test "${with_dbmliborder+set}" = set; then :
Benjamin Peterson867475c2009-04-29 20:36:25 +00009091 withval=$with_dbmliborder;
9092if test x$with_dbmliborder = xyes
9093then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009094as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Benjamin Peterson867475c2009-04-29 20:36:25 +00009095else
9096 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
9097 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
9098 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009099 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Benjamin Peterson867475c2009-04-29 20:36:25 +00009100 fi
9101 done
9102fi
9103fi
9104
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009105{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
9106$as_echo "$with_dbmliborder" >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +00009107
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009108# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009109
9110
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
9112$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009113
Martin v. Löwiseba40652007-08-30 20:10:57 +00009114# Check whether --with-signal-module was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009115if test "${with_signal_module+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009116 withval=$with_signal_module;
9117fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009118
9119
9120if test -z "$with_signal_module"
9121then with_signal_module="yes"
9122fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009123{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
9124$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009125
9126if test "${with_signal_module}" = "yes"; then
9127 USE_SIGNAL_MODULE=""
9128 SIGNAL_OBJS=""
9129else
9130 USE_SIGNAL_MODULE="#"
9131 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9132fi
9133
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009134# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009135
Barry Warsawc0d24d82000-06-29 16:12:00 +00009136USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009137
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dec-threads" >&5
9139$as_echo_n "checking for --with-dec-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009140
Guido van Rossumec2f0731997-01-22 20:54:01 +00009141
Martin v. Löwiseba40652007-08-30 20:10:57 +00009142# Check whether --with-dec-threads was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009143if test "${with_dec_threads+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009144 withval=$with_dec_threads;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009145{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9146$as_echo "$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +00009147LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00009148if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00009149 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00009150fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009151else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9153$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009154fi
9155
Martin v. Löwis11437992002-04-12 09:54:03 +00009156
9157# Templates for things AC_DEFINEd more than once.
9158# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009159
9160
Martin v. Löwis11437992002-04-12 09:54:03 +00009161
9162
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
9164$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009165
Martin v. Löwiseba40652007-08-30 20:10:57 +00009166# Check whether --with-threads was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009167if test "${with_threads+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009168 withval=$with_threads;
9169fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009170
9171
Barry Warsawc0d24d82000-06-29 16:12:00 +00009172# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009173
Martin v. Löwiseba40652007-08-30 20:10:57 +00009174# Check whether --with-thread was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009175if test "${with_thread+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009176 withval=$with_thread; with_threads=$with_thread
9177fi
9178
Barry Warsawc0d24d82000-06-29 16:12:00 +00009179
9180if test -z "$with_threads"
9181then with_threads="yes"
9182fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009183{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
9184$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d82000-06-29 16:12:00 +00009185
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009186
Barry Warsawc0d24d82000-06-29 16:12:00 +00009187if test "$with_threads" = "no"
9188then
9189 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009190elif test "$ac_cv_pthread_is_default" = yes
9191then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009192 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009193
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009194 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009195 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009196
9197 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009198 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009199elif test "$ac_cv_kpthread" = "yes"
9200then
9201 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009202 if test "$ac_cv_cxx_thread" = "yes"; then
9203 CXX="$CXX -Kpthread"
9204 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009205 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009206
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009207 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009208 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009209elif test "$ac_cv_kthread" = "yes"
9210then
9211 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009212 if test "$ac_cv_cxx_thread" = "yes"; then
9213 CXX="$CXX -Kthread"
9214 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009215 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009216
9217 posix_threads=yes
9218 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009219elif test "$ac_cv_pthread" = "yes"
9220then
9221 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009222 if test "$ac_cv_cxx_thread" = "yes"; then
9223 CXX="$CXX -pthread"
9224 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009225 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009226
9227 posix_threads=yes
9228 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009229else
9230 if test ! -z "$with_threads" -a -d "$with_threads"
9231 then LDFLAGS="$LDFLAGS -L$with_threads"
9232 fi
9233 if test ! -z "$withval" -a -d "$withval"
9234 then LDFLAGS="$LDFLAGS -L$withval"
9235 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009236
9237 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00009238 # define _POSIX_THREADS in unistd.h. Some apparently don't
9239 # (e.g. gnu pth with pthread emulation)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009240 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
9241$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
9242 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009243/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009244
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009245#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009246#ifdef _POSIX_THREADS
9247yes
9248#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009249
9250_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009251if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009252 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009253 unistd_defines_pthreads=yes
9254else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009255 unistd_defines_pthreads=no
9256fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009257rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009258
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009259 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
9260$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009261
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009262 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009263
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009264 ac_fn_c_check_header_mongrel "$LINENO" "cthreads.h" "ac_cv_header_cthreads_h" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01009265if test "x$ac_cv_header_cthreads_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009266 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00009267
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009268 $as_echo "#define C_THREADS 1" >>confdefs.h
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009269
Martin v. Löwis11437992002-04-12 09:54:03 +00009270
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009271$as_echo "#define HURD_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009272
9273 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009274 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009275else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009276
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009277 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 +01009278if test "x$ac_cv_header_mach_cthreads_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009279 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00009280
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009281 $as_echo "#define C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009282
Martin v. Löwis11437992002-04-12 09:54:03 +00009283
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009284$as_echo "#define MACH_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009285
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009286 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009287else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009288
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009289 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pth" >&5
9290$as_echo_n "checking for --with-pth... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009291
Martin v. Löwiseba40652007-08-30 20:10:57 +00009292# Check whether --with-pth was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009293if test "${with_pth+set}" = set; then :
9294 withval=$with_pth; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9295$as_echo "$withval" >&6; }
9296 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009297
9298
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009299$as_echo "#define HAVE_PTH 1" >>confdefs.h
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009300
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009301 LIBS="-lpth $LIBS"
9302 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009303else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009304 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9305$as_echo "no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009306
9307 # Just looking for pthread_create in libpthread is not enough:
9308 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
9309 # So we really have to include pthread.h, and then link.
9310 _libs=$LIBS
9311 LIBS="$LIBS -lpthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009312 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
9313$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
9314 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009315/* end confdefs.h. */
Stefan Krahae66ca62012-11-22 22:36:57 +01009316
9317#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009318#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00009319
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009320void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00009321int
9322main ()
9323{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009324
9325pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00009326 ;
9327 return 0;
9328}
9329_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009330if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009331
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9333$as_echo "yes" >&6; }
9334 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00009335
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009336 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009337 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009338else
Martin v. Löwis11437992002-04-12 09:54:03 +00009339
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009340 LIBS=$_libs
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009341 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Matthias Klose3cef2a92012-03-14 23:39:33 +01009342if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009343 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00009344
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009345 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009346 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00009347else
Guido van Rossumad678af1998-10-02 14:42:15 +00009348
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009349 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 +01009350if test "x$ac_cv_header_atheos_threads_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009351 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009352
9353
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009354$as_echo "#define ATHEOS_THREADS 1" >>confdefs.h
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009355
9356 THREADOBJ="Python/thread.o"
9357else
9358
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009359 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 +01009360if test "x$ac_cv_header_kernel_OS_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009361 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009362
9363
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009364$as_echo "#define BEOS_THREADS 1" >>confdefs.h
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009365
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009366 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009367else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009368
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009369 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
9370$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009371if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009372 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009373else
Martin v. Löwis11437992002-04-12 09:54:03 +00009374 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009375LIBS="-lpthreads $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009376cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009377/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009378
Martin v. Löwiseba40652007-08-30 20:10:57 +00009379/* Override any GCC internal prototype to avoid an error.
9380 Use char because int might match the return type of a GCC
9381 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009382#ifdef __cplusplus
9383extern "C"
9384#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009385char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009386int
9387main ()
9388{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009389return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009390 ;
9391 return 0;
9392}
9393_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009394if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009395 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00009396else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009397 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00009398fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009399rm -f core conftest.err conftest.$ac_objext \
9400 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009401LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009402fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009403{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
9404$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009405if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009406 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00009407
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009408 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009409 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009410 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00009411else
Greg Steinadf63d62000-07-05 10:38:09 +00009412
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009413 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
9414$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009415if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009416 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00009417else
Martin v. Löwis11437992002-04-12 09:54:03 +00009418 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009419LIBS="-lc_r $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009420cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009421/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009422
Martin v. Löwiseba40652007-08-30 20:10:57 +00009423/* Override any GCC internal prototype to avoid an error.
9424 Use char because int might match the return type of a GCC
9425 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009426#ifdef __cplusplus
9427extern "C"
9428#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009429char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009430int
9431main ()
9432{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009433return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009434 ;
9435 return 0;
9436}
9437_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009438if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009439 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00009440else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009441 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00009442fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009443rm -f core conftest.err conftest.$ac_objext \
9444 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009445LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00009446fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009447{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
9448$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009449if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009450 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00009451
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009452 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009453 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009454 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009455else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009456
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009457 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
9458$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009459if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009460 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009461else
Martin v. Löwis11437992002-04-12 09:54:03 +00009462 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009463LIBS="-lpthread $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009464cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009465/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009466
Martin v. Löwiseba40652007-08-30 20:10:57 +00009467/* Override any GCC internal prototype to avoid an error.
9468 Use char because int might match the return type of a GCC
9469 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009470#ifdef __cplusplus
9471extern "C"
9472#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009473char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009474int
9475main ()
9476{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009477return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009478 ;
9479 return 0;
9480}
9481_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009482if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009483 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009484else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009485 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009486fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009487rm -f core conftest.err conftest.$ac_objext \
9488 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009489LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009490fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009491{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
9492$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009493if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009494 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009495
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009496 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009497 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009498 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009499else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009500
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009501 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
9502$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009503if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009504 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00009505else
Martin v. Löwis11437992002-04-12 09:54:03 +00009506 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009507LIBS="-lcma $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009508cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009509/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009510
Martin v. Löwiseba40652007-08-30 20:10:57 +00009511/* Override any GCC internal prototype to avoid an error.
9512 Use char because int might match the return type of a GCC
9513 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009514#ifdef __cplusplus
9515extern "C"
9516#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009517char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009518int
9519main ()
9520{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009521return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009522 ;
9523 return 0;
9524}
9525_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009526if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009527 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00009528else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009529 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00009530fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009531rm -f core conftest.err conftest.$ac_objext \
9532 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009533LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009534fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009535{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
9536$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009537if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009538 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00009539
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009540 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009541 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009542 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00009543else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00009544
Martin v. Löwis130fb172001-07-19 11:00:41 +00009545 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00009546fi
9547
Guido van Rossum627b2d71993-12-24 10:39:16 +00009548
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009549fi
9550
Guido van Rossum0be3e491997-05-22 20:33:33 +00009551fi
9552
Guido van Rossum49545951997-12-02 19:28:29 +00009553fi
9554
Guido van Rossumb93a8621998-05-07 13:27:32 +00009555fi
9556
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009557
Michael W. Hudson54241132001-12-07 15:38:26 +00009558fi
9559
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009560
9561fi
9562
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009563fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009564rm -f core conftest.err conftest.$ac_objext \
9565 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009566fi
9567
Martin v. Löwis11437992002-04-12 09:54:03 +00009568fi
9569
9570
9571fi
9572
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009573
Michael W. Hudson54241132001-12-07 15:38:26 +00009574
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009575 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
9576$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009577if ${ac_cv_lib_mpc_usconfig+:} 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="-lmpc $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 usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009592int
9593main ()
9594{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009595return usconfig ();
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_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009602else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009603 ac_cv_lib_mpc_usconfig=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_mpc_usconfig" >&5
9610$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009611if test "x$ac_cv_lib_mpc_usconfig" = 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öwis130fb172001-07-19 11:00:41 +00009614 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009615 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009616 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009617fi
9618
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009619
Neal Norwitza978ab02002-11-02 16:58:05 +00009620 if test "$posix_threads" != "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009621 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
9622$as_echo_n "checking for thr_create in -lthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009623if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009624 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009625else
Martin v. Löwis11437992002-04-12 09:54:03 +00009626 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009627LIBS="-lthread $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009628cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009629/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009630
Martin v. Löwiseba40652007-08-30 20:10:57 +00009631/* Override any GCC internal prototype to avoid an error.
9632 Use char because int might match the return type of a GCC
9633 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009634#ifdef __cplusplus
9635extern "C"
9636#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009637char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009638int
9639main ()
9640{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009641return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009642 ;
9643 return 0;
9644}
9645_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009646if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009647 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009648else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009649 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009650fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009651rm -f core conftest.err conftest.$ac_objext \
9652 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009653LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009654fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009655{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
9656$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009657if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009658 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009659
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009660 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009661 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009662 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009663fi
9664
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009665 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009666
Martin v. Löwis130fb172001-07-19 11:00:41 +00009667 if test "$USE_THREAD_MODULE" != "#"
9668 then
9669 # If the above checks didn't disable threads, (at least) OSF1
9670 # needs this '-threads' argument during linking.
9671 case $ac_sys_system in
9672 OSF1) LDLAST=-threads;;
9673 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00009674 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009675fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009676
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009677if test "$posix_threads" = "yes"; then
9678 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009679
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009680$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009681
9682 fi
9683
9684 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
9685 case $ac_sys_system/$ac_sys_release in
Charles-François Natali4929eb92011-07-21 19:41:04 +02009686 SunOS/5.6)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009687$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009688
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009689 ;;
9690 SunOS/5.8)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009691$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009692
9693 ;;
Charles-François Natali4929eb92011-07-21 19:41:04 +02009694 AIX/*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009695$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimescba36bb2008-01-30 22:54:18 +00009696
9697 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009698 esac
9699
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009700 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
9701$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009702 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009703 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009704else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009705 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009706 ac_cv_pthread_system_supported=no
9707else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009708 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009709/* end confdefs.h. */
Stefan Krahae66ca62012-11-22 22:36:57 +01009710
9711 #include <stdio.h>
9712 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009713 void *foo(void *parm) {
9714 return NULL;
9715 }
9716 main() {
9717 pthread_attr_t attr;
9718 pthread_t id;
9719 if (pthread_attr_init(&attr)) exit(-1);
9720 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
9721 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
9722 exit(0);
9723 }
9724_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009725if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009726 ac_cv_pthread_system_supported=yes
9727else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009728 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009729fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009730rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9731 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009732fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009733
Martin v. Löwiseba40652007-08-30 20:10:57 +00009734
Guido van Rossum627b2d71993-12-24 10:39:16 +00009735fi
9736
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
9738$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009739 if test "$ac_cv_pthread_system_supported" = "yes"; then
9740
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009741$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009742
9743 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009744 for ac_func in pthread_sigmask
9745do :
9746 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Matthias Klose3cef2a92012-03-14 23:39:33 +01009747if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009748 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009749#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009750_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00009751 case $ac_sys_system in
9752 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009753
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009754$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00009755
9756 ;;
9757 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009758fi
9759done
9760
Christian Heimes0d604cf2013-08-21 13:26:05 +02009761 for ac_func in pthread_atfork
9762do :
9763 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
9764if test "x$ac_cv_func_pthread_atfork" = xyes; then :
9765 cat >>confdefs.h <<_ACEOF
9766#define HAVE_PTHREAD_ATFORK 1
9767_ACEOF
9768
9769fi
9770done
9771
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009772fi
9773
9774
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009775# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00009776
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
9778$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009779# Check whether --enable-ipv6 was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009780if test "${enable_ipv6+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009781 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009782 no)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9784$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009785 ipv6=no
9786 ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009787 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9788$as_echo "yes" >&6; }
9789 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009790
9791 ipv6=yes
9792 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009793 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009794else
Martin v. Löwis11437992002-04-12 09:54:03 +00009795
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009796 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009797/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009798 /* AF_INET6 available check */
9799#include <sys/types.h>
9800#include <sys/socket.h>
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009801int
9802main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009803{
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009804int domain = AF_INET6;
9805 ;
9806 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009807}
Martin v. Löwis11437992002-04-12 09:54:03 +00009808_ACEOF
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009809if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +00009810
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9812$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009813 ipv6=yes
Matthias Klosec511b472010-05-08 11:01:39 +00009814
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009815else
Matthias Klosec511b472010-05-08 11:01:39 +00009816
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9818$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009819 ipv6=no
Matthias Klosec511b472010-05-08 11:01:39 +00009820
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009821fi
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009822rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009823
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009824if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009825 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
9826$as_echo_n "checking if RFC2553 API is available... " >&6; }
9827 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009828/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00009829
9830 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009831#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009832int
9833main ()
9834{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009835struct sockaddr_in6 x;
Matthias Klosec511b472010-05-08 11:01:39 +00009836 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00009837 ;
9838 return 0;
9839}
Matthias Klosec511b472010-05-08 11:01:39 +00009840
Martin v. Löwis11437992002-04-12 09:54:03 +00009841_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009842if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +00009843
9844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009845$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00009846 ipv6=yes
9847
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009848else
Matthias Klosec511b472010-05-08 11:01:39 +00009849
9850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009851$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00009852 ipv6=no
9853
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009854fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009855rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009856fi
9857
9858if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009859 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009860
9861fi
9862
Martin v. Löwiseba40652007-08-30 20:10:57 +00009863fi
9864
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009865
9866ipv6type=unknown
9867ipv6lib=none
9868ipv6trylibc=no
9869
9870if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009871 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
9872$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00009873 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
9874 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009875 case $i in
9876 inria)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009877 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009878/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009879
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009880#include <netinet/in.h>
9881#ifdef IPV6_INRIA_VERSION
9882yes
9883#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009884_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009885if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009886 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009887 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009888fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009889rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009890
9891 ;;
9892 kame)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009893 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009894/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009895
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009896#include <netinet/in.h>
9897#ifdef __KAME__
9898yes
9899#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009900_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009901if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009902 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009903 ipv6type=$i;
9904 ipv6lib=inet6
9905 ipv6libdir=/usr/local/v6/lib
9906 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009907fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009908rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009909
9910 ;;
9911 linux-glibc)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009912 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009913/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009914
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009915#include <features.h>
9916#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
9917yes
9918#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009919_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009920if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009921 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009922 ipv6type=$i;
9923 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009924fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009925rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009926
9927 ;;
9928 linux-inet6)
9929 if test -d /usr/inet6; then
9930 ipv6type=$i
9931 ipv6lib=inet6
9932 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00009933 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009934 fi
9935 ;;
9936 solaris)
9937 if test -f /etc/netconfig; then
Antoine Pitrou31e85952011-01-03 18:57:14 +00009938 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009939 ipv6type=$i
9940 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009941 fi
9942 fi
9943 ;;
9944 toshiba)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009945 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009946/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009947
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009948#include <sys/param.h>
9949#ifdef _TOSHIBA_INET6
9950yes
9951#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009952_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009953if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009954 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009955 ipv6type=$i;
9956 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009957 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009958fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009959rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009960
9961 ;;
9962 v6d)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009963 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009964/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009965
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009966#include </usr/local/v6/include/sys/v6config.h>
9967#ifdef __V6D__
9968yes
9969#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009970_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009971if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009972 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009973 ipv6type=$i;
9974 ipv6lib=v6;
9975 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009976 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009977fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009978rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009979
9980 ;;
9981 zeta)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009982 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009983/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009984
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009985#include <sys/param.h>
9986#ifdef _ZETA_MINAMI_INET6
9987yes
9988#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009989_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009990if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009991 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009992 ipv6type=$i;
9993 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009994 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009995fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009996rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009997
9998 ;;
9999 esac
10000 if test "$ipv6type" != "unknown"; then
10001 break
10002 fi
10003 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10005$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010006fi
10007
10008if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10009 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10010 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10011 echo "using lib$ipv6lib"
10012 else
10013 if test $ipv6trylibc = "yes"; then
10014 echo "using libc"
10015 else
10016 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10017 echo "You need to fetch lib$ipv6lib.a from appropriate"
10018 echo 'ipv6 kit and compile beforehand.'
10019 exit 1
10020 fi
10021 fi
10022fi
10023
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
10025$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
10026cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010027/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +000010028
10029 #include <Carbon/Carbon.h>
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010030int
10031main ()
10032{
10033FSIORefNum fRef = 0
10034 ;
10035 return 0;
10036}
Mark Dickinson0712b562010-05-08 19:13:21 +000010037
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010038_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010039if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +000010040
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010041
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010042$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010043
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10045$as_echo "yes" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010046
Mark Dickinson0712b562010-05-08 19:13:21 +000010047else
10048
10049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10050$as_echo "no" >&6; }
10051
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010052fi
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010053rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10054
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010055# Check for --with-doc-strings
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10057$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010058
Martin v. Löwiseba40652007-08-30 20:10:57 +000010059# Check whether --with-doc-strings was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010060if test "${with_doc_strings+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000010061 withval=$with_doc_strings;
10062fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010063
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010064
10065if test -z "$with_doc_strings"
10066then with_doc_strings="yes"
10067fi
10068if test "$with_doc_strings" != "no"
10069then
10070
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010071$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010072
10073fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010074{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10075$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010076
Neil Schemenauera35c6882001-02-27 04:45:05 +000010077# Check for Python-specific malloc support
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
10079$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010080
Martin v. Löwiseba40652007-08-30 20:10:57 +000010081# Check whether --with-tsc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010082if test "${with_tsc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000010083 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010084if test "$withval" != no
10085then
10086
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010087$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010088
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10090$as_echo "yes" >&6; }
10091else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10092$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010093fi
10094else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10096$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010097fi
10098
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010099
10100# Check for Python-specific malloc support
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10102$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010103
Martin v. Löwiseba40652007-08-30 20:10:57 +000010104# Check whether --with-pymalloc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010105if test "${with_pymalloc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000010106 withval=$with_pymalloc;
10107fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010108
Neil Schemenauera35c6882001-02-27 04:45:05 +000010109
Neil Schemenauer16c22972002-03-22 15:34:49 +000010110if test -z "$with_pymalloc"
10111then with_pymalloc="yes"
10112fi
10113if test "$with_pymalloc" != "no"
10114then
Martin v. Löwis11437992002-04-12 09:54:03 +000010115
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010116$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000010117
10118fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010119{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
10120$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000010121
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010122# Check for Valgrind support
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
10124$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010125
10126# Check whether --with-valgrind was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010127if test "${with_valgrind+set}" = set; then :
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010128 withval=$with_valgrind;
10129else
10130 with_valgrind=no
10131fi
10132
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010133{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
10134$as_echo "$with_valgrind" >&6; }
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010135if test "$with_valgrind" != no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010136 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 +010010137if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010138
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010139$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010140
10141else
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010142 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010143
10144fi
10145
10146
10147fi
10148
Barry Warsawef82cd72000-06-30 16:21:01 +000010149# Check for --with-wctype-functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-wctype-functions" >&5
10151$as_echo_n "checking for --with-wctype-functions... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010152
Martin v. Löwiseba40652007-08-30 20:10:57 +000010153# Check whether --with-wctype-functions was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010154if test "${with_wctype_functions+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000010155 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000010156if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000010157then
10158
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010159$as_echo "#define WANT_WCTYPE_FUNCTIONS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010160
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10162$as_echo "yes" >&6; }
10163else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10164$as_echo "no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000010165fi
10166else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10168$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010169fi
10170
Barry Warsawef82cd72000-06-30 16:21:01 +000010171
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010172# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000010173
Guido van Rossum98935bf2001-09-05 19:13:16 +000010174DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000010175
Guido van Rossume97ee181999-12-20 21:27:22 +000010176# the dlopen() function means we might want to use dynload_shlib.o. some
10177# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000010178for ac_func in dlopen
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010179do :
10180 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010181if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010182 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010183#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010184_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000010185
Guido van Rossume97ee181999-12-20 21:27:22 +000010186fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010187done
Guido van Rossume97ee181999-12-20 21:27:22 +000010188
Michael W. Hudson54241132001-12-07 15:38:26 +000010189
Guido van Rossume97ee181999-12-20 21:27:22 +000010190# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
10191# loading of modules.
10192
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
10194$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010195if test -z "$DYNLOADFILE"
10196then
10197 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000010198 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
10199 if test "$ac_cv_func_dlopen" = yes
10200 then DYNLOADFILE="dynload_shlib.o"
10201 else DYNLOADFILE="dynload_aix.o"
10202 fi
10203 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000010204 BeOS*) DYNLOADFILE="dynload_beos.o";;
10205 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Anthony Baxter82201742006-04-09 15:07:40 +000010206 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
10207 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010208 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000010209 *)
10210 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
10211 # out any dynamic loading
10212 if test "$ac_cv_func_dlopen" = yes
10213 then DYNLOADFILE="dynload_shlib.o"
10214 else DYNLOADFILE="dynload_stub.o"
10215 fi
10216 ;;
10217 esac
10218fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010219{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
10220$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010221if test "$DYNLOADFILE" != "dynload_stub.o"
10222then
Martin v. Löwis11437992002-04-12 09:54:03 +000010223
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010224$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000010225
10226fi
10227
Neil Schemenauer4e425612001-06-19 15:44:15 +000010228# MACHDEP_OBJS can be set to platform-specific object files needed by Python
10229
Michael W. Hudson54241132001-12-07 15:38:26 +000010230
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010231{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
10232$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010233if test -z "$MACHDEP_OBJS"
10234then
Jack Jansene578a632001-08-15 01:27:14 +000010235 MACHDEP_OBJS=$extra_machdep_objs
10236else
10237 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000010238fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010239{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
10240$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010241
Guido van Rossum627b2d71993-12-24 10:39:16 +000010242# checks for library functions
Martin v. Löwisaef18b12008-03-24 13:31:16 +000010243for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
10244 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
doko@ubuntu.coma50b0de2015-04-13 21:55:59 +020010245 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
10246 getentropy \
Martin v. Löwis50ea4562009-11-27 13:56:01 +000010247 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Benjamin Petersond16e01c2014-02-04 10:20:26 -050010248 initgroups kill killpg lchmod lchown lstat mkfifo mknod mktime mmap \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000010249 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000010250 putenv readlink realpath \
Jesse Noller355b1262009-04-02 00:03:28 +000010251 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
10252 setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000010253 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Martin v. Löwis50ea4562009-11-27 13:56:01 +000010254 setlocale setregid setreuid setresuid setresgid \
10255 setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +000010256 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000010257 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Neal Norwitz05a45592006-03-20 06:30:08 +000010258 truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010259do :
10260 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10261ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010262if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010263 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010264#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010265_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010266
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010267fi
10268done
10269
Michael W. Hudson54241132001-12-07 15:38:26 +000010270
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010271# For some functions, having a definition is not sufficient, since
10272# we want to take their address.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
10274$as_echo_n "checking for chroot... " >&6; }
10275cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010276/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010277#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010278int
10279main ()
10280{
10281void *x=chroot
10282 ;
10283 return 0;
10284}
10285_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010286if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010287
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010288$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010289
Matthias Klosec511b472010-05-08 11:01:39 +000010290 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010291$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010292else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010293 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10294$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010295
10296fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010297rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
10299$as_echo_n "checking for link... " >&6; }
10300cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010301/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010302#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010303int
10304main ()
10305{
10306void *x=link
10307 ;
10308 return 0;
10309}
10310_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010311if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010312
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010313$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010314
Matthias Klosec511b472010-05-08 11:01:39 +000010315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010316$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010317else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10319$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010320
10321fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010322rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
10324$as_echo_n "checking for symlink... " >&6; }
10325cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010326/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010327#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010328int
10329main ()
10330{
10331void *x=symlink
10332 ;
10333 return 0;
10334}
10335_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010336if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010337
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010338$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010339
Matthias Klosec511b472010-05-08 11:01:39 +000010340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010341$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010342else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10344$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010345
10346fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010347rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
10349$as_echo_n "checking for fchdir... " >&6; }
10350cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010351/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010352#include <unistd.h>
10353int
10354main ()
10355{
10356void *x=fchdir
10357 ;
10358 return 0;
10359}
10360_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010361if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010362
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010363$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010364
Matthias Klosec511b472010-05-08 11:01:39 +000010365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010366$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010367else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10369$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010370
10371fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010372rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
10374$as_echo_n "checking for fsync... " >&6; }
10375cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010376/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010377#include <unistd.h>
10378int
10379main ()
10380{
10381void *x=fsync
10382 ;
10383 return 0;
10384}
10385_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010386if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010387
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010388$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010389
Matthias Klosec511b472010-05-08 11:01:39 +000010390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010391$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010392else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10394$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010395
10396fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010397rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
10399$as_echo_n "checking for fdatasync... " >&6; }
10400cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010401/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010402#include <unistd.h>
10403int
10404main ()
10405{
10406void *x=fdatasync
10407 ;
10408 return 0;
10409}
10410_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010411if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010412
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010413$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010414
Matthias Klosec511b472010-05-08 11:01:39 +000010415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010416$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010417else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10419$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010420
10421fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010422rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
10424$as_echo_n "checking for epoll... " >&6; }
10425cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010426/* end confdefs.h. */
10427#include <sys/epoll.h>
10428int
10429main ()
10430{
10431void *x=epoll_create
10432 ;
10433 return 0;
10434}
10435_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010436if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010437
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010438$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010439
Matthias Klosec511b472010-05-08 11:01:39 +000010440 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010441$as_echo "yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010442else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10444$as_echo "no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010445
10446fi
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010447rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
10449$as_echo_n "checking for kqueue... " >&6; }
10450cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010451/* end confdefs.h. */
10452
10453#include <sys/types.h>
10454#include <sys/event.h>
10455
10456int
10457main ()
10458{
10459int x=kqueue()
10460 ;
10461 return 0;
10462}
10463_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010464if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010465
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010466$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010467
Matthias Klosec511b472010-05-08 11:01:39 +000010468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010469$as_echo "yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010470else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10472$as_echo "no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010473
10474fi
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010475rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010476# On some systems (eg. FreeBSD 5), we would find a definition of the
10477# functions ctermid_r, setgroups in the library, but no prototype
10478# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
10479# address to avoid compiler warnings and potential miscompilations
10480# because of the missing prototypes.
10481
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
10483$as_echo_n "checking for ctermid_r... " >&6; }
10484cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010485/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010486
Martin v. Löwisd5843682002-11-21 20:41:28 +000010487#include <stdio.h>
10488
Martin v. Löwisd5843682002-11-21 20:41:28 +000010489int
10490main ()
10491{
10492void* p = ctermid_r
10493 ;
10494 return 0;
10495}
10496_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010497if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010498
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010499$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010500
Matthias Klosec511b472010-05-08 11:01:39 +000010501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010502$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010503else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10505$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010506
10507fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010508rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10509
Antoine Pitroub170f172010-09-10 18:47:36 +000010510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
10511$as_echo_n "checking for flock declaration... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010512if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010513 $as_echo_n "(cached) " >&6
10514else
10515 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010516/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010517#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010518int
10519main ()
10520{
10521void* p = flock
Antoine Pitroub170f172010-09-10 18:47:36 +000010522
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010523 ;
10524 return 0;
10525}
10526_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010527if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010528 ac_cv_flock_decl=yes
10529else
10530 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010531
10532fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010533rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitrou85729812010-09-07 14:55:24 +000010534
Antoine Pitroub170f172010-09-10 18:47:36 +000010535fi
10536{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
10537$as_echo "$ac_cv_flock_decl" >&6; }
10538if test "x${ac_cv_flock_decl}" = xyes; then
10539 for ac_func in flock
10540do :
10541 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010542if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010543 cat >>confdefs.h <<_ACEOF
10544#define HAVE_FLOCK 1
Antoine Pitrou85729812010-09-07 14:55:24 +000010545_ACEOF
Antoine Pitroub170f172010-09-10 18:47:36 +000010546
Antoine Pitrou85729812010-09-07 14:55:24 +000010547else
Antoine Pitroub170f172010-09-10 18:47:36 +000010548 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitrou85729812010-09-07 14:55:24 +000010549$as_echo_n "checking for flock in -lbsd... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010550if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitrou85729812010-09-07 14:55:24 +000010551 $as_echo_n "(cached) " >&6
10552else
10553 ac_check_lib_save_LIBS=$LIBS
10554LIBS="-lbsd $LIBS"
10555cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10556/* end confdefs.h. */
10557
10558/* Override any GCC internal prototype to avoid an error.
10559 Use char because int might match the return type of a GCC
10560 builtin and then its argument prototype would still apply. */
10561#ifdef __cplusplus
10562extern "C"
10563#endif
10564char flock ();
10565int
10566main ()
10567{
10568return flock ();
10569 ;
10570 return 0;
10571}
10572_ACEOF
10573if ac_fn_c_try_link "$LINENO"; then :
10574 ac_cv_lib_bsd_flock=yes
10575else
10576 ac_cv_lib_bsd_flock=no
10577fi
10578rm -f core conftest.err conftest.$ac_objext \
10579 conftest$ac_exeext conftest.$ac_ext
10580LIBS=$ac_check_lib_save_LIBS
10581fi
10582{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
10583$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010584if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010585 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitrou85729812010-09-07 14:55:24 +000010586
10587
10588$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
10589
10590
10591fi
10592
10593
10594fi
Antoine Pitroub170f172010-09-10 18:47:36 +000010595done
10596
Antoine Pitrou85729812010-09-07 14:55:24 +000010597fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010598
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
10600$as_echo_n "checking for getpagesize... " >&6; }
10601cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010602/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010603
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010604#include <unistd.h>
10605
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010606int
10607main ()
10608{
10609void* p = getpagesize
10610 ;
10611 return 0;
10612}
10613_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010614if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010615
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010616$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010617
Matthias Klosec511b472010-05-08 11:01:39 +000010618 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010619$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010620else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10622$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010623
10624fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010625rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010626
Charles-François Natali93a11752011-11-27 13:01:35 +010010627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
10628$as_echo_n "checking for broken unsetenv... " >&6; }
10629cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10630/* end confdefs.h. */
10631
10632#include <stdlib.h>
10633
10634int
10635main ()
10636{
10637int res = unsetenv("DUMMY")
10638 ;
10639 return 0;
10640}
10641_ACEOF
10642if ac_fn_c_try_compile "$LINENO"; then :
10643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10644$as_echo "no" >&6; }
10645else
10646
10647$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
10648
10649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10650$as_echo "yes" >&6; }
10651
10652fi
10653rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10654
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010655for ac_prog in true
10656do
10657 # Extract the first word of "$ac_prog", so it can be a program name with args.
10658set dummy $ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10660$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010661if ${ac_cv_prog_TRUE+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010662 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010663else
10664 if test -n "$TRUE"; then
10665 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
10666else
10667as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10668for as_dir in $PATH
10669do
10670 IFS=$as_save_IFS
10671 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010672 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +010010673 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010674 ac_cv_prog_TRUE="$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010675 $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 +000010676 break 2
10677 fi
10678done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010679 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000010680IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010681
10682fi
10683fi
10684TRUE=$ac_cv_prog_TRUE
10685if test -n "$TRUE"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
10687$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010688else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010689 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10690$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010691fi
10692
Martin v. Löwiseba40652007-08-30 20:10:57 +000010693
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010694 test -n "$TRUE" && break
10695done
10696test -n "$TRUE" || TRUE="/bin/true"
10697
10698
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
10700$as_echo_n "checking for inet_aton in -lc... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010701if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010702 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010703else
10704 ac_check_lib_save_LIBS=$LIBS
10705LIBS="-lc $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010706cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010707/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010708
Martin v. Löwiseba40652007-08-30 20:10:57 +000010709/* Override any GCC internal prototype to avoid an error.
10710 Use char because int might match the return type of a GCC
10711 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010712#ifdef __cplusplus
10713extern "C"
10714#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010715char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010716int
10717main ()
10718{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010719return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010720 ;
10721 return 0;
10722}
10723_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010724if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010725 ac_cv_lib_c_inet_aton=yes
10726else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010727 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010728fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010729rm -f core conftest.err conftest.$ac_objext \
10730 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010731LIBS=$ac_check_lib_save_LIBS
10732fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010733{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
10734$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010735if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010736 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010737else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010738 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
10739$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010740if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010741 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010742else
10743 ac_check_lib_save_LIBS=$LIBS
10744LIBS="-lresolv $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010745cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010746/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010747
Martin v. Löwiseba40652007-08-30 20:10:57 +000010748/* Override any GCC internal prototype to avoid an error.
10749 Use char because int might match the return type of a GCC
10750 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010751#ifdef __cplusplus
10752extern "C"
10753#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010754char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010755int
10756main ()
10757{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010758return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010759 ;
10760 return 0;
10761}
10762_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010763if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010764 ac_cv_lib_resolv_inet_aton=yes
10765else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010766 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010767fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010768rm -f core conftest.err conftest.$ac_objext \
10769 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010770LIBS=$ac_check_lib_save_LIBS
10771fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010772{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
10773$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010774if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010775 cat >>confdefs.h <<_ACEOF
10776#define HAVE_LIBRESOLV 1
10777_ACEOF
10778
10779 LIBS="-lresolv $LIBS"
10780
10781fi
10782
10783
10784fi
10785
10786
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010787# On Tru64, chflags seems to be present, but calling it will
10788# exit Python
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
10790$as_echo_n "checking for chflags... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010791if ${ac_cv_have_chflags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010792 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010793else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010794 if test "$cross_compiling" = yes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010795 ac_cv_have_chflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010796else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010797 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010798/* end confdefs.h. */
Ned Deily43e10542011-06-27 23:41:53 -070010799
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010800#include <sys/stat.h>
10801#include <unistd.h>
10802int main(int argc, char*argv[])
10803{
10804 if(chflags(argv[0], 0) != 0)
10805 return 1;
10806 return 0;
10807}
Ned Deily43e10542011-06-27 23:41:53 -070010808
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010809_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010810if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010811 ac_cv_have_chflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010812else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010813 ac_cv_have_chflags=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010814fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010815rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10816 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000010817fi
10818
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010819
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010820fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010821{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
10822$as_echo "$ac_cv_have_chflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000010823if test "$ac_cv_have_chflags" = cross ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010824 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010825if test "x$ac_cv_func_chflags" = xyes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010826 ac_cv_have_chflags="yes"
10827else
10828 ac_cv_have_chflags="no"
10829fi
10830
10831fi
10832if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010833
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010834$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010835
10836fi
10837
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
10839$as_echo_n "checking for lchflags... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010840if ${ac_cv_have_lchflags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010841 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010842else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010843 if test "$cross_compiling" = yes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010844 ac_cv_have_lchflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010845else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010846 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010847/* end confdefs.h. */
Ned Deily43e10542011-06-27 23:41:53 -070010848
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010849#include <sys/stat.h>
10850#include <unistd.h>
10851int main(int argc, char*argv[])
10852{
10853 if(lchflags(argv[0], 0) != 0)
10854 return 1;
10855 return 0;
10856}
Ned Deily43e10542011-06-27 23:41:53 -070010857
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010858_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010859if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010860 ac_cv_have_lchflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010861else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010862 ac_cv_have_lchflags=no
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010863fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010864rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10865 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010866fi
10867
10868
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010869fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010870{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
10871$as_echo "$ac_cv_have_lchflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000010872if test "$ac_cv_have_lchflags" = cross ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010873 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010874if test "x$ac_cv_func_lchflags" = xyes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010875 ac_cv_have_lchflags="yes"
10876else
10877 ac_cv_have_lchflags="no"
10878fi
10879
10880fi
10881if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010882
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010883$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010884
10885fi
10886
Ronald Oussorenf8752642006-07-06 10:13:35 +000010887case $ac_sys_system/$ac_sys_release in
10888Darwin/*)
10889 _CUR_CFLAGS="${CFLAGS}"
10890 _CUR_LDFLAGS="${LDFLAGS}"
10891 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
10892 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
10893 ;;
10894esac
10895
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
10897$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010898if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010899 $as_echo_n "(cached) " >&6
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010900else
10901 ac_check_lib_save_LIBS=$LIBS
10902LIBS="-lz $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010903cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010904/* end confdefs.h. */
10905
Martin v. Löwiseba40652007-08-30 20:10:57 +000010906/* Override any GCC internal prototype to avoid an error.
10907 Use char because int might match the return type of a GCC
10908 builtin and then its argument prototype would still apply. */
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010909#ifdef __cplusplus
10910extern "C"
10911#endif
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010912char inflateCopy ();
10913int
10914main ()
10915{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010916return inflateCopy ();
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010917 ;
10918 return 0;
10919}
10920_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010921if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010922 ac_cv_lib_z_inflateCopy=yes
10923else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010924 ac_cv_lib_z_inflateCopy=no
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010925fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010926rm -f core conftest.err conftest.$ac_objext \
10927 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010928LIBS=$ac_check_lib_save_LIBS
10929fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010930{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
10931$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010932if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010933
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010934$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010935
10936fi
10937
10938
Ronald Oussorenf8752642006-07-06 10:13:35 +000010939case $ac_sys_system/$ac_sys_release in
10940Darwin/*)
10941 CFLAGS="${_CUR_CFLAGS}"
10942 LDFLAGS="${_CUR_LDFLAGS}"
10943 ;;
10944esac
10945
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
10947$as_echo_n "checking for hstrerror... " >&6; }
10948cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010949/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010950
Martin v. Löwise9416172003-05-03 10:12:45 +000010951#include <netdb.h>
10952
Martin v. Löwise9416172003-05-03 10:12:45 +000010953int
10954main ()
10955{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010956void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010957 ;
10958 return 0;
10959}
10960_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010961if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010962
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010963$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010964
Matthias Klosec511b472010-05-08 11:01:39 +000010965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010966$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010967else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10969$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010970
10971fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010972rm -f core conftest.err conftest.$ac_objext \
10973 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010974
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
10976$as_echo_n "checking for inet_aton... " >&6; }
10977cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010978/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010979
Martin v. Löwis86d66262006-02-17 08:40:11 +000010980#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010981#include <sys/socket.h>
10982#include <netinet/in.h>
10983#include <arpa/inet.h>
10984
Martin v. Löwise9416172003-05-03 10:12:45 +000010985int
10986main ()
10987{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010988void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010989 ;
10990 return 0;
10991}
10992_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010993if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010994
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010995$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010996
Matthias Klosec511b472010-05-08 11:01:39 +000010997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010998$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010999else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11001$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011002
11003fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011004rm -f core conftest.err conftest.$ac_objext \
11005 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011006
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
11008$as_echo_n "checking for inet_pton... " >&6; }
11009cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011010/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011011
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011012#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011013#include <sys/socket.h>
11014#include <netinet/in.h>
11015#include <arpa/inet.h>
11016
Martin v. Löwise9416172003-05-03 10:12:45 +000011017int
11018main ()
11019{
11020void* p = inet_pton
11021 ;
11022 return 0;
11023}
11024_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011025if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011026
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011027$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011028
Matthias Klosec511b472010-05-08 11:01:39 +000011029 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011030$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011031else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11033$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011034
11035fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011036rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000011037
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011038# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
11040$as_echo_n "checking for setgroups... " >&6; }
11041cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011042/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011043
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011044#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011045#ifdef HAVE_GRP_H
11046#include <grp.h>
11047#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000011048
Martin v. Löwisd5843682002-11-21 20:41:28 +000011049int
11050main ()
11051{
11052void* p = setgroups
11053 ;
11054 return 0;
11055}
11056_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011057if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011058
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011059$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011060
Matthias Klosec511b472010-05-08 11:01:39 +000011061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011062$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011063else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11065$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011066
11067fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011068rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000011069
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011070# check for openpty and forkpty
11071
11072for ac_func in openpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011073do :
11074 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011075if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011076 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011077#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011078_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011079
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011080else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011081 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
11082$as_echo_n "checking for openpty in -lutil... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011083if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011084 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011085else
Martin v. Löwis11437992002-04-12 09:54:03 +000011086 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011087LIBS="-lutil $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011088cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011089/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011090
Martin v. Löwiseba40652007-08-30 20:10:57 +000011091/* Override any GCC internal prototype to avoid an error.
11092 Use char because int might match the return type of a GCC
11093 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011094#ifdef __cplusplus
11095extern "C"
11096#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011097char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011098int
11099main ()
11100{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011101return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011102 ;
11103 return 0;
11104}
11105_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011106if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011107 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011108else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011109 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011110fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011111rm -f core conftest.err conftest.$ac_objext \
11112 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011113LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011114fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011115{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
11116$as_echo "$ac_cv_lib_util_openpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011117if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011118 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011119 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011120else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011121 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
11122$as_echo_n "checking for openpty in -lbsd... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011123if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011124 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011125else
11126 ac_check_lib_save_LIBS=$LIBS
11127LIBS="-lbsd $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011128cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011129/* end confdefs.h. */
11130
Martin v. Löwiseba40652007-08-30 20:10:57 +000011131/* Override any GCC internal prototype to avoid an error.
11132 Use char because int might match the return type of a GCC
11133 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011134#ifdef __cplusplus
11135extern "C"
11136#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011137char openpty ();
11138int
11139main ()
11140{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011141return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011142 ;
11143 return 0;
11144}
11145_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011146if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011147 ac_cv_lib_bsd_openpty=yes
11148else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011149 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011150fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011151rm -f core conftest.err conftest.$ac_objext \
11152 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011153LIBS=$ac_check_lib_save_LIBS
11154fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011155{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
11156$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011157if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011158 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011159 LIBS="$LIBS -lbsd"
11160fi
11161
11162
11163fi
11164
Fred Drake8cef4cf2000-06-28 16:40:38 +000011165
11166fi
11167done
11168
11169for ac_func in forkpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011170do :
11171 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011172if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011173 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011174#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011175_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011176
Fred Drake8cef4cf2000-06-28 16:40:38 +000011177else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011178 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
11179$as_echo_n "checking for forkpty in -lutil... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011180if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011181 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011182else
Martin v. Löwis11437992002-04-12 09:54:03 +000011183 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011184LIBS="-lutil $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011185cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011186/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011187
Martin v. Löwiseba40652007-08-30 20:10:57 +000011188/* Override any GCC internal prototype to avoid an error.
11189 Use char because int might match the return type of a GCC
11190 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011191#ifdef __cplusplus
11192extern "C"
11193#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011194char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011195int
11196main ()
11197{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011198return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011199 ;
11200 return 0;
11201}
11202_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011203if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011204 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011205else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011206 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011207fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011208rm -f core conftest.err conftest.$ac_objext \
11209 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011210LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011211fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011212{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
11213$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011214if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011215 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011216 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011217else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011218 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
11219$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011220if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011221 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011222else
11223 ac_check_lib_save_LIBS=$LIBS
11224LIBS="-lbsd $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011225cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011226/* end confdefs.h. */
11227
Martin v. Löwiseba40652007-08-30 20:10:57 +000011228/* Override any GCC internal prototype to avoid an error.
11229 Use char because int might match the return type of a GCC
11230 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011231#ifdef __cplusplus
11232extern "C"
11233#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011234char forkpty ();
11235int
11236main ()
11237{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011238return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011239 ;
11240 return 0;
11241}
11242_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011243if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011244 ac_cv_lib_bsd_forkpty=yes
11245else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011246 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011247fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011248rm -f core conftest.err conftest.$ac_objext \
11249 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011250LIBS=$ac_check_lib_save_LIBS
11251fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011252{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
11253$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011254if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011255 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011256 LIBS="$LIBS -lbsd"
11257fi
11258
11259
11260fi
11261
Fred Drake8cef4cf2000-06-28 16:40:38 +000011262
11263fi
11264done
11265
Jack Jansendd19cf82001-12-06 22:36:17 +000011266
Brett Cannonaa5778d2008-03-18 04:09:00 +000011267# Stuff for expat.
Brett Cannonaa5778d2008-03-18 04:09:00 +000011268for ac_func in memmove
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011269do :
11270 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011271if test "x$ac_cv_func_memmove" = xyes; then :
Brett Cannonaa5778d2008-03-18 04:09:00 +000011272 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011273#define HAVE_MEMMOVE 1
Brett Cannonaa5778d2008-03-18 04:09:00 +000011274_ACEOF
11275
11276fi
11277done
11278
11279
Michael W. Hudson54241132001-12-07 15:38:26 +000011280# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000011281for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011282do :
11283 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11284ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011285if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011286 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011287#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011288_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000011289
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011290fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000011291done
11292
Michael W. Hudson54241132001-12-07 15:38:26 +000011293
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011294ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011295if test "x$ac_cv_func_dup2" = xyes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011296 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000011297
Martin v. Löwis1142de32002-03-29 16:28:31 +000011298else
Martin v. Löwiseba40652007-08-30 20:10:57 +000011299 case " $LIBOBJS " in
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011300 *" dup2.$ac_objext "* ) ;;
11301 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Martin v. Löwiseba40652007-08-30 20:10:57 +000011302 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011303esac
11304
Martin v. Löwis1142de32002-03-29 16:28:31 +000011305fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011306
11307ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011308if test "x$ac_cv_func_getcwd" = xyes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011309 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
11310
11311else
11312 case " $LIBOBJS " in
11313 *" getcwd.$ac_objext "* ) ;;
11314 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
11315 ;;
11316esac
11317
11318fi
11319
11320ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011321if test "x$ac_cv_func_strdup" = xyes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011322 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
11323
11324else
11325 case " $LIBOBJS " in
11326 *" strdup.$ac_objext "* ) ;;
11327 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
11328 ;;
11329esac
11330
11331fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000011332
11333
11334for ac_func in getpgrp
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011335do :
11336 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011337if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011338 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011339#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011340_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011341 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011342/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011343#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011344int
11345main ()
11346{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011347getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011348 ;
11349 return 0;
11350}
11351_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011352if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011353
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011354$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011355
Guido van Rossum627b2d71993-12-24 10:39:16 +000011356fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011357rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011358
Guido van Rossum627b2d71993-12-24 10:39:16 +000011359fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011360done
Guido van Rossum627b2d71993-12-24 10:39:16 +000011361
Jack Jansen150753c2003-03-29 22:07:47 +000011362for ac_func in setpgrp
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011363do :
11364 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011365if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000011366 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011367#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000011368_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011369 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011370/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000011371#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000011372int
11373main ()
11374{
11375setpgrp(0,0);
11376 ;
11377 return 0;
11378}
11379_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011380if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011381
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011382$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011383
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011384fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011385rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000011386
11387fi
11388done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011389
Thomas Wouters3a584202000-08-05 23:28:51 +000011390for ac_func in gettimeofday
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011391do :
11392 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011393if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011394 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011395#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011396_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011397 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011398/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011399#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011400int
11401main ()
11402{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011403gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011404 ;
11405 return 0;
11406}
11407_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011408if ac_fn_c_try_compile "$LINENO"; then :
11409
Guido van Rossum627b2d71993-12-24 10:39:16 +000011410else
Skip Montanaro6dead952003-09-25 14:50:04 +000011411
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011412$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011413
Martin v. Löwis11437992002-04-12 09:54:03 +000011414
Guido van Rossum627b2d71993-12-24 10:39:16 +000011415fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011416rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011417
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011418fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011419done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011420
Michael W. Hudson54241132001-12-07 15:38:26 +000011421
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
11423$as_echo_n "checking for major... " >&6; }
11424cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011425/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011426
Neal Norwitz6eb37f02003-02-23 23:28:15 +000011427#if defined(MAJOR_IN_MKDEV)
11428#include <sys/mkdev.h>
11429#elif defined(MAJOR_IN_SYSMACROS)
11430#include <sys/sysmacros.h>
11431#else
11432#include <sys/types.h>
11433#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011434
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011435int
11436main ()
11437{
11438
11439 makedev(major(0),minor(0));
11440
11441 ;
11442 return 0;
11443}
11444_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011445if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011446
11447
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011448$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011449
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11451$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011452
11453else
Skip Montanaro6dead952003-09-25 14:50:04 +000011454
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11456$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011457
11458fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011459rm -f core conftest.err conftest.$ac_objext \
11460 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011461
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011462# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000011463# for [no]getaddrinfo in netdb.h.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
11465$as_echo_n "checking for getaddrinfo... " >&6; }
11466cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011467/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011468
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011469#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011470#include <sys/socket.h>
11471#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011472#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011473
Martin v. Löwis11437992002-04-12 09:54:03 +000011474int
11475main ()
11476{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011477getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000011478 ;
11479 return 0;
11480}
11481_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011482if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011483 have_getaddrinfo=yes
11484else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011485 have_getaddrinfo=no
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011486fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011487rm -f core conftest.err conftest.$ac_objext \
11488 conftest$ac_exeext conftest.$ac_ext
11489{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
11490$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011491if test $have_getaddrinfo = yes
11492then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011493 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
11494$as_echo_n "checking getaddrinfo bug... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011495 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011496 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011497else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011498 if test "$cross_compiling" = yes; then :
doko@python.orgd65e2ba2013-01-31 23:52:03 +010011499
11500if test "${enable_ipv6+set}" = set; then
11501 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
11502else
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011503 ac_cv_buggy_getaddrinfo=yes
doko@python.orgd65e2ba2013-01-31 23:52:03 +010011504fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011505else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011506 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011507/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011508
Stefan Krah0afe4e42012-11-22 23:56:51 +010011509#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011510#include <sys/types.h>
11511#include <netdb.h>
11512#include <string.h>
11513#include <sys/socket.h>
11514#include <netinet/in.h>
11515
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011516int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011517{
11518 int passive, gaierr, inet4 = 0, inet6 = 0;
11519 struct addrinfo hints, *ai, *aitop;
11520 char straddr[INET6_ADDRSTRLEN], strport[16];
11521
11522 for (passive = 0; passive <= 1; passive++) {
11523 memset(&hints, 0, sizeof(hints));
11524 hints.ai_family = AF_UNSPEC;
11525 hints.ai_flags = passive ? AI_PASSIVE : 0;
11526 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000011527 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011528 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
11529 (void)gai_strerror(gaierr);
11530 goto bad;
11531 }
11532 for (ai = aitop; ai; ai = ai->ai_next) {
11533 if (ai->ai_addr == NULL ||
11534 ai->ai_addrlen == 0 ||
11535 getnameinfo(ai->ai_addr, ai->ai_addrlen,
11536 straddr, sizeof(straddr), strport, sizeof(strport),
11537 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
11538 goto bad;
11539 }
11540 switch (ai->ai_family) {
11541 case AF_INET:
11542 if (strcmp(strport, "54321") != 0) {
11543 goto bad;
11544 }
11545 if (passive) {
11546 if (strcmp(straddr, "0.0.0.0") != 0) {
11547 goto bad;
11548 }
11549 } else {
11550 if (strcmp(straddr, "127.0.0.1") != 0) {
11551 goto bad;
11552 }
11553 }
11554 inet4++;
11555 break;
11556 case AF_INET6:
11557 if (strcmp(strport, "54321") != 0) {
11558 goto bad;
11559 }
11560 if (passive) {
11561 if (strcmp(straddr, "::") != 0) {
11562 goto bad;
11563 }
11564 } else {
11565 if (strcmp(straddr, "::1") != 0) {
11566 goto bad;
11567 }
11568 }
11569 inet6++;
11570 break;
11571 case AF_UNSPEC:
11572 goto bad;
11573 break;
11574 default:
11575 /* another family support? */
11576 break;
11577 }
11578 }
11579 }
11580
11581 if (!(inet4 == 0 || inet4 == 2))
11582 goto bad;
11583 if (!(inet6 == 0 || inet6 == 2))
11584 goto bad;
11585
11586 if (aitop)
11587 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011588 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011589
11590 bad:
11591 if (aitop)
11592 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011593 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011594}
11595
Martin v. Löwis11437992002-04-12 09:54:03 +000011596_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011597if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011598 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011599else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011600 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011601fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011602rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11603 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011604fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011605
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011606fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011607
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011608fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011609
Benjamin Peterson75fed812010-11-01 01:47:19 +000011610{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
11611$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
11612
Mark Dickinson0ef0b912009-12-31 21:11:48 +000011613if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011614then
11615 if test $ipv6 = yes
11616 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011617 echo 'Fatal: You must get working getaddrinfo() function.'
11618 echo ' or you can specify "--disable-ipv6"'.
11619 exit 1
11620 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011621else
Martin v. Löwis11437992002-04-12 09:54:03 +000011622
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011623$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011624
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011625fi
Benjamin Peterson75fed812010-11-01 01:47:19 +000011626
Jack Jansen9a66b6d2001-08-08 13:56:14 +000011627for ac_func in getnameinfo
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011628do :
11629 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011630if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011631 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011632#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011633_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011634
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011635fi
11636done
11637
Michael W. Hudson54241132001-12-07 15:38:26 +000011638
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011639# checks for structures
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
11641$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011642if ${ac_cv_header_time+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011643 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011644else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011645 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011646/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011647#include <sys/types.h>
11648#include <sys/time.h>
11649#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011650
Martin v. Löwis11437992002-04-12 09:54:03 +000011651int
11652main ()
11653{
11654if ((struct tm *) 0)
11655return 0;
11656 ;
11657 return 0;
11658}
11659_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011660if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011661 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011662else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011663 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011664fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011665rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011666fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011667{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
11668$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011669if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011670
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011671$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011672
11673fi
11674
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
11676$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011677if ${ac_cv_struct_tm+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011678 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011679else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011680 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011681/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011682#include <sys/types.h>
11683#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011684
Martin v. Löwis11437992002-04-12 09:54:03 +000011685int
11686main ()
11687{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011688struct tm tm;
11689 int *p = &tm.tm_sec;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011690 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000011691 ;
11692 return 0;
11693}
11694_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011695if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011696 ac_cv_struct_tm=time.h
11697else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011698 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011699fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011700rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011701fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011702{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
11703$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011704if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011705
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011706$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011707
11708fi
11709
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011710ac_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 +000011711#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000011712
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011713"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011714if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011715
11716cat >>confdefs.h <<_ACEOF
11717#define HAVE_STRUCT_TM_TM_ZONE 1
11718_ACEOF
11719
11720
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011721fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011722
Martin v. Löwis11437992002-04-12 09:54:03 +000011723if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
11724
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011725$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011726
11727else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011728 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
11729"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011730if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011731 ac_have_decl=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000011732else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011733 ac_have_decl=0
Martin v. Löwiseba40652007-08-30 20:10:57 +000011734fi
11735
Martin v. Löwiseba40652007-08-30 20:10:57 +000011736cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011737#define HAVE_DECL_TZNAME $ac_have_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +000011738_ACEOF
11739
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011740 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
11741$as_echo_n "checking for tzname... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011742if ${ac_cv_var_tzname+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011743 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000011744else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011745 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011746/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011747#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000011748#if !HAVE_DECL_TZNAME
11749extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000011750#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011751
Martin v. Löwis11437992002-04-12 09:54:03 +000011752int
11753main ()
11754{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011755return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000011756 ;
11757 return 0;
11758}
11759_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011760if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011761 ac_cv_var_tzname=yes
11762else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011763 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011764fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011765rm -f core conftest.err conftest.$ac_objext \
11766 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000011767fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011768{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
11769$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011770 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011771
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011772$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011773
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011774 fi
11775fi
11776
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011777ac_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 +010011778if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011779
11780cat >>confdefs.h <<_ACEOF
11781#define HAVE_STRUCT_STAT_ST_RDEV 1
11782_ACEOF
11783
11784
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011785fi
11786
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011787ac_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 +010011788if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011789
Martin v. Löwis11437992002-04-12 09:54:03 +000011790cat >>confdefs.h <<_ACEOF
11791#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
11792_ACEOF
11793
11794
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011795fi
11796
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011797ac_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 +010011798if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000011799
11800cat >>confdefs.h <<_ACEOF
11801#define HAVE_STRUCT_STAT_ST_FLAGS 1
11802_ACEOF
11803
11804
11805fi
11806
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011807ac_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 +010011808if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011809
11810cat >>confdefs.h <<_ACEOF
11811#define HAVE_STRUCT_STAT_ST_GEN 1
11812_ACEOF
11813
11814
11815fi
11816
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011817ac_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 +010011818if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011819
11820cat >>confdefs.h <<_ACEOF
11821#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
11822_ACEOF
11823
11824
11825fi
11826
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011827ac_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 +010011828if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011829
Martin v. Löwis11437992002-04-12 09:54:03 +000011830cat >>confdefs.h <<_ACEOF
11831#define HAVE_STRUCT_STAT_ST_BLOCKS 1
11832_ACEOF
11833
11834
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011835$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011836
11837else
Martin v. Löwiseba40652007-08-30 20:10:57 +000011838 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000011839 *" fileblocks.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011840 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
11841 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011842esac
11843
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011844fi
11845
Michael W. Hudson54241132001-12-07 15:38:26 +000011846
Martin v. Löwis11437992002-04-12 09:54:03 +000011847
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
11849$as_echo_n "checking for time.h that defines altzone... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011850if ${ac_cv_header_time_altzone+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011851 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011852else
Matthias Klosec511b472010-05-08 11:01:39 +000011853
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011854 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011855/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011856#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011857int
11858main ()
11859{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011860return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000011861 ;
11862 return 0;
11863}
11864_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011865if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011866 ac_cv_header_time_altzone=yes
11867else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011868 ac_cv_header_time_altzone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011869fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011870rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosec511b472010-05-08 11:01:39 +000011871
Martin v. Löwiseba40652007-08-30 20:10:57 +000011872fi
11873
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011874{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
11875$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011876if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011877
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011878$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011879
11880fi
11881
Guido van Rossumda88dad1995-01-26 00:46:29 +000011882was_it_defined=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
11884$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
11885cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011886/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011887
11888#include <sys/types.h>
11889#include <sys/select.h>
11890#include <sys/time.h>
11891
Martin v. Löwis11437992002-04-12 09:54:03 +000011892int
11893main ()
11894{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011895;
Martin v. Löwis11437992002-04-12 09:54:03 +000011896 ;
11897 return 0;
11898}
11899_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011900if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011901
11902
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011903$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011904
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011905 was_it_defined=yes
11906
Martin v. Löwiseba40652007-08-30 20:10:57 +000011907fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011908rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011909{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
11910$as_echo "$was_it_defined" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011911
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
11913$as_echo_n "checking for addrinfo... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011914if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011915 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011916else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011917 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011918/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +000011919#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011920int
11921main ()
11922{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011923struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000011924 ;
11925 return 0;
11926}
11927_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011928if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011929 ac_cv_struct_addrinfo=yes
11930else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011931 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011932fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011933rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11934fi
11935
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011936{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
11937$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011938if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011939
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011940$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011941
11942fi
11943
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
11945$as_echo_n "checking for sockaddr_storage... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011946if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011947 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011948else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011949 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011950/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011951
11952# include <sys/types.h>
11953# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011954int
11955main ()
11956{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011957struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000011958 ;
11959 return 0;
11960}
11961_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011962if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011963 ac_cv_struct_sockaddr_storage=yes
11964else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011965 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011966fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011967rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11968fi
11969
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011970{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
11971$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011972if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011973
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011974$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011975
11976fi
11977
Guido van Rossum627b2d71993-12-24 10:39:16 +000011978# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000011979
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
11981$as_echo_n "checking whether char is unsigned... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011982if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011983 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000011984else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011985 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011986/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011987$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000011988int
11989main ()
11990{
11991static int test_array [1 - 2 * !(((char) -1) < 0)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +010011992test_array [0] = 0;
11993return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000011994
11995 ;
11996 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000011997}
Martin v. Löwis11437992002-04-12 09:54:03 +000011998_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011999if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012000 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012001else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012002 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012003fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012004rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012005fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012006{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
12007$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012008if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012009 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012010
12011fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000012012
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12014$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012015if ${ac_cv_c_const+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012016 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012017else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012018 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012019/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012020
Martin v. Löwis11437992002-04-12 09:54:03 +000012021int
12022main ()
12023{
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012024
Martin v. Löwis11437992002-04-12 09:54:03 +000012025#ifndef __cplusplus
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012026 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012027 typedef int charset[2];
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012028 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000012029 /* SunOS 4.1.1 cc rejects this. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000012030 char const *const *pcpcc;
12031 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000012032 /* NEC SVR4.0.2 mips cc rejects this. */
12033 struct point {int x, y;};
12034 static struct point const zero = {0,0};
12035 /* AIX XL C 1.02.0.0 rejects this.
12036 It does not let you subtract one const X* pointer from another in
12037 an arm of an if-expression whose if-part is not a constant
12038 expression */
12039 const char *g = "string";
Martin v. Löwiseba40652007-08-30 20:10:57 +000012040 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012041 /* HPUX 7.0 cc rejects these. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000012042 ++pcpcc;
12043 ppc = (char**) pcpcc;
12044 pcpcc = (char const *const *) ppc;
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012045 { /* SCO 3.2v4 cc rejects this sort of thing. */
12046 char tx;
12047 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000012048 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012049
Martin v. Löwis11437992002-04-12 09:54:03 +000012050 *t++ = 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012051 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012052 }
12053 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12054 int x[] = {25, 17};
12055 const int *foo = &x[0];
12056 ++foo;
12057 }
12058 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12059 typedef const int *iptr;
12060 iptr p = 0;
12061 ++p;
12062 }
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012063 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000012064 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012065 struct s { int j; const int *ap[3]; } bx;
12066 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000012067 }
12068 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12069 const int foo = 10;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012070 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012071 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012072 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000012073#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000012074
Martin v. Löwis11437992002-04-12 09:54:03 +000012075 ;
12076 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012077}
Martin v. Löwis11437992002-04-12 09:54:03 +000012078_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012079if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012080 ac_cv_c_const=yes
12081else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012082 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012083fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012084rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012085fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012086{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12087$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012088if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012089
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012090$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012091
12092fi
12093
Michael W. Hudson54241132001-12-07 15:38:26 +000012094
Guido van Rossumda88dad1995-01-26 00:46:29 +000012095works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
12097$as_echo_n "checking for working volatile... " >&6; }
12098cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012099/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012100
Martin v. Löwis11437992002-04-12 09:54:03 +000012101int
12102main ()
12103{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012104volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012105 ;
12106 return 0;
12107}
12108_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012109if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012110 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012111else
Skip Montanaro6dead952003-09-25 14:50:04 +000012112
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012113$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012114
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012115
Guido van Rossum627b2d71993-12-24 10:39:16 +000012116fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012117rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012118{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12119$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012120
Guido van Rossumda88dad1995-01-26 00:46:29 +000012121works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
12123$as_echo_n "checking for working signed char... " >&6; }
12124cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012125/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012126
Martin v. Löwis11437992002-04-12 09:54:03 +000012127int
12128main ()
12129{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012130signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000012131 ;
12132 return 0;
12133}
12134_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012135if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012136 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012137else
Skip Montanaro6dead952003-09-25 14:50:04 +000012138
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012139$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000012140
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012141
Guido van Rossum7f43da71994-08-01 12:15:30 +000012142fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012143rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012144{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12145$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012146
Guido van Rossumda88dad1995-01-26 00:46:29 +000012147have_prototypes=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
12149$as_echo_n "checking for prototypes... " >&6; }
12150cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012151/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012152int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012153int
12154main ()
12155{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012156return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000012157 ;
12158 return 0;
12159}
12160_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012161if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012162
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012163$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012164
Matthias Klosec511b472010-05-08 11:01:39 +000012165 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012166fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012167rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012168{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
12169$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012170
Guido van Rossumda88dad1995-01-26 00:46:29 +000012171works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
12173$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
12174cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012175/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012176
12177#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000012178int foo(int x, ...) {
12179 va_list va;
12180 va_start(va, x);
12181 va_arg(va, int);
12182 va_arg(va, char *);
12183 va_arg(va, double);
12184 return 0;
12185}
Guido van Rossum7f43da71994-08-01 12:15:30 +000012186
Martin v. Löwis11437992002-04-12 09:54:03 +000012187int
12188main ()
12189{
Guido van Rossum90eea071996-08-30 20:58:57 +000012190return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000012191 ;
12192 return 0;
12193}
12194_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012195if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012196
12197
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012198$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012199
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012200 works=yes
12201
Guido van Rossum627b2d71993-12-24 10:39:16 +000012202fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012203rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012204{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12205$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012206
Martin v. Löwisd6320502004-08-12 13:45:08 +000012207# check for socketpair
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
12209$as_echo_n "checking for socketpair... " >&6; }
12210cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012211/* end confdefs.h. */
12212
12213#include <sys/types.h>
12214#include <sys/socket.h>
12215
12216int
12217main ()
12218{
12219void *x=socketpair
12220 ;
12221 return 0;
12222}
12223_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012224if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000012225
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012226$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000012227
Matthias Klosec511b472010-05-08 11:01:39 +000012228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012229$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012230else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12232$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012233
12234fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012235rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012236
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012237# check if sockaddr has sa_len member
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012238{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
12239$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
12240cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012241/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012242#include <sys/types.h>
12243#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012244int
12245main ()
12246{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012247struct sockaddr x;
12248x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012249 ;
12250 return 0;
12251}
12252_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012253if ac_fn_c_try_compile "$LINENO"; then :
12254 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12255$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012256
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012257$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012258
12259else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012260 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12261$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000012262
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012263fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012264rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012265
Guido van Rossumda88dad1995-01-26 00:46:29 +000012266va_list_is_array=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
12268$as_echo_n "checking whether va_list is an array... " >&6; }
12269cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012270/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012271
12272#ifdef HAVE_STDARG_PROTOTYPES
12273#include <stdarg.h>
12274#else
12275#include <varargs.h>
12276#endif
12277
Martin v. Löwis11437992002-04-12 09:54:03 +000012278int
12279main ()
12280{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012281va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000012282 ;
12283 return 0;
12284}
12285_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012286if ac_fn_c_try_compile "$LINENO"; then :
12287
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012288else
Skip Montanaro6dead952003-09-25 14:50:04 +000012289
Martin v. Löwis11437992002-04-12 09:54:03 +000012290
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012291$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012292
Guido van Rossumda88dad1995-01-26 00:46:29 +000012293 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012294
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012295fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012296rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012297{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
12298$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012299
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012300# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000012301
12302
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012303ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012304if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012305
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012306 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000012307
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012308 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
12309$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012310 OLD_CFLAGS=$CFLAGS
12311 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012312 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012313/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012314
12315# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012316
Martin v. Löwis11437992002-04-12 09:54:03 +000012317int
12318main ()
12319{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012320
12321 char *name;
12322 struct hostent *he, *res;
12323 char buffer[2048];
12324 int buflen = 2048;
12325 int h_errnop;
12326
12327 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012328
12329 ;
12330 return 0;
12331}
12332_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012333if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012334
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012335 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012336
Martin v. Löwis11437992002-04-12 09:54:03 +000012337
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012338$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012339
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12341$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012342
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012343else
Skip Montanaro6dead952003-09-25 14:50:04 +000012344
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12346$as_echo "no" >&6; }
12347 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
12348$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
12349 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012350/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012351
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012352# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012353
Martin v. Löwis11437992002-04-12 09:54:03 +000012354int
12355main ()
12356{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012357
12358 char *name;
12359 struct hostent *he;
Matthias Klosec511b472010-05-08 11:01:39 +000012360 char buffer[2048];
12361 int buflen = 2048;
12362 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012363
Matthias Klosec511b472010-05-08 11:01:39 +000012364 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012365
12366 ;
12367 return 0;
12368}
12369_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012370if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012371
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012372 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012373
Martin v. Löwis11437992002-04-12 09:54:03 +000012374
Matthias Klosec511b472010-05-08 11:01:39 +000012375$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012376
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12378$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012379
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012380else
Skip Montanaro6dead952003-09-25 14:50:04 +000012381
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12383$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000012384 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
12385$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
12386 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12387/* end confdefs.h. */
12388
12389# include <netdb.h>
12390
12391int
12392main ()
12393{
12394
12395 char *name;
12396 struct hostent *he;
12397 struct hostent_data data;
12398
12399 (void) gethostbyname_r(name, he, &data);
12400
12401 ;
12402 return 0;
12403}
12404_ACEOF
12405if ac_fn_c_try_compile "$LINENO"; then :
12406
12407 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
12408
12409
12410$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
12411
12412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12413$as_echo "yes" >&6; }
12414
12415else
12416
12417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12418$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012419
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012420fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012421rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012422
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012423fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012424rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012425
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012426fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012427rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012428 CFLAGS=$OLD_CFLAGS
12429
12430else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012431
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012432 for ac_func in gethostbyname
12433do :
12434 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012435if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012436 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012437#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012438_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012439
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012440fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012441done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012442
Michael W. Hudson54241132001-12-07 15:38:26 +000012443
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012444fi
12445
Michael W. Hudson54241132001-12-07 15:38:26 +000012446
12447
12448
12449
12450
12451
Guido van Rossum627b2d71993-12-24 10:39:16 +000012452# checks for system services
12453# (none yet)
12454
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012455# Linux requires this for correct f.p. operations
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012456ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012457if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012458
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012459else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012460 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
12461$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012462if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012463 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012464else
Martin v. Löwis11437992002-04-12 09:54:03 +000012465 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012466LIBS="-lieee $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012467cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012468/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012469
Martin v. Löwiseba40652007-08-30 20:10:57 +000012470/* Override any GCC internal prototype to avoid an error.
12471 Use char because int might match the return type of a GCC
12472 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012473#ifdef __cplusplus
12474extern "C"
12475#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012476char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012477int
12478main ()
12479{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012480return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012481 ;
12482 return 0;
12483}
12484_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012485if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012486 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012487else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012488 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012489fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012490rm -f core conftest.err conftest.$ac_objext \
12491 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012492LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012493fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012494{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
12495$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012496if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012497 cat >>confdefs.h <<_ACEOF
12498#define HAVE_LIBIEEE 1
12499_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012500
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012501 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012502
Guido van Rossum627b2d71993-12-24 10:39:16 +000012503fi
12504
Michael W. Hudson54241132001-12-07 15:38:26 +000012505
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012506fi
12507
Michael W. Hudson54241132001-12-07 15:38:26 +000012508
Guido van Rossum7f253911997-05-09 02:42:48 +000012509# Check for --with-fpectl
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
12511$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012512
Martin v. Löwiseba40652007-08-30 20:10:57 +000012513# Check whether --with-fpectl was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012514if test "${with_fpectl+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000012515 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000012516if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000012517then
12518
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012519$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012520
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12522$as_echo "yes" >&6; }
12523else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12524$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012525fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000012526else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012527 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12528$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012529fi
12530
Guido van Rossum7f253911997-05-09 02:42:48 +000012531
Guido van Rossum7f43da71994-08-01 12:15:30 +000012532# check for --with-libm=...
12533
Guido van Rossum563e7081996-09-10 18:20:48 +000012534case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000012535Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012536BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000012537*) LIBM=-lm
12538esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
12540$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012541
Martin v. Löwiseba40652007-08-30 20:10:57 +000012542# Check whether --with-libm was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012543if test "${with_libm+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000012544 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000012545if test "$withval" = no
12546then LIBM=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
12548$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012549elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012550then LIBM=$withval
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
12552$as_echo "set LIBM=\"$withval\"" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012553else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012554fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012555else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
12557$as_echo "default LIBM=\"$LIBM\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012558fi
12559
Guido van Rossum7f43da71994-08-01 12:15:30 +000012560
12561# check for --with-libc=...
12562
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
12564$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012565
Martin v. Löwiseba40652007-08-30 20:10:57 +000012566# Check whether --with-libc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012567if test "${with_libc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000012568 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000012569if test "$withval" = no
12570then LIBC=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
12572$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012573elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012574then LIBC=$withval
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
12576$as_echo "set LIBC=\"$withval\"" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012577else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012578fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012579else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012580 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
12581$as_echo "default LIBC=\"$LIBC\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012582fi
12583
Guido van Rossum7f43da71994-08-01 12:15:30 +000012584
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012585# **************************************************
12586# * Check for various properties of floating point *
12587# **************************************************
Mark Dickinson265d7382008-04-21 22:32:24 +000012588
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
12590$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012591if ${ac_cv_little_endian_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012592 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012593else
12594
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012595if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012596 ac_cv_little_endian_double=no
12597else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012598 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012599/* end confdefs.h. */
12600
12601#include <string.h>
12602int main() {
12603 double x = 9006104071832581.0;
12604 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
12605 return 0;
12606 else
12607 return 1;
12608}
12609
12610_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012611if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012612 ac_cv_little_endian_double=yes
12613else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012614 ac_cv_little_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012615fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012616rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12617 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012618fi
12619
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012620fi
12621
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012622{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
12623$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012624if test "$ac_cv_little_endian_double" = yes
12625then
12626
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012627$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012628
12629fi
12630
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
12632$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012633if ${ac_cv_big_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_big_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, "\x43\x3f\xff\x01\x02\x03\x04\x05", 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_big_endian_double=yes
12655else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012656 ac_cv_big_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_big_endian_double" >&5
12665$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012666if test "$ac_cv_big_endian_double" = yes
12667then
12668
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012669$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012670
12671fi
12672
12673# Some ARM platforms use a mixed-endian representation for doubles.
12674# While Python doesn't currently have full support for these platforms
12675# (see e.g., issue 1762561), we can at least make sure that float <-> string
12676# conversions work.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
12678$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012679if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012680 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012681else
12682
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012683if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012684 ac_cv_mixed_endian_double=no
12685else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012686 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012687/* end confdefs.h. */
12688
12689#include <string.h>
12690int main() {
12691 double x = 9006104071832581.0;
12692 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
12693 return 0;
12694 else
12695 return 1;
12696}
12697
12698_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012699if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012700 ac_cv_mixed_endian_double=yes
12701else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012702 ac_cv_mixed_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012703fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012704rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12705 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012706fi
12707
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012708fi
12709
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012710{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
12711$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012712if test "$ac_cv_mixed_endian_double" = yes
12713then
12714
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012715$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012716
12717fi
12718
12719# The short float repr introduced in Python 3.1 requires the
12720# correctly-rounded string <-> double conversion functions from
12721# Python/dtoa.c, which in turn require that the FPU uses 53-bit
12722# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsona548dee2009-11-15 13:12:43 +000012723# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012724# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsona548dee2009-11-15 13:12:43 +000012725
12726# This inline assembler syntax may also work for suncc and icc,
12727# so we try it on all platforms.
12728
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
12730$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
12731cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012732/* end confdefs.h. */
12733
12734int
12735main ()
12736{
12737
Mark Dickinsona548dee2009-11-15 13:12:43 +000012738 unsigned short cw;
12739 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
12740 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012741
12742 ;
12743 return 0;
12744}
12745_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012746if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012747 have_gcc_asm_for_x87=yes
12748else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012749 have_gcc_asm_for_x87=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012750fi
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012751rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012752{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
12753$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsona548dee2009-11-15 13:12:43 +000012754if test "$have_gcc_asm_for_x87" = yes
12755then
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012756
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012757$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012758
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012759fi
Mark Dickinson7a3d8642008-04-22 00:54:27 +000012760
Mark Dickinson04b27232009-01-04 12:29:36 +000012761# Detect whether system arithmetic is subject to x87-style double
12762# rounding issues. The result of this test has little meaning on non
12763# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
12764# mode is round-to-nearest and double rounding issues are present, and
12765# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
12767$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinson99abd142009-10-24 13:44:16 +000012768# $BASECFLAGS may affect the result
12769ac_save_cc="$CC"
12770CC="$CC $BASECFLAGS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012771if test "$cross_compiling" = yes; then :
Mark Dickinson04b27232009-01-04 12:29:36 +000012772 ac_cv_x87_double_rounding=no
12773else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012774 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson04b27232009-01-04 12:29:36 +000012775/* end confdefs.h. */
12776
12777#include <stdlib.h>
12778#include <math.h>
12779int main() {
12780 volatile double x, y, z;
12781 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
12782 x = 0.99999999999999989; /* 1-2**-53 */
12783 y = 1./x;
12784 if (y != 1.)
12785 exit(0);
12786 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
12787 x = 1e16;
12788 y = 2.99999;
12789 z = x + y;
12790 if (z != 1e16+4.)
12791 exit(0);
12792 /* both tests show evidence of double rounding */
12793 exit(1);
12794}
12795
12796_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012797if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson04b27232009-01-04 12:29:36 +000012798 ac_cv_x87_double_rounding=no
12799else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012800 ac_cv_x87_double_rounding=yes
Mark Dickinson04b27232009-01-04 12:29:36 +000012801fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012802rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12803 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson04b27232009-01-04 12:29:36 +000012804fi
12805
Mark Dickinson99abd142009-10-24 13:44:16 +000012806CC="$ac_save_cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012807{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
12808$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson04b27232009-01-04 12:29:36 +000012809if test "$ac_cv_x87_double_rounding" = yes
12810then
12811
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012812$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson04b27232009-01-04 12:29:36 +000012813
12814fi
12815
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012816# ************************************
12817# * Check for mathematical functions *
12818# ************************************
12819
12820LIBS_SAVE=$LIBS
12821LIBS="$LIBS $LIBM"
12822
Mark Dickinson265d7382008-04-21 22:32:24 +000012823# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
12824# -0. on some architectures.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
12826$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012827if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012828 $as_echo_n "(cached) " >&6
Mark Dickinson265d7382008-04-21 22:32:24 +000012829else
12830
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012831if test "$cross_compiling" = yes; then :
Mark Dickinson265d7382008-04-21 22:32:24 +000012832 ac_cv_tanh_preserves_zero_sign=no
12833else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson265d7382008-04-21 22:32:24 +000012835/* end confdefs.h. */
12836
12837#include <math.h>
Mark Dickinson7a3d8642008-04-22 00:54:27 +000012838#include <stdlib.h>
Mark Dickinson265d7382008-04-21 22:32:24 +000012839int main() {
12840 /* return 0 if either negative zeros don't exist
12841 on this platform or if negative zeros exist
12842 and tanh(-0.) == -0. */
12843 if (atan2(0., -1.) == atan2(-0., -1.) ||
12844 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
12845 else exit(1);
12846}
12847
12848_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012849if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson265d7382008-04-21 22:32:24 +000012850 ac_cv_tanh_preserves_zero_sign=yes
12851else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012852 ac_cv_tanh_preserves_zero_sign=no
Mark Dickinson265d7382008-04-21 22:32:24 +000012853fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012854rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12855 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson265d7382008-04-21 22:32:24 +000012856fi
12857
Mark Dickinson265d7382008-04-21 22:32:24 +000012858fi
12859
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012860{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
12861$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Mark Dickinson265d7382008-04-21 22:32:24 +000012862if test "$ac_cv_tanh_preserves_zero_sign" = yes
12863then
12864
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012865$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Mark Dickinson265d7382008-04-21 22:32:24 +000012866
12867fi
12868
Mark Dickinson65898e02009-09-05 10:27:00 +000012869for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012870do :
12871 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12872ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012873if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinson65898e02009-09-05 10:27:00 +000012874 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012875#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Mark Dickinson65898e02009-09-05 10:27:00 +000012876_ACEOF
12877
12878fi
12879done
12880
Mark Dickinson65898e02009-09-05 10:27:00 +000012881for ac_func in hypot lgamma log1p round tgamma
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012882do :
12883 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12884ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012885if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Christian Heimes0a8143f2007-12-18 23:22:54 +000012886 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012887#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes0a8143f2007-12-18 23:22:54 +000012888_ACEOF
12889
12890fi
12891done
12892
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012893ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
12894"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012895if test "x$ac_cv_have_decl_isinf" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012896 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012897else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012898 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012899fi
12900
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012901cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012902#define HAVE_DECL_ISINF $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012903_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012904ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
12905"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012906if test "x$ac_cv_have_decl_isnan" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012907 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012908else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012909 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012910fi
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012911
12912cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012913#define HAVE_DECL_ISNAN $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012914_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012915ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
12916"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012917if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012918 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012919else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012920 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012921fi
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012922
12923cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012924#define HAVE_DECL_ISFINITE $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012925_ACEOF
12926
12927
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000012928LIBS=$LIBS_SAVE
12929
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012930# For multiprocessing module, check that sem_open
12931# actually works. For FreeBSD versions <= 7.2,
12932# the kernel module that provides POSIX semaphores
12933# isn't loaded by default, so an attempt to call
12934# sem_open results in a 'Signal 12' error.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
12936$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012937if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012938 $as_echo_n "(cached) " >&6
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012939else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012940 if test "$cross_compiling" = yes; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012941 ac_cv_posix_semaphores_enabled=yes
12942else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012943 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012944/* end confdefs.h. */
12945
12946#include <unistd.h>
12947#include <fcntl.h>
12948#include <stdio.h>
12949#include <semaphore.h>
12950#include <sys/stat.h>
12951
12952int main(void) {
12953 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
12954 if (a == SEM_FAILED) {
12955 perror("sem_open");
12956 return 1;
12957 }
12958 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000012959 sem_unlink("/autoconf");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012960 return 0;
12961}
12962
12963_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012964if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012965 ac_cv_posix_semaphores_enabled=yes
12966else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012967 ac_cv_posix_semaphores_enabled=no
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012968fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012969rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12970 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012971fi
12972
12973
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012974fi
12975
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012976{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
12977$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012978if test $ac_cv_posix_semaphores_enabled = no
12979then
12980
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012981$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012982
12983fi
12984
12985# Multiprocessing check for broken sem_getvalue
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
12987$as_echo_n "checking for broken sem_getvalue... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012988if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012989 $as_echo_n "(cached) " >&6
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012990else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012991 if test "$cross_compiling" = yes; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012992 ac_cv_broken_sem_getvalue=yes
12993else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012994 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012995/* end confdefs.h. */
12996
12997#include <unistd.h>
12998#include <fcntl.h>
12999#include <stdio.h>
13000#include <semaphore.h>
13001#include <sys/stat.h>
13002
13003int main(void){
Mark Dickinson59dc89e2009-12-13 21:06:06 +000013004 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013005 int count;
13006 int res;
13007 if(a==SEM_FAILED){
13008 perror("sem_open");
13009 return 1;
13010
13011 }
13012 res = sem_getvalue(a, &count);
13013 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000013014 sem_unlink("/autocftw");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013015 return res==-1 ? 1 : 0;
13016}
13017
13018_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013019if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013020 ac_cv_broken_sem_getvalue=no
13021else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013022 ac_cv_broken_sem_getvalue=yes
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013023fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013024rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13025 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013026fi
13027
13028
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013029fi
13030
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013031{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
13032$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013033if test $ac_cv_broken_sem_getvalue = yes
13034then
13035
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013036$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013037
13038fi
13039
Mark Dickinsonefc82f72009-03-20 15:51:55 +000013040# determine what size digit to use for Python's longs
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
13042$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000013043# Check whether --enable-big-digits was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013044if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonefc82f72009-03-20 15:51:55 +000013045 enableval=$enable_big_digits; case $enable_big_digits in
13046yes)
13047 enable_big_digits=30 ;;
13048no)
13049 enable_big_digits=15 ;;
1305015|30)
13051 ;;
13052*)
Matthias Klose3cef2a92012-03-14 23:39:33 +010013053 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 +000013054esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013055{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
13056$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000013057
13058cat >>confdefs.h <<_ACEOF
13059#define PYLONG_BITS_IN_DIGIT $enable_big_digits
13060_ACEOF
13061
13062
13063else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13065$as_echo "no value specified" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000013066fi
13067
13068
Guido van Rossumef2255b2000-03-10 22:30:29 +000013069# check for wchar.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013070ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +010013071if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013072
13073
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013074$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013075
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013076 wchar_h="yes"
13077
Guido van Rossumef2255b2000-03-10 22:30:29 +000013078else
Martin v. Löwis11437992002-04-12 09:54:03 +000013079 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000013080
13081fi
13082
Michael W. Hudson54241132001-12-07 15:38:26 +000013083
Martin v. Löwis11437992002-04-12 09:54:03 +000013084
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013085# determine wchar_t size
13086if test "$wchar_h" = yes
13087then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013088 # The cast to long int works around a bug in the HP C Compiler
Martin v. Löwiseba40652007-08-30 20:10:57 +000013089# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13090# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13091# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
13093$as_echo_n "checking size of wchar_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013094if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013095 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013096else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013097 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
13098"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013099
Martin v. Löwis11437992002-04-12 09:54:03 +000013100else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013101 if test "$ac_cv_type_wchar_t" = yes; then
13102 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13103$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013104as_fn_error 77 "cannot compute sizeof (wchar_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +010013105See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013106 else
13107 ac_cv_sizeof_wchar_t=0
13108 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013109fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013110
Martin v. Löwis11437992002-04-12 09:54:03 +000013111fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013112{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
13113$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013114
13115
13116
Martin v. Löwis11437992002-04-12 09:54:03 +000013117cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013118#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013119_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013120
Michael W. Hudson54241132001-12-07 15:38:26 +000013121
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013122fi
13123
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
13125$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013126have_ucs4_tcl=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013127cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013128/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013129
13130#include <tcl.h>
13131#if TCL_UTF_MAX != 6
13132# error "NOT UCS4_TCL"
13133#endif
13134int
13135main ()
13136{
13137
13138 ;
13139 return 0;
13140}
13141_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013142if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013143
13144
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013145$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013146
13147 have_ucs4_tcl=yes
13148
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013149fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013150rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013151{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
13152$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013153
Skip Montanaro6dead952003-09-25 14:50:04 +000013154# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013155if test "$wchar_h" = yes
13156then
13157 # check whether wchar_t is signed or not
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013158 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
13159$as_echo_n "checking whether wchar_t is signed... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013160 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013161 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013162else
13163
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013164 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013165 ac_cv_wchar_t_signed=yes
13166else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013167 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013168/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013169
13170 #include <wchar.h>
13171 int main()
13172 {
Martin v. Löwis44fe0e42006-04-11 07:15:30 +000013173 /* Success: exit code 0 */
13174 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013175 }
13176
13177_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013178if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013179 ac_cv_wchar_t_signed=yes
13180else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013181 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013182fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013183rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13184 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013185fi
13186
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013187fi
13188
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013189 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
13190$as_echo "$ac_cv_wchar_t_signed" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013191fi
13192
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what type to use for unicode" >&5
13194$as_echo_n "checking what type to use for unicode... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013195# Check whether --enable-unicode was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013196if test "${enable_unicode+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000013197 enableval=$enable_unicode;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013198else
13199 enable_unicode=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +000013200fi
13201
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013202
13203if test $enable_unicode = yes
13204then
Martin v. Löwisfd917792001-06-27 20:22:04 +000013205 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013206 case "$have_ucs4_tcl" in
13207 yes) enable_unicode="ucs4"
13208 ;;
13209 *) enable_unicode="ucs2"
13210 ;;
13211 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013212fi
13213
Martin v. Löwis0036cba2002-04-12 09:58:45 +000013214
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013215case "$enable_unicode" in
13216ucs2) unicode_size="2"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013217 $as_echo "#define Py_UNICODE_SIZE 2" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013218
13219 ;;
13220ucs4) unicode_size="4"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013221 $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013222
13223 ;;
Martin v. Löwised11a5d2012-05-20 10:42:17 +020013224no) ;; # To allow --disable-unicode
Matthias Klose3cef2a92012-03-14 23:39:33 +010013225*) 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 +000013226esac
13227
Michael W. Hudson54241132001-12-07 15:38:26 +000013228
Martin v. Löwis11437992002-04-12 09:54:03 +000013229
13230
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013231if test "$enable_unicode" = "no"
13232then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000013233 UNICODE_OBJS=""
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013234 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not used" >&5
13235$as_echo "not used" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013236else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000013237 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000013238
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013239$as_echo "#define Py_USING_UNICODE 1" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013240
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013241
13242 # wchar_t is only usable if it maps to an unsigned type
13243 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000013244 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013245 then
13246 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013247
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013248$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013249
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013250 $as_echo "#define PY_UNICODE_TYPE wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013251
13252 elif test "$ac_cv_sizeof_short" = "$unicode_size"
13253 then
13254 PY_UNICODE_TYPE="unsigned short"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013255 $as_echo "#define PY_UNICODE_TYPE unsigned short" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013256
13257 elif test "$ac_cv_sizeof_long" = "$unicode_size"
13258 then
13259 PY_UNICODE_TYPE="unsigned long"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013260 $as_echo "#define PY_UNICODE_TYPE unsigned long" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013261
13262 else
13263 PY_UNICODE_TYPE="no type found"
13264 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013265 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PY_UNICODE_TYPE" >&5
13266$as_echo "$PY_UNICODE_TYPE" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013267fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000013268
13269# check for endianness
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013270 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13271$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013272if ${ac_cv_c_bigendian+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013273 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000013274else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013275 ac_cv_c_bigendian=unknown
13276 # See if we're dealing with a universal compiler.
13277 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13278/* end confdefs.h. */
13279#ifndef __APPLE_CC__
13280 not a universal capable compiler
13281 #endif
13282 typedef int dummy;
13283
Skip Montanaro6dead952003-09-25 14:50:04 +000013284_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013285if ac_fn_c_try_compile "$LINENO"; then :
13286
13287 # Check for potential -arch flags. It is not universal unless
13288 # there are at least two -arch flags with different values.
13289 ac_arch=
13290 ac_prev=
13291 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13292 if test -n "$ac_prev"; then
13293 case $ac_word in
13294 i?86 | x86_64 | ppc | ppc64)
13295 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13296 ac_arch=$ac_word
13297 else
13298 ac_cv_c_bigendian=universal
13299 break
13300 fi
13301 ;;
13302 esac
13303 ac_prev=
13304 elif test "x$ac_word" = "x-arch"; then
13305 ac_prev=arch
13306 fi
13307 done
13308fi
13309rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13310 if test $ac_cv_c_bigendian = unknown; then
13311 # See if sys/param.h defines the BYTE_ORDER macro.
13312 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013313/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013314#include <sys/types.h>
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013315 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013316
Martin v. Löwis11437992002-04-12 09:54:03 +000013317int
13318main ()
13319{
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013320#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13321 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13322 && LITTLE_ENDIAN)
13323 bogus endian macros
13324 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013325
13326 ;
13327 return 0;
13328}
13329_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013330if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013331 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013332 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013333/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013334#include <sys/types.h>
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013335 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013336
Martin v. Löwis11437992002-04-12 09:54:03 +000013337int
13338main ()
13339{
Guido van Rossumef2255b2000-03-10 22:30:29 +000013340#if BYTE_ORDER != BIG_ENDIAN
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013341 not big endian
13342 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013343
13344 ;
13345 return 0;
13346}
13347_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013348if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013349 ac_cv_c_bigendian=yes
13350else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013351 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000013352fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013353rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013354fi
13355rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13356 fi
13357 if test $ac_cv_c_bigendian = unknown; then
13358 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13359 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013360/* end confdefs.h. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013361#include <limits.h>
13362
Martin v. Löwis11437992002-04-12 09:54:03 +000013363int
13364main ()
13365{
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013366#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13367 bogus endian macros
13368 #endif
13369
Martin v. Löwis11437992002-04-12 09:54:03 +000013370 ;
13371 return 0;
13372}
13373_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013374if ac_fn_c_try_compile "$LINENO"; then :
13375 # It does; now see whether it defined to _BIG_ENDIAN or not.
13376 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13377/* end confdefs.h. */
13378#include <limits.h>
13379
13380int
13381main ()
13382{
13383#ifndef _BIG_ENDIAN
13384 not big endian
13385 #endif
13386
13387 ;
13388 return 0;
13389}
13390_ACEOF
13391if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013392 ac_cv_c_bigendian=yes
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000013393else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013394 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013395fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013396rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13397fi
13398rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13399 fi
13400 if test $ac_cv_c_bigendian = unknown; then
13401 # Compile a test program.
13402 if test "$cross_compiling" = yes; then :
13403 # Try to guess by grepping values from an object file.
13404 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13405/* end confdefs.h. */
13406short int ascii_mm[] =
13407 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13408 short int ascii_ii[] =
13409 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13410 int use_ascii (int i) {
13411 return ascii_mm[i] + ascii_ii[i];
13412 }
13413 short int ebcdic_ii[] =
13414 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13415 short int ebcdic_mm[] =
13416 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13417 int use_ebcdic (int i) {
13418 return ebcdic_mm[i] + ebcdic_ii[i];
13419 }
13420 extern int foo;
Martin v. Löwiseba40652007-08-30 20:10:57 +000013421
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013422int
13423main ()
13424{
13425return use_ascii (foo) == use_ebcdic (foo);
13426 ;
13427 return 0;
13428}
13429_ACEOF
13430if ac_fn_c_try_compile "$LINENO"; then :
13431 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
13432 ac_cv_c_bigendian=yes
13433 fi
13434 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
13435 if test "$ac_cv_c_bigendian" = unknown; then
13436 ac_cv_c_bigendian=no
13437 else
13438 # finding both strings is unlikely to happen, but who knows?
13439 ac_cv_c_bigendian=unknown
13440 fi
13441 fi
13442fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013443rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013444else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013445 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013446/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000013447$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013448int
13449main ()
13450{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013451
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013452 /* Are we little or big endian? From Harbison&Steele. */
13453 union
13454 {
13455 long int l;
13456 char c[sizeof (long int)];
13457 } u;
13458 u.l = 1;
13459 return u.c[sizeof (long int) - 1] == 1;
Martin v. Löwiseba40652007-08-30 20:10:57 +000013460
13461 ;
13462 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000013463}
Martin v. Löwis11437992002-04-12 09:54:03 +000013464_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013465if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013466 ac_cv_c_bigendian=no
13467else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013468 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000013469fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013470rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13471 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000013472fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013473
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013474 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013475fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013476{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
13477$as_echo "$ac_cv_c_bigendian" >&6; }
13478 case $ac_cv_c_bigendian in #(
13479 yes)
13480 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
13481;; #(
13482 no)
13483 ;; #(
13484 universal)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013485
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013486$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000013487
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013488 ;; #(
13489 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013490 as_fn_error $? "unknown endianness
Matthias Klose3cef2a92012-03-14 23:39:33 +010013491 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013492 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000013493
Michael W. Hudson54241132001-12-07 15:38:26 +000013494
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013495# Check whether right shifting a negative integer extends the sign bit
13496# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
13498$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013499if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013500 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000013501else
Martin v. Löwis11437992002-04-12 09:54:03 +000013502
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013503if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013504 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013505else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013506 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013507/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013508
13509int main()
13510{
Vladimir Marangozova6180282000-07-12 05:05:06 +000013511 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013512}
13513
Martin v. Löwis11437992002-04-12 09:54:03 +000013514_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013515if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000013516 ac_cv_rshift_extends_sign=yes
13517else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013518 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000013519fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013520rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13521 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000013522fi
13523
Martin v. Löwiseba40652007-08-30 20:10:57 +000013524fi
13525
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013526{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
13527$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000013528if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013529then
Martin v. Löwis11437992002-04-12 09:54:03 +000013530
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013531$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013532
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013533fi
13534
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013535# check for getc_unlocked and related locking functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
13537$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013538if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013539 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013540else
Martin v. Löwis11437992002-04-12 09:54:03 +000013541
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013542cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013543/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013544#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013545int
13546main ()
13547{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013548
13549 FILE *f = fopen("/dev/null", "r");
13550 flockfile(f);
13551 getc_unlocked(f);
13552 funlockfile(f);
13553
Martin v. Löwis11437992002-04-12 09:54:03 +000013554 ;
13555 return 0;
13556}
13557_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013558if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013559 ac_cv_have_getc_unlocked=yes
13560else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013561 ac_cv_have_getc_unlocked=no
13562fi
13563rm -f core conftest.err conftest.$ac_objext \
13564 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013565fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013566
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013567{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
13568$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013569if test "$ac_cv_have_getc_unlocked" = yes
13570then
Martin v. Löwis11437992002-04-12 09:54:03 +000013571
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013572$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013573
13574fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013575
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013576# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000013577# save the value of LIBS so we don't actually link Python with readline
13578LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013579
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013580# On some systems we need to link readline to a termcap compatible
13581# library. NOTE: Keep the precedence of listed libraries synchronised
13582# with setup.py.
13583py_cv_lib_readline=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
13585$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013586for py_libtermcap in "" ncursesw ncurses curses termcap; do
13587 if test -z "$py_libtermcap"; then
13588 READLINE_LIBS="-lreadline"
13589 else
13590 READLINE_LIBS="-lreadline -l$py_libtermcap"
13591 fi
13592 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013593 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013594/* end confdefs.h. */
13595
Martin v. Löwiseba40652007-08-30 20:10:57 +000013596/* Override any GCC internal prototype to avoid an error.
13597 Use char because int might match the return type of a GCC
13598 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013599#ifdef __cplusplus
13600extern "C"
13601#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013602char readline ();
13603int
13604main ()
13605{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013606return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013607 ;
13608 return 0;
13609}
13610_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013611if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013612 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013613fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013614rm -f core conftest.err conftest.$ac_objext \
13615 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013616 if test $py_cv_lib_readline = yes; then
13617 break
13618 fi
13619done
13620# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
13621#AC_SUBST([READLINE_LIBS])
Gregory P. Smithe080cdf2008-09-07 19:19:04 +000013622if test $py_cv_lib_readline = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013623 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
13624$as_echo "none" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013625else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
13627$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013628
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013629$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013630
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013631fi
13632
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013633# check for readline 2.1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
13635$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013636if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013637 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013638else
13639 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013640LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013641cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013642/* end confdefs.h. */
13643
Martin v. Löwiseba40652007-08-30 20:10:57 +000013644/* Override any GCC internal prototype to avoid an error.
13645 Use char because int might match the return type of a GCC
13646 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013647#ifdef __cplusplus
13648extern "C"
13649#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013650char rl_callback_handler_install ();
13651int
13652main ()
13653{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013654return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013655 ;
13656 return 0;
13657}
13658_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013659if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013660 ac_cv_lib_readline_rl_callback_handler_install=yes
13661else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013662 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013663fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013664rm -f core conftest.err conftest.$ac_objext \
13665 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013666LIBS=$ac_check_lib_save_LIBS
13667fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013668{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
13669$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013670if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013671
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013672$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013673
13674fi
13675
13676
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013677# check for readline 2.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013678cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013679/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013680#include <readline/readline.h>
13681_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013682if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013683 have_readline=yes
13684else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013685 have_readline=no
Matthias Klosec511b472010-05-08 11:01:39 +000013686
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013687fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013688rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013689if test $have_readline = yes
13690then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013691 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013692/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013693#include <readline/readline.h>
13694
13695_ACEOF
13696if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013697 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013698
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013699$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013700
13701fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000013702rm -f conftest*
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000013703
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013704 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000013705/* end confdefs.h. */
13706#include <readline/readline.h>
13707
13708_ACEOF
13709if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013710 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000013711
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013712$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000013713
13714fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000013715rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013716
13717fi
13718
Martin v. Löwis0daad592001-09-30 21:09:59 +000013719# check for readline 4.0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
13721$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013722if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013723 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000013724else
Martin v. Löwis11437992002-04-12 09:54:03 +000013725 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013726LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013727cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013728/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013729
Martin v. Löwiseba40652007-08-30 20:10:57 +000013730/* Override any GCC internal prototype to avoid an error.
13731 Use char because int might match the return type of a GCC
13732 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013733#ifdef __cplusplus
13734extern "C"
13735#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013736char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013737int
13738main ()
13739{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013740return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013741 ;
13742 return 0;
13743}
13744_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013745if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013746 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000013747else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013748 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000013749fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013750rm -f core conftest.err conftest.$ac_objext \
13751 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013752LIBS=$ac_check_lib_save_LIBS
13753fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013754{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
13755$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013756if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013757
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013758$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000013759
Martin v. Löwis0daad592001-09-30 21:09:59 +000013760fi
13761
Michael W. Hudson54241132001-12-07 15:38:26 +000013762
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013763# also in 4.0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
13765$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013766if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013767 $as_echo_n "(cached) " >&6
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013768else
13769 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013770LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013771cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013772/* end confdefs.h. */
13773
13774/* Override any GCC internal prototype to avoid an error.
13775 Use char because int might match the return type of a GCC
13776 builtin and then its argument prototype would still apply. */
13777#ifdef __cplusplus
13778extern "C"
13779#endif
13780char rl_completion_display_matches_hook ();
13781int
13782main ()
13783{
13784return rl_completion_display_matches_hook ();
13785 ;
13786 return 0;
13787}
13788_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013789if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013790 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
13791else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013792 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013793fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013794rm -f core conftest.err conftest.$ac_objext \
13795 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013796LIBS=$ac_check_lib_save_LIBS
13797fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013798{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
13799$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013800if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013801
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013802$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013803
13804fi
13805
13806
Martin v. Löwis0daad592001-09-30 21:09:59 +000013807# check for readline 4.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
13809$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013810if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013811 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000013812else
Martin v. Löwis11437992002-04-12 09:54:03 +000013813 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013814LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013815cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013816/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013817
Martin v. Löwiseba40652007-08-30 20:10:57 +000013818/* Override any GCC internal prototype to avoid an error.
13819 Use char because int might match the return type of a GCC
13820 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013821#ifdef __cplusplus
13822extern "C"
13823#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013824char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013825int
13826main ()
13827{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013828return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013829 ;
13830 return 0;
13831}
13832_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013833if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013834 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000013835else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013836 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000013837fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013838rm -f core conftest.err conftest.$ac_objext \
13839 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013840LIBS=$ac_check_lib_save_LIBS
13841fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013842{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
13843$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013844if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013845
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013846$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000013847
Guido van Rossum353ae582001-07-10 16:45:32 +000013848fi
13849
Jack Jansendd19cf82001-12-06 22:36:17 +000013850
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013851# also in readline 4.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013852cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013853/* end confdefs.h. */
13854#include <readline/readline.h>
13855_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013856if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013857 have_readline=yes
13858else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013859 have_readline=no
Matthias Klosec511b472010-05-08 11:01:39 +000013860
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013861fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013862rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013863if test $have_readline = yes
13864then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013865 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013866/* end confdefs.h. */
13867#include <readline/readline.h>
13868
13869_ACEOF
13870if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013871 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013872
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013873$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013874
13875fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000013876rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013877
13878fi
13879
Martin v. Löwis82bca632006-02-10 20:49:30 +000013880# End of readline checks: restore LIBS
13881LIBS=$LIBS_no_readline
13882
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
13884$as_echo_n "checking for broken nice()... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013885if ${ac_cv_broken_nice+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013886 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013887else
Martin v. Löwis11437992002-04-12 09:54:03 +000013888
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013889if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013890 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013891else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013892 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013893/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013894
13895int main()
13896{
13897 int val1 = nice(1);
13898 if (val1 != -1 && val1 == nice(2))
13899 exit(0);
13900 exit(1);
13901}
13902
Martin v. Löwis11437992002-04-12 09:54:03 +000013903_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013904if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013905 ac_cv_broken_nice=yes
13906else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013907 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013908fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013909rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13910 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013911fi
13912
Martin v. Löwiseba40652007-08-30 20:10:57 +000013913fi
13914
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013915{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
13916$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013917if test "$ac_cv_broken_nice" = yes
13918then
Martin v. Löwis11437992002-04-12 09:54:03 +000013919
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013920$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013921
13922fi
13923
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
13925$as_echo_n "checking for broken poll()... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013926if ${ac_cv_broken_poll+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013927 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013928else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013929 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013930 ac_cv_broken_poll=no
13931else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013932 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013933/* end confdefs.h. */
13934
13935#include <poll.h>
13936
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013937int main()
13938{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013939 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013940 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013941
13942 close (42);
13943
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013944 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013945 if (poll_test < 0)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013946 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013947 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013948 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013949 else
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013950 return 1;
13951}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013952
13953_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013954if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013955 ac_cv_broken_poll=yes
13956else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013957 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013958fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013959rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13960 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013961fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013962
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013963fi
13964
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013965{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
13966$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013967if test "$ac_cv_broken_poll" = yes
13968then
13969
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013970$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013971
13972fi
13973
Brett Cannon43802422005-02-10 20:48:03 +000013974# 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 +000013975# (which is not required by ISO C or UNIX spec) and/or if we support
13976# tzname[]
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013977ac_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 +000013978#include <$ac_cv_struct_tm>
13979
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013980"
Matthias Klose3cef2a92012-03-14 23:39:33 +010013981if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000013982
13983cat >>confdefs.h <<_ACEOF
13984#define HAVE_STRUCT_TM_TM_ZONE 1
13985_ACEOF
13986
13987
13988fi
13989
13990if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13991
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013992$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013993
13994else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013995 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13996"
Matthias Klose3cef2a92012-03-14 23:39:33 +010013997if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013998 ac_have_decl=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000013999else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014000 ac_have_decl=0
Martin v. Löwiseba40652007-08-30 20:10:57 +000014001fi
14002
Martin v. Löwiseba40652007-08-30 20:10:57 +000014003cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014004#define HAVE_DECL_TZNAME $ac_have_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +000014005_ACEOF
14006
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014007 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
14008$as_echo_n "checking for tzname... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014009if ${ac_cv_var_tzname+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014010 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000014011else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014012 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014013/* end confdefs.h. */
14014#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000014015#if !HAVE_DECL_TZNAME
14016extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000014017#endif
14018
14019int
14020main ()
14021{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014022return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000014023 ;
14024 return 0;
14025}
14026_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014027if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000014028 ac_cv_var_tzname=yes
14029else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014030 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000014031fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014032rm -f core conftest.err conftest.$ac_objext \
14033 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014034fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014035{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
14036$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000014037 if test $ac_cv_var_tzname = yes; then
14038
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014039$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014040
14041 fi
14042fi
14043
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014044
Martin v. Löwis1d459062005-03-14 21:23:33 +000014045# check tzset(3) exists and works like we expect it to
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
14047$as_echo_n "checking for working tzset()... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014048if ${ac_cv_working_tzset+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014049 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014050else
14051
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014052if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014053 ac_cv_working_tzset=no
14054else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014055 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014056/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014057
14058#include <stdlib.h>
14059#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000014060#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000014061
14062#if HAVE_TZNAME
14063extern char *tzname[];
14064#endif
14065
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014066int main()
14067{
Brett Cannon18367812003-09-19 00:59:16 +000014068 /* Note that we need to ensure that not only does tzset(3)
14069 do 'something' with localtime, but it works as documented
14070 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000014071 This includes making sure that tzname is set properly if
14072 tm->tm_zone does not exist since it is the alternative way
14073 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000014074
14075 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000014076 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000014077 */
14078
Martin v. Löwis1d459062005-03-14 21:23:33 +000014079 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000014080 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
14081
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014082 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014083 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014084 if (localtime(&groundhogday)->tm_hour != 0)
14085 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014086#if HAVE_TZNAME
14087 /* For UTC, tzname[1] is sometimes "", sometimes " " */
14088 if (strcmp(tzname[0], "UTC") ||
14089 (tzname[1][0] != 0 && tzname[1][0] != ' '))
14090 exit(1);
14091#endif
Brett Cannon18367812003-09-19 00:59:16 +000014092
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014093 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014094 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014095 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014096 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014097#if HAVE_TZNAME
14098 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
14099 exit(1);
14100#endif
Brett Cannon18367812003-09-19 00:59:16 +000014101
14102 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
14103 tzset();
14104 if (localtime(&groundhogday)->tm_hour != 11)
14105 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014106#if HAVE_TZNAME
14107 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
14108 exit(1);
14109#endif
14110
14111#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000014112 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
14113 exit(1);
14114 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
14115 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014116#endif
Brett Cannon18367812003-09-19 00:59:16 +000014117
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014118 exit(0);
14119}
14120
14121_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014122if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014123 ac_cv_working_tzset=yes
14124else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014125 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014126fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014127rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14128 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014129fi
14130
Martin v. Löwiseba40652007-08-30 20:10:57 +000014131fi
14132
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014133{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
14134$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014135if test "$ac_cv_working_tzset" = yes
14136then
14137
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014138$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014139
14140fi
14141
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014142# Look for subsecond timestamps in struct stat
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
14144$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014145if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014146 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014147else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014148 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014149/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014150#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014151int
14152main ()
14153{
14154
14155struct stat st;
14156st.st_mtim.tv_nsec = 1;
14157
14158 ;
14159 return 0;
14160}
14161_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014162if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000014163 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014164else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014165 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014166fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014167rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14168fi
14169
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014170{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
14171$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014172if test "$ac_cv_stat_tv_nsec" = yes
14173then
14174
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014175$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014176
14177fi
14178
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014179# Look for BSD style subsecond timestamps in struct stat
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
14181$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014182if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014183 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014184else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014185 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014186/* end confdefs.h. */
14187#include <sys/stat.h>
14188int
14189main ()
14190{
14191
14192struct stat st;
14193st.st_mtimespec.tv_nsec = 1;
14194
14195 ;
14196 return 0;
14197}
14198_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014199if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014200 ac_cv_stat_tv_nsec2=yes
14201else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014202 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014203fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014204rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14205fi
14206
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014207{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
14208$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014209if test "$ac_cv_stat_tv_nsec2" = yes
14210then
14211
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014212$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014213
14214fi
14215
doko@ubuntu.comf27ec3e2014-04-17 20:11:19 +020014216# first curses configure check
14217ac_save_cppflags="$CPPFLAGS"
14218CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
14219
14220for ac_header in curses.h ncurses.h
14221do :
14222 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14223ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
14224if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
14225 cat >>confdefs.h <<_ACEOF
14226#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14227_ACEOF
14228
14229fi
14230
14231done
14232
14233
14234# On Solaris, term.h requires curses.h
14235for ac_header in term.h
14236do :
14237 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
14238#ifdef HAVE_CURSES_H
14239#include <curses.h>
14240#endif
14241
14242"
14243if test "x$ac_cv_header_term_h" = xyes; then :
14244 cat >>confdefs.h <<_ACEOF
14245#define HAVE_TERM_H 1
14246_ACEOF
14247
14248fi
14249
14250done
14251
14252
Jack Jansen666b1e72001-10-31 12:11:48 +000014253# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
14255$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014256if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014257 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014258else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014259 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014260/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014261#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014262int
14263main ()
14264{
Jack Jansen666b1e72001-10-31 12:11:48 +000014265
14266 int rtn;
14267 rtn = mvwdelch(0,0,0);
14268
Martin v. Löwis11437992002-04-12 09:54:03 +000014269 ;
14270 return 0;
14271}
14272_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014273if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014274 ac_cv_mvwdelch_is_expression=yes
14275else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014276 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014277fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014278rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14279fi
14280
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014281{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
14282$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000014283
14284if test "$ac_cv_mvwdelch_is_expression" = yes
14285then
Martin v. Löwis11437992002-04-12 09:54:03 +000014286
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014287$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014288
14289fi
14290
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
14292$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014293if ${ac_cv_window_has_flags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014294 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014295else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014296 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014297/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014298#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014299int
14300main ()
14301{
Jack Jansen666b1e72001-10-31 12:11:48 +000014302
14303 WINDOW *w;
14304 w->_flags = 0;
14305
Martin v. Löwis11437992002-04-12 09:54:03 +000014306 ;
14307 return 0;
14308}
14309_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014310if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014311 ac_cv_window_has_flags=yes
14312else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014313 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014314fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014315rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14316fi
14317
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014318{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
14319$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000014320
Jack Jansen666b1e72001-10-31 12:11:48 +000014321
14322if test "$ac_cv_window_has_flags" = yes
14323then
Martin v. Löwis11437992002-04-12 09:54:03 +000014324
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014325$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014326
14327fi
14328
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
14330$as_echo_n "checking for is_term_resized... " >&6; }
14331cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000014332/* end confdefs.h. */
14333#include <curses.h>
14334int
14335main ()
14336{
14337void *x=is_term_resized
14338 ;
14339 return 0;
14340}
14341_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014342if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000014343
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014344$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000014345
Matthias Klosec511b472010-05-08 11:01:39 +000014346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014347$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014348else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14350$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014351
14352fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014353rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14354
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
14356$as_echo_n "checking for resize_term... " >&6; }
14357cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000014358/* end confdefs.h. */
14359#include <curses.h>
14360int
14361main ()
14362{
14363void *x=resize_term
14364 ;
14365 return 0;
14366}
14367_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014368if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000014369
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014370$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000014371
Matthias Klosec511b472010-05-08 11:01:39 +000014372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014373$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014374else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14376$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014377
14378fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014379rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14380
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
14382$as_echo_n "checking for resizeterm... " >&6; }
14383cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000014384/* end confdefs.h. */
14385#include <curses.h>
14386int
14387main ()
14388{
14389void *x=resizeterm
14390 ;
14391 return 0;
14392}
14393_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014394if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000014395
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014396$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000014397
Matthias Klosec511b472010-05-08 11:01:39 +000014398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014399$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014400else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14402$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014403
14404fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014405rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.comf27ec3e2014-04-17 20:11:19 +020014406# last curses configure check
14407CPPFLAGS=$ac_save_cppflags
Martin v. Löwiseba40652007-08-30 20:10:57 +000014408
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
14410$as_echo "$as_me: checking for device files" >&6;}
14411
14412if test "x$cross_compiling" = xyes; then
14413 if test "${ac_cv_file__dev_ptmx+set}" != set; then
14414 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14415$as_echo_n "checking for /dev/ptmx... " >&6; }
14416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14417$as_echo "not set" >&6; }
14418 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14419 fi
14420 if test "${ac_cv_file__dev_ptc+set}" != set; then
14421 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14422$as_echo_n "checking for /dev/ptc... " >&6; }
14423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14424$as_echo "not set" >&6; }
14425 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14426 fi
14427fi
14428
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14430$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014431if ${ac_cv_file__dev_ptmx+:} false; then :
14432 $as_echo_n "(cached) " >&6
14433else
14434 test "$cross_compiling" = yes &&
14435 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14436if test -r "/dev/ptmx"; then
14437 ac_cv_file__dev_ptmx=yes
14438else
14439 ac_cv_file__dev_ptmx=no
14440fi
14441fi
14442{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
14443$as_echo "$ac_cv_file__dev_ptmx" >&6; }
14444if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Martin v. Löwisfefbc202006-10-17 18:59:23 +000014445
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014446fi
14447
14448if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014449
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014450$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014451
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014452fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14454$as_echo_n "checking for /dev/ptc... " >&6; }
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014455if ${ac_cv_file__dev_ptc+:} false; then :
14456 $as_echo_n "(cached) " >&6
14457else
14458 test "$cross_compiling" = yes &&
14459 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14460if test -r "/dev/ptc"; then
14461 ac_cv_file__dev_ptc=yes
14462else
14463 ac_cv_file__dev_ptc=no
14464fi
14465fi
14466{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
14467$as_echo "$ac_cv_file__dev_ptc" >&6; }
14468if test "x$ac_cv_file__dev_ptc" = xyes; then :
Martin v. Löwisfefbc202006-10-17 18:59:23 +000014469
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014470fi
14471
14472if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000014473
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014474$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000014475
Neal Norwitz865400f2003-03-21 01:42:58 +000014476fi
14477
Mark Dickinson82864d12009-11-15 16:18:58 +000014478if test "$have_long_long" = yes
14479then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014480 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
14481$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014482 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014483 $as_echo_n "(cached) " >&6
Mark Dickinson82864d12009-11-15 16:18:58 +000014484else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014485 if test "$cross_compiling" = yes; then :
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014486 ac_cv_have_long_long_format="cross -- assuming no"
14487 if test x$GCC = xyes; then
14488 save_CFLAGS=$CFLAGS
14489 CFLAGS="$CFLAGS -Werror -Wformat"
14490 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14491/* end confdefs.h. */
14492
14493 #include <stdio.h>
14494 #include <stddef.h>
14495
14496int
14497main ()
14498{
14499
14500 char *buffer;
14501 sprintf(buffer, "%lld", (long long)123);
14502 sprintf(buffer, "%lld", (long long)-123);
14503 sprintf(buffer, "%llu", (unsigned long long)123);
14504
14505 ;
14506 return 0;
14507}
14508_ACEOF
14509if ac_fn_c_try_compile "$LINENO"; then :
14510 ac_cv_have_long_long_format=yes
14511
14512fi
14513rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14514 CFLAGS=$save_CFLAGS
14515 fi
Mark Dickinson82864d12009-11-15 16:18:58 +000014516else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014517 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson82864d12009-11-15 16:18:58 +000014518/* end confdefs.h. */
14519
14520 #include <stdio.h>
14521 #include <stddef.h>
14522 #include <string.h>
14523
14524 #ifdef HAVE_SYS_TYPES_H
14525 #include <sys/types.h>
14526 #endif
14527
14528 int main()
14529 {
14530 char buffer[256];
14531
14532 if (sprintf(buffer, "%lld", (long long)123) < 0)
14533 return 1;
14534 if (strcmp(buffer, "123"))
14535 return 1;
14536
14537 if (sprintf(buffer, "%lld", (long long)-123) < 0)
14538 return 1;
14539 if (strcmp(buffer, "-123"))
14540 return 1;
14541
14542 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
14543 return 1;
14544 if (strcmp(buffer, "123"))
14545 return 1;
14546
14547 return 0;
14548 }
14549
14550_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014551if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson82864d12009-11-15 16:18:58 +000014552 ac_cv_have_long_long_format=yes
14553else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014554 ac_cv_have_long_long_format=no
Mark Dickinson82864d12009-11-15 16:18:58 +000014555fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014556rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14557 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson82864d12009-11-15 16:18:58 +000014558fi
14559
14560
Mark Dickinson82864d12009-11-15 16:18:58 +000014561fi
14562
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
14564$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson82864d12009-11-15 16:18:58 +000014565fi
14566
Mark Dickinson5ce84742009-12-31 20:48:04 +000014567if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson82864d12009-11-15 16:18:58 +000014568then
14569
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014570$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson82864d12009-11-15 16:18:58 +000014571
14572fi
14573
Ronald Oussoren315cd0c2009-11-19 16:25:21 +000014574if test $ac_sys_system = Darwin
14575then
14576 LIBS="$LIBS -framework CoreFoundation"
14577fi
14578
Mark Dickinson82864d12009-11-15 16:18:58 +000014579
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
14581$as_echo_n "checking for %zd printf() format support... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014582if ${ac_cv_have_size_t_format+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014583 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014584else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014585 if test "$cross_compiling" = yes; then :
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000014586 ac_cv_have_size_t_format="cross -- assuming yes"
14587
Brett Cannon09d12362006-05-11 05:11:33 +000014588else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014589 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon09d12362006-05-11 05:11:33 +000014590/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014591
Brett Cannon09d12362006-05-11 05:11:33 +000014592#include <stdio.h>
14593#include <stddef.h>
14594#include <string.h>
14595
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000014596#ifdef HAVE_SYS_TYPES_H
14597#include <sys/types.h>
14598#endif
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000014599
14600#ifdef HAVE_SSIZE_T
14601typedef ssize_t Py_ssize_t;
14602#elif SIZEOF_VOID_P == SIZEOF_LONG
14603typedef long Py_ssize_t;
14604#else
14605typedef int Py_ssize_t;
14606#endif
Brett Cannon09d12362006-05-11 05:11:33 +000014607
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000014608int main()
14609{
14610 char buffer[256];
14611
Brett Cannon09d12362006-05-11 05:11:33 +000014612 if(sprintf(buffer, "%zd", (size_t)123) < 0)
14613 return 1;
14614
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000014615 if (strcmp(buffer, "123"))
14616 return 1;
14617
14618 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
14619 return 1;
14620
14621 if (strcmp(buffer, "-123"))
Brett Cannon09d12362006-05-11 05:11:33 +000014622 return 1;
14623
14624 return 0;
14625}
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014626
Brett Cannon09d12362006-05-11 05:11:33 +000014627_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014628if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014629 ac_cv_have_size_t_format=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014630else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014631 ac_cv_have_size_t_format=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014632fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014633rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14634 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000014635fi
14636
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014637fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014638{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
14639$as_echo "$ac_cv_have_size_t_format" >&6; }
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000014640if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014641
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014642$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014643
14644fi
14645
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014646ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000014647#ifdef HAVE_SYS_TYPES_H
14648#include <sys/types.h>
14649#endif
14650#ifdef HAVE_SYS_SOCKET_H
14651#include <sys/socket.h>
14652#endif
14653
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014654"
Matthias Klose3cef2a92012-03-14 23:39:33 +010014655if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000014656
Martin v. Löwis11437992002-04-12 09:54:03 +000014657else
Guido van Rossum95713eb2000-05-18 20:53:31 +000014658
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014659$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000014660
14661fi
14662
Michael W. Hudson54241132001-12-07 15:38:26 +000014663
Benjamin Peterson7497e912010-10-16 00:53:39 +000014664case $ac_sys_system in
14665AIX*)
14666
14667$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
14668 ;;
14669esac
14670
14671
Michael W. Hudson54241132001-12-07 15:38:26 +000014672
14673
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000014674for h in `(cd $srcdir;echo Python/thread_*.h)`
14675do
14676 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
14677done
14678
Michael W. Hudson54241132001-12-07 15:38:26 +000014679
Neal Norwitzd24499d2005-12-18 21:36:39 +000014680SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
14682$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014683for dir in $SRCDIRS; do
14684 if test ! -d $dir; then
14685 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000014686 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014687done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014688{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
14689$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000014690
Ned Deily3f1d0b32014-11-20 02:11:03 -080014691# ensurepip option
14692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
14693$as_echo_n "checking for ensurepip... " >&6; }
14694
14695# Check whether --with-ensurepip was given.
14696if test "${with_ensurepip+set}" = set; then :
14697 withval=$with_ensurepip;
14698else
14699 with_ensurepip=no
14700fi
14701
14702case $with_ensurepip in #(
14703 yes|upgrade) :
14704 ENSUREPIP=upgrade ;; #(
14705 install) :
14706 ENSUREPIP=install ;; #(
14707 no) :
14708 ENSUREPIP=no ;; #(
14709 *) :
14710 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
14711esac
14712{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
14713$as_echo "$ENSUREPIP" >&6; }
14714
14715
Guido van Rossum627b2d71993-12-24 10:39:16 +000014716# generate output files
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000014717ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000014718
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000014719ac_config_files="$ac_config_files Modules/ld_so_aix"
14720
Martin v. Löwis11437992002-04-12 09:54:03 +000014721cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014722# This file is a shell script that caches the results of configure
14723# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000014724# scripts and configure runs, see configure's option --config-cache.
14725# It is not useful on other systems. If it contains results you don't
14726# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014727#
Martin v. Löwis11437992002-04-12 09:54:03 +000014728# config.status only pays attention to the cache file if you give it
14729# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014730#
Skip Montanaro6dead952003-09-25 14:50:04 +000014731# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000014732# loading this file, other *unset* `ac_cv_foo' will be assigned the
14733# following values.
14734
14735_ACEOF
14736
Guido van Rossumf78abae1997-01-21 22:02:36 +000014737# The following way of writing the cache mishandles newlines in values,
14738# but we know of no workaround that is simple, portable, and efficient.
Martin v. Löwiseba40652007-08-30 20:10:57 +000014739# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014740# Ultrix sh set writes to stderr and can't be redirected directly,
14741# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwiseba40652007-08-30 20:10:57 +000014742(
14743 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
14744 eval ac_val=\$$ac_var
14745 case $ac_val in #(
14746 *${as_nl}*)
14747 case $ac_var in #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014748 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
14749$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014750 esac
14751 case $ac_var in #(
14752 _ | IFS | as_nl) ;; #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014753 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
14754 *) { eval $ac_var=; unset $ac_var;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014755 esac ;;
14756 esac
14757 done
14758
Martin v. Löwis11437992002-04-12 09:54:03 +000014759 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +000014760 case $as_nl`(ac_space=' '; set) 2>&1` in #(
14761 *${as_nl}ac_space=\ *)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014762 # `set' does not quote correctly, so add quotes: double-quote
14763 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000014764 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014765 "s/'/'\\\\''/g;
14766 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Martin v. Löwiseba40652007-08-30 20:10:57 +000014767 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000014768 *)
14769 # `set' quotes correctly as required by POSIX, so do not add quotes.
Martin v. Löwiseba40652007-08-30 20:10:57 +000014770 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000014771 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014772 esac |
14773 sort
14774) |
Martin v. Löwis11437992002-04-12 09:54:03 +000014775 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000014776 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000014777 t clear
Martin v. Löwiseba40652007-08-30 20:10:57 +000014778 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000014779 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
14780 t end
Martin v. Löwiseba40652007-08-30 20:10:57 +000014781 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
14782 :end' >>confcache
14783if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
14784 if test -w "$cache_file"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +010014785 if test "x$cache_file" != "x/dev/null"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014786 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
14787$as_echo "$as_me: updating cache $cache_file" >&6;}
Matthias Klose3cef2a92012-03-14 23:39:33 +010014788 if test ! -f "$cache_file" || test -h "$cache_file"; then
14789 cat confcache >"$cache_file"
14790 else
14791 case $cache_file in #(
14792 */* | ?:*)
14793 mv -f confcache "$cache_file"$$ &&
14794 mv -f "$cache_file"$$ "$cache_file" ;; #(
14795 *)
14796 mv -f confcache "$cache_file" ;;
14797 esac
14798 fi
14799 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014800 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014801 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
14802$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014803 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014804fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014805rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000014806
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014807test "x$prefix" = xNONE && prefix=$ac_default_prefix
14808# Let make expand exec_prefix.
14809test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000014810
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014811DEFS=-DHAVE_CONFIG_H
14812
Skip Montanaro6dead952003-09-25 14:50:04 +000014813ac_libobjs=
14814ac_ltlibobjs=
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014815U=
Skip Montanaro6dead952003-09-25 14:50:04 +000014816for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
14817 # 1. Remove the extension, and $U if already installed.
Martin v. Löwiseba40652007-08-30 20:10:57 +000014818 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014819 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Martin v. Löwiseba40652007-08-30 20:10:57 +000014820 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
14821 # will be set to the directory where LIBOBJS objects are built.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014822 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
14823 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000014824done
14825LIBOBJS=$ac_libobjs
14826
14827LTLIBOBJS=$ac_ltlibobjs
14828
14829
Martin v. Löwis11437992002-04-12 09:54:03 +000014830
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014831
Matthias Klose3cef2a92012-03-14 23:39:33 +010014832: "${CONFIG_STATUS=./config.status}"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014833ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000014834ac_clean_files_save=$ac_clean_files
14835ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014836{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
14837$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
14838as_write_fail=0
14839cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014840#! $SHELL
14841# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000014842# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014843# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000014844# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000014845
Martin v. Löwis11437992002-04-12 09:54:03 +000014846debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000014847ac_cs_recheck=false
14848ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000014849
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014850SHELL=\${CONFIG_SHELL-$SHELL}
14851export SHELL
14852_ASEOF
14853cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
14854## -------------------- ##
14855## M4sh Initialization. ##
14856## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000014857
Martin v. Löwiseba40652007-08-30 20:10:57 +000014858# Be more Bourne compatible
14859DUALCASE=1; export DUALCASE # for MKS sh
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014860if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014861 emulate sh
14862 NULLCMD=:
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014863 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000014864 # is contrary to our usage. Disable this feature.
14865 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000014866 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000014867else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014868 case `(set -o) 2>/dev/null` in #(
14869 *posix*) :
14870 set -o posix ;; #(
14871 *) :
14872 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014873esac
Martin v. Löwis11437992002-04-12 09:54:03 +000014874fi
Michael W. Hudson54241132001-12-07 15:38:26 +000014875
Skip Montanaro6dead952003-09-25 14:50:04 +000014876
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014877as_nl='
14878'
14879export as_nl
14880# Printing a long string crashes Solaris 7 /usr/bin/printf.
14881as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
14882as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
14883as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
14884# Prefer a ksh shell builtin over an external printf program on Solaris,
14885# but without wasting forks for bash or zsh.
14886if test -z "$BASH_VERSION$ZSH_VERSION" \
14887 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
14888 as_echo='print -r --'
14889 as_echo_n='print -rn --'
14890elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
14891 as_echo='printf %s\n'
14892 as_echo_n='printf %s'
14893else
14894 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
14895 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
14896 as_echo_n='/usr/ucb/echo -n'
14897 else
14898 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
14899 as_echo_n_body='eval
14900 arg=$1;
14901 case $arg in #(
14902 *"$as_nl"*)
14903 expr "X$arg" : "X\\(.*\\)$as_nl";
14904 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
14905 esac;
14906 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
14907 '
14908 export as_echo_n_body
14909 as_echo_n='sh -c $as_echo_n_body as_echo'
14910 fi
14911 export as_echo_body
14912 as_echo='sh -c $as_echo_body as_echo'
14913fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014914
14915# The user is always right.
14916if test "${PATH_SEPARATOR+set}" != set; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014917 PATH_SEPARATOR=:
14918 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
14919 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
14920 PATH_SEPARATOR=';'
14921 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000014922fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014923
Martin v. Löwiseba40652007-08-30 20:10:57 +000014924
14925# IFS
14926# We need space, tab and new line, in precisely that order. Quoting is
14927# there to prevent editors from complaining about space-tab.
14928# (If _AS_PATH_WALK were called with IFS unset, it would disable word
14929# splitting by setting IFS to empty value.)
Martin v. Löwiseba40652007-08-30 20:10:57 +000014930IFS=" "" $as_nl"
14931
14932# Find who we are. Look in the path if we contain no directory separator.
Matthias Klose3cef2a92012-03-14 23:39:33 +010014933as_myself=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014934case $0 in #((
Martin v. Löwiseba40652007-08-30 20:10:57 +000014935 *[\\/]* ) as_myself=$0 ;;
14936 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000014937for as_dir in $PATH
14938do
14939 IFS=$as_save_IFS
14940 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014941 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
14942 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000014943IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000014944
Martin v. Löwiseba40652007-08-30 20:10:57 +000014945 ;;
14946esac
14947# We did not find ourselves, most probably we were run as `sh COMMAND'
14948# in which case we are not to be found in the path.
14949if test "x$as_myself" = x; then
14950 as_myself=$0
14951fi
14952if test ! -f "$as_myself"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014953 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
14954 exit 1
Martin v. Löwiseba40652007-08-30 20:10:57 +000014955fi
14956
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014957# Unset variables that we do not need and which cause bugs (e.g. in
14958# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
14959# suppresses any "Segmentation fault" message there. '((' could
14960# trigger a bug in pdksh 5.2.14.
14961for as_var in BASH_ENV ENV MAIL MAILPATH
14962do eval test x\${$as_var+set} = xset \
14963 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Martin v. Löwiseba40652007-08-30 20:10:57 +000014964done
14965PS1='$ '
14966PS2='> '
14967PS4='+ '
14968
14969# NLS nuisances.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014970LC_ALL=C
14971export LC_ALL
14972LANGUAGE=C
14973export LANGUAGE
Martin v. Löwiseba40652007-08-30 20:10:57 +000014974
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014975# CDPATH.
14976(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
14977
14978
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014979# as_fn_error STATUS ERROR [LINENO LOG_FD]
14980# ----------------------------------------
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014981# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
14982# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014983# script with STATUS, using 1 if that was 0.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014984as_fn_error ()
14985{
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014986 as_status=$1; test $as_status -eq 0 && as_status=1
14987 if test "$4"; then
14988 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
14989 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014990 fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014991 $as_echo "$as_me: error: $2" >&2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014992 as_fn_exit $as_status
14993} # as_fn_error
14994
14995
14996# as_fn_set_status STATUS
14997# -----------------------
14998# Set $? to STATUS, without forking.
14999as_fn_set_status ()
15000{
15001 return $1
15002} # as_fn_set_status
15003
15004# as_fn_exit STATUS
15005# -----------------
15006# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
15007as_fn_exit ()
15008{
15009 set +e
15010 as_fn_set_status $1
15011 exit $1
15012} # as_fn_exit
15013
15014# as_fn_unset VAR
15015# ---------------
15016# Portably unset VAR.
15017as_fn_unset ()
15018{
15019 { eval $1=; unset $1;}
15020}
15021as_unset=as_fn_unset
15022# as_fn_append VAR VALUE
15023# ----------------------
15024# Append the text in VALUE to the end of the definition contained in VAR. Take
15025# advantage of any shell optimizations that allow amortized linear growth over
15026# repeated appends, instead of the typical quadratic growth present in naive
15027# implementations.
15028if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
15029 eval 'as_fn_append ()
15030 {
15031 eval $1+=\$2
15032 }'
15033else
15034 as_fn_append ()
15035 {
15036 eval $1=\$$1\$2
15037 }
15038fi # as_fn_append
15039
15040# as_fn_arith ARG...
15041# ------------------
15042# Perform arithmetic evaluation on the ARGs, and store the result in the
15043# global $as_val. Take advantage of shells that can avoid forks. The arguments
15044# must be portable across $(()) and expr.
15045if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
15046 eval 'as_fn_arith ()
15047 {
15048 as_val=$(( $* ))
15049 }'
15050else
15051 as_fn_arith ()
15052 {
15053 as_val=`expr "$@" || test $? -eq 1`
15054 }
15055fi # as_fn_arith
15056
15057
Martin v. Löwiseba40652007-08-30 20:10:57 +000015058if expr a : '\(a\)' >/dev/null 2>&1 &&
15059 test "X`expr 00001 : '.*\(...\)'`" = X001; then
15060 as_expr=expr
15061else
15062 as_expr=false
15063fi
15064
15065if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
15066 as_basename=basename
15067else
15068 as_basename=false
15069fi
15070
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015071if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
15072 as_dirname=dirname
15073else
15074 as_dirname=false
15075fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015076
Martin v. Löwiseba40652007-08-30 20:10:57 +000015077as_me=`$as_basename -- "$0" ||
15078$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15079 X"$0" : 'X\(//\)$' \| \
15080 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015081$as_echo X/"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000015082 sed '/^.*\/\([^/][^/]*\)\/*$/{
15083 s//\1/
15084 q
15085 }
15086 /^X\/\(\/\/\)$/{
15087 s//\1/
15088 q
15089 }
15090 /^X\/\(\/\).*/{
15091 s//\1/
15092 q
15093 }
15094 s/.*/./; q'`
15095
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015096# Avoid depending upon Character Ranges.
15097as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15098as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15099as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15100as_cr_digits='0123456789'
15101as_cr_alnum=$as_cr_Letters$as_cr_digits
Martin v. Löwiseba40652007-08-30 20:10:57 +000015102
15103ECHO_C= ECHO_N= ECHO_T=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015104case `echo -n x` in #(((((
Martin v. Löwiseba40652007-08-30 20:10:57 +000015105-n*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015106 case `echo 'xy\c'` in
Martin v. Löwiseba40652007-08-30 20:10:57 +000015107 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015108 xy) ECHO_C='\c';;
15109 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
15110 ECHO_T=' ';;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015111 esac;;
15112*)
15113 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000015114esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015115
Martin v. Löwis11437992002-04-12 09:54:03 +000015116rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +000015117if test -d conf$$.dir; then
15118 rm -f conf$$.dir/conf$$.file
15119else
15120 rm -f conf$$.dir
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015121 mkdir conf$$.dir 2>/dev/null
Martin v. Löwiseba40652007-08-30 20:10:57 +000015122fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015123if (echo >conf$$.file) 2>/dev/null; then
15124 if ln -s conf$$.file conf$$ 2>/dev/null; then
15125 as_ln_s='ln -s'
15126 # ... but there are two gotchas:
15127 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
15128 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015129 # In both cases, we have to default to `cp -pR'.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015130 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015131 as_ln_s='cp -pR'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015132 elif ln conf$$.file conf$$ 2>/dev/null; then
15133 as_ln_s=ln
15134 else
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015135 as_ln_s='cp -pR'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015136 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015137else
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015138 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000015139fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015140rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
15141rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000015142
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015143
15144# as_fn_mkdir_p
15145# -------------
15146# Create "$as_dir" as a directory, including parents if necessary.
15147as_fn_mkdir_p ()
15148{
15149
15150 case $as_dir in #(
15151 -*) as_dir=./$as_dir;;
15152 esac
15153 test -d "$as_dir" || eval $as_mkdir_p || {
15154 as_dirs=
15155 while :; do
15156 case $as_dir in #(
15157 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
15158 *) as_qdir=$as_dir;;
15159 esac
15160 as_dirs="'$as_qdir' $as_dirs"
15161 as_dir=`$as_dirname -- "$as_dir" ||
15162$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15163 X"$as_dir" : 'X\(//\)[^/]' \| \
15164 X"$as_dir" : 'X\(//\)$' \| \
15165 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
15166$as_echo X"$as_dir" |
15167 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15168 s//\1/
15169 q
15170 }
15171 /^X\(\/\/\)[^/].*/{
15172 s//\1/
15173 q
15174 }
15175 /^X\(\/\/\)$/{
15176 s//\1/
15177 q
15178 }
15179 /^X\(\/\).*/{
15180 s//\1/
15181 q
15182 }
15183 s/.*/./; q'`
15184 test -d "$as_dir" && break
15185 done
15186 test -z "$as_dirs" || eval "mkdir $as_dirs"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015187 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015188
15189
15190} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000015191if mkdir -p . 2>/dev/null; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015192 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000015193else
Skip Montanarof0d5f792004-08-15 14:08:23 +000015194 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000015195 as_mkdir_p=false
15196fi
15197
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015198
15199# as_fn_executable_p FILE
15200# -----------------------
15201# Test if FILE is an executable regular file.
15202as_fn_executable_p ()
15203{
15204 test -f "$1" && test -x "$1"
15205} # as_fn_executable_p
15206as_test_x='test -x'
15207as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000015208
15209# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015210as_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 +000015211
15212# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015213as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015214
15215
Martin v. Löwis11437992002-04-12 09:54:03 +000015216exec 6>&1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015217## ----------------------------------- ##
15218## Main body of $CONFIG_STATUS script. ##
15219## ----------------------------------- ##
15220_ASEOF
15221test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015222
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015223cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15224# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000015225# report actual input values of CONFIG_FILES etc. instead of their
Martin v. Löwiseba40652007-08-30 20:10:57 +000015226# values after options handling.
15227ac_log="
Martin v. Löwis174440b2008-10-03 08:59:41 +000015228This file was extended by python $as_me 2.7, which was
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015229generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000015230
15231 CONFIG_FILES = $CONFIG_FILES
15232 CONFIG_HEADERS = $CONFIG_HEADERS
15233 CONFIG_LINKS = $CONFIG_LINKS
15234 CONFIG_COMMANDS = $CONFIG_COMMANDS
15235 $ $0 $@
15236
Martin v. Löwiseba40652007-08-30 20:10:57 +000015237on `(hostname || uname -n) 2>/dev/null | sed 1q`
15238"
15239
Martin v. Löwis11437992002-04-12 09:54:03 +000015240_ACEOF
15241
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015242case $ac_config_files in *"
15243"*) set x $ac_config_files; shift; ac_config_files=$*;;
15244esac
15245
15246case $ac_config_headers in *"
15247"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
15248esac
15249
15250
15251cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015252# Files that config.status was made for.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015253config_files="$ac_config_files"
15254config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000015255
Martin v. Löwiseba40652007-08-30 20:10:57 +000015256_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015257
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015258cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015259ac_cs_usage="\
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015260\`$as_me' instantiates files and other configuration actions
15261from templates according to the current configuration. Unless the files
15262and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000015263
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015264Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000015265
15266 -h, --help print this help, then exit
Martin v. Löwiseba40652007-08-30 20:10:57 +000015267 -V, --version print version number and configuration settings, then exit
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015268 --config print configuration, then exit
15269 -q, --quiet, --silent
15270 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000015271 -d, --debug don't remove temporary files
15272 --recheck update $as_me by reconfiguring in the same conditions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015273 --file=FILE[:TEMPLATE]
15274 instantiate the configuration file FILE
15275 --header=FILE[:TEMPLATE]
15276 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000015277
15278Configuration files:
15279$config_files
15280
15281Configuration headers:
15282$config_headers
15283
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015284Report bugs to <http://bugs.python.org/>."
Skip Montanaro89e975f2007-08-22 19:05:21 +000015285
Martin v. Löwiseba40652007-08-30 20:10:57 +000015286_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015287cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15288ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000015289ac_cs_version="\\
Martin v. Löwis174440b2008-10-03 08:59:41 +000015290python config.status 2.7
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015291configured by $0, generated by GNU Autoconf 2.69,
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015292 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000015293
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015294Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000015295This config.status script is free software; the Free Software Foundation
15296gives unlimited permission to copy, distribute and modify it."
Martin v. Löwiseba40652007-08-30 20:10:57 +000015297
15298ac_pwd='$ac_pwd'
15299srcdir='$srcdir'
15300INSTALL='$INSTALL'
Trent Nelsonf6407a12012-08-30 14:56:13 +000015301MKDIR_P='$MKDIR_P'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015302test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000015303_ACEOF
15304
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015305cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15306# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000015307ac_need_defaults=:
15308while test $# != 0
15309do
15310 case $1 in
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015311 --*=?*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000015312 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15313 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000015314 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000015315 ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015316 --*=)
15317 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15318 ac_optarg=
15319 ac_shift=:
15320 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015321 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000015322 ac_option=$1
15323 ac_optarg=$2
15324 ac_shift=shift
15325 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015326 esac
15327
Skip Montanaro6dead952003-09-25 14:50:04 +000015328 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000015329 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000015330 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15331 ac_cs_recheck=: ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015332 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015333 $as_echo "$ac_cs_version"; exit ;;
15334 --config | --confi | --conf | --con | --co | --c )
15335 $as_echo "$ac_cs_config"; exit ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015336 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000015337 debug=: ;;
15338 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000015339 $ac_shift
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015340 case $ac_optarg in
15341 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015342 '') as_fn_error $? "missing file argument" ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015343 esac
15344 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015345 ac_need_defaults=false;;
15346 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000015347 $ac_shift
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015348 case $ac_optarg in
15349 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15350 esac
15351 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015352 ac_need_defaults=false;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015353 --he | --h)
15354 # Conflict between --help and --header
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015355 as_fn_error $? "ambiguous option: \`$1'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015356Try \`$0 --help' for more information.";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015357 --help | --hel | -h )
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015358 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000015359 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
15360 | -silent | --silent | --silen | --sile | --sil | --si | --s)
15361 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015362
15363 # This is an error.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015364 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015365Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015366
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015367 *) as_fn_append ac_config_targets " $1"
Martin v. Löwiseba40652007-08-30 20:10:57 +000015368 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015369
15370 esac
15371 shift
15372done
15373
Skip Montanaro6dead952003-09-25 14:50:04 +000015374ac_configure_extra_args=
15375
15376if $ac_cs_silent; then
15377 exec 6>/dev/null
15378 ac_configure_extra_args="$ac_configure_extra_args --silent"
15379fi
15380
15381_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015382cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000015383if \$ac_cs_recheck; then
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015384 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015385 shift
15386 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
15387 CONFIG_SHELL='$SHELL'
Martin v. Löwiseba40652007-08-30 20:10:57 +000015388 export CONFIG_SHELL
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015389 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000015390fi
15391
Martin v. Löwis11437992002-04-12 09:54:03 +000015392_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015393cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015394exec 5>>config.log
15395{
15396 echo
15397 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
15398## Running $as_me. ##
15399_ASBOX
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015400 $as_echo "$ac_log"
Martin v. Löwiseba40652007-08-30 20:10:57 +000015401} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015402
Martin v. Löwiseba40652007-08-30 20:10:57 +000015403_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015404cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015405_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015406
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015407cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015408
15409# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000015410for ac_config_target in $ac_config_targets
15411do
Martin v. Löwiseba40652007-08-30 20:10:57 +000015412 case $ac_config_target in
15413 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
15414 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
15415 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
15416 "Mac/IDLE/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/IDLE/Makefile" ;;
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000015417 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
15418 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015419 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
15420 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000015421 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000015422 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015423
Matthias Klose3cef2a92012-03-14 23:39:33 +010015424 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015425 esac
15426done
15427
Martin v. Löwiseba40652007-08-30 20:10:57 +000015428
Martin v. Löwis11437992002-04-12 09:54:03 +000015429# If the user did not use the arguments to specify the items to instantiate,
15430# then the envvar interface is used. Set only those that are not.
15431# We use the long form for the default assignment because of an extremely
15432# bizarre bug on SunOS 4.1.3.
15433if $ac_need_defaults; then
15434 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15435 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
15436fi
15437
Skip Montanaro6dead952003-09-25 14:50:04 +000015438# Have a temporary directory for convenience. Make it in the build tree
Martin v. Löwiseba40652007-08-30 20:10:57 +000015439# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000015440# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015441# Hook for its removal unless debugging.
15442# Note that there is a small window in which the directory will not be cleaned:
15443# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000015444$debug ||
15445{
Matthias Klose3cef2a92012-03-14 23:39:33 +010015446 tmp= ac_tmp=
Martin v. Löwiseba40652007-08-30 20:10:57 +000015447 trap 'exit_status=$?
Matthias Klose3cef2a92012-03-14 23:39:33 +010015448 : "${ac_tmp:=$tmp}"
15449 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +000015450' 0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015451 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000015452}
Martin v. Löwis11437992002-04-12 09:54:03 +000015453# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000015454
Martin v. Löwis11437992002-04-12 09:54:03 +000015455{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015456 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Matthias Klose3cef2a92012-03-14 23:39:33 +010015457 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000015458} ||
15459{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015460 tmp=./conf$$-$RANDOM
15461 (umask 077 && mkdir "$tmp")
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015462} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Matthias Klose3cef2a92012-03-14 23:39:33 +010015463ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000015464
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015465# Set up the scripts for CONFIG_FILES section.
15466# No need to generate them if there are no CONFIG_FILES.
15467# This happens for instance with `./config.status config.h'.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015468if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015469
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015470
15471ac_cr=`echo X | tr X '\015'`
15472# On cygwin, bash can eat \r inside `` if the user requested igncr.
15473# But we know of no other shell where ac_cr would be empty at this
15474# point, so we can use a bashism as a fallback.
15475if test "x$ac_cr" = x; then
15476 eval ac_cr=\$\'\\r\'
15477fi
15478ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
15479if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015480 ac_cs_awk_cr='\\r'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015481else
15482 ac_cs_awk_cr=$ac_cr
15483fi
15484
Matthias Klose3cef2a92012-03-14 23:39:33 +010015485echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000015486_ACEOF
15487
Martin v. Löwiseba40652007-08-30 20:10:57 +000015488
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015489{
15490 echo "cat >conf$$subs.awk <<_ACEOF" &&
15491 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
15492 echo "_ACEOF"
15493} >conf$$subs.sh ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015494 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15495ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015496ac_delim='%!_!# '
15497for ac_last_try in false false false false false :; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015498 . ./conf$$subs.sh ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015499 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015500
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015501 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
15502 if test $ac_delim_n = $ac_delim_num; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015503 break
15504 elif $ac_last_try; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015505 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015506 else
15507 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000015508 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015509done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015510rm -f conf$$subs.sh
Martin v. Löwiseba40652007-08-30 20:10:57 +000015511
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015512cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Matthias Klose3cef2a92012-03-14 23:39:33 +010015513cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000015514_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015515sed -n '
15516h
15517s/^/S["/; s/!.*/"]=/
15518p
15519g
15520s/^[^!]*!//
15521:repl
15522t repl
15523s/'"$ac_delim"'$//
15524t delim
15525:nl
15526h
15527s/\(.\{148\}\)..*/\1/
15528t more1
15529s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
15530p
15531n
15532b repl
15533:more1
15534s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15535p
15536g
15537s/.\{148\}//
15538t nl
15539:delim
15540h
15541s/\(.\{148\}\)..*/\1/
15542t more2
15543s/["\\]/\\&/g; s/^/"/; s/$/"/
15544p
15545b
15546:more2
15547s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15548p
15549g
15550s/.\{148\}//
15551t delim
15552' <conf$$subs.awk | sed '
15553/^[^""]/{
15554 N
15555 s/\n//
15556}
15557' >>$CONFIG_STATUS || ac_write_fail=1
15558rm -f conf$$subs.awk
15559cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15560_ACAWK
Matthias Klose3cef2a92012-03-14 23:39:33 +010015561cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015562 for (key in S) S_is_set[key] = 1
15563 FS = ""
15564
15565}
15566{
15567 line = $ 0
15568 nfields = split(line, field, "@")
15569 substed = 0
15570 len = length(field[1])
15571 for (i = 2; i < nfields; i++) {
15572 key = field[i]
15573 keylen = length(key)
15574 if (S_is_set[key]) {
15575 value = S[key]
15576 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
15577 len += length(value) + length(field[++i])
15578 substed = 1
15579 } else
15580 len += 1 + keylen
15581 }
15582
15583 print line
15584}
15585
15586_ACAWK
Martin v. Löwiseba40652007-08-30 20:10:57 +000015587_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015588cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15589if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
15590 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
15591else
15592 cat
Matthias Klose3cef2a92012-03-14 23:39:33 +010015593fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015594 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015595_ACEOF
15596
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015597# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
15598# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Martin v. Löwiseba40652007-08-30 20:10:57 +000015599# trailing colons and then remove the whole line if VPATH becomes empty
15600# (actually we leave an empty line to preserve line numbers).
15601if test "x$srcdir" = x.; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015602 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
15603h
15604s///
15605s/^/:/
15606s/[ ]*$/:/
15607s/:\$(srcdir):/:/g
15608s/:\${srcdir}:/:/g
15609s/:@srcdir@:/:/g
15610s/^:*//
Martin v. Löwiseba40652007-08-30 20:10:57 +000015611s/:*$//
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015612x
15613s/\(=[ ]*\).*/\1/
15614G
15615s/\n//
Martin v. Löwiseba40652007-08-30 20:10:57 +000015616s/^[^=]*=[ ]*$//
15617}'
15618fi
15619
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015620cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015621fi # test -n "$CONFIG_FILES"
15622
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015623# Set up the scripts for CONFIG_HEADERS section.
15624# No need to generate them if there are no CONFIG_HEADERS.
15625# This happens for instance with `./config.status Makefile'.
15626if test -n "$CONFIG_HEADERS"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +010015627cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015628BEGIN {
15629_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000015630
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015631# Transform confdefs.h into an awk script `defines.awk', embedded as
15632# here-document in config.status, that substitutes the proper values into
15633# config.h.in to produce config.h.
15634
15635# Create a delimiter string that does not exist in confdefs.h, to ease
15636# handling of long lines.
15637ac_delim='%!_!# '
15638for ac_last_try in false false :; do
Matthias Klose3cef2a92012-03-14 23:39:33 +010015639 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
15640 if test -z "$ac_tt"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015641 break
15642 elif $ac_last_try; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015643 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015644 else
15645 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
15646 fi
15647done
15648
15649# For the awk script, D is an array of macro values keyed by name,
15650# likewise P contains macro parameters if any. Preserve backslash
15651# newline sequences.
15652
15653ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
15654sed -n '
15655s/.\{148\}/&'"$ac_delim"'/g
15656t rset
15657:rset
15658s/^[ ]*#[ ]*define[ ][ ]*/ /
15659t def
15660d
15661:def
15662s/\\$//
15663t bsnl
15664s/["\\]/\\&/g
15665s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
15666D["\1"]=" \3"/p
15667s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
15668d
15669:bsnl
15670s/["\\]/\\&/g
15671s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
15672D["\1"]=" \3\\\\\\n"\\/p
15673t cont
15674s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
15675t cont
15676d
15677:cont
15678n
15679s/.\{148\}/&'"$ac_delim"'/g
15680t clear
15681:clear
15682s/\\$//
15683t bsnlc
15684s/["\\]/\\&/g; s/^/"/; s/$/"/p
15685d
15686:bsnlc
15687s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
15688b cont
15689' <confdefs.h | sed '
15690s/'"$ac_delim"'/"\\\
15691"/g' >>$CONFIG_STATUS || ac_write_fail=1
15692
15693cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15694 for (key in D) D_is_set[key] = 1
15695 FS = ""
15696}
15697/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
15698 line = \$ 0
15699 split(line, arg, " ")
15700 if (arg[1] == "#") {
15701 defundef = arg[2]
15702 mac1 = arg[3]
15703 } else {
15704 defundef = substr(arg[1], 2)
15705 mac1 = arg[2]
15706 }
15707 split(mac1, mac2, "(") #)
15708 macro = mac2[1]
15709 prefix = substr(line, 1, index(line, defundef) - 1)
15710 if (D_is_set[macro]) {
15711 # Preserve the white space surrounding the "#".
15712 print prefix "define", macro P[macro] D[macro]
15713 next
15714 } else {
15715 # Replace #undef with comments. This is necessary, for example,
15716 # in the case of _POSIX_SOURCE, which is predefined and required
15717 # on some systems where configure will not decide to define it.
15718 if (defundef == "undef") {
15719 print "/*", prefix defundef, macro, "*/"
15720 next
15721 }
15722 }
15723}
15724{ print }
15725_ACAWK
15726_ACEOF
15727cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015728 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015729fi # test -n "$CONFIG_HEADERS"
15730
15731
15732eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
15733shift
15734for ac_tag
Martin v. Löwiseba40652007-08-30 20:10:57 +000015735do
15736 case $ac_tag in
15737 :[FHLC]) ac_mode=$ac_tag; continue;;
15738 esac
15739 case $ac_mode$ac_tag in
15740 :[FHL]*:*);;
Matthias Klose3cef2a92012-03-14 23:39:33 +010015741 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015742 :[FH]-) ac_tag=-:-;;
15743 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
15744 esac
15745 ac_save_IFS=$IFS
15746 IFS=:
15747 set x $ac_tag
15748 IFS=$ac_save_IFS
15749 shift
15750 ac_file=$1
15751 shift
15752
15753 case $ac_mode in
15754 :L) ac_source=$1;;
15755 :[FH])
15756 ac_file_inputs=
15757 for ac_f
15758 do
15759 case $ac_f in
Matthias Klose3cef2a92012-03-14 23:39:33 +010015760 -) ac_f="$ac_tmp/stdin";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015761 *) # Look for the file first in the build tree, then in the source tree
15762 # (if the path is not absolute). The absolute path cannot be DOS-style,
15763 # because $ac_f cannot contain `:'.
15764 test -f "$ac_f" ||
15765 case $ac_f in
15766 [\\/$]*) false;;
15767 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
15768 esac ||
Matthias Klose3cef2a92012-03-14 23:39:33 +010015769 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015770 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015771 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
15772 as_fn_append ac_file_inputs " '$ac_f'"
Martin v. Löwiseba40652007-08-30 20:10:57 +000015773 done
15774
15775 # Let's still pretend it is `configure' which instantiates (i.e., don't
15776 # use $as_me), people would be surprised to read:
15777 # /* config.h. Generated by config.status. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015778 configure_input='Generated from '`
15779 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
15780 `' by configure.'
Martin v. Löwiseba40652007-08-30 20:10:57 +000015781 if test x"$ac_file" != x-; then
15782 configure_input="$ac_file. $configure_input"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015783 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
15784$as_echo "$as_me: creating $ac_file" >&6;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000015785 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015786 # Neutralize special characters interpreted by sed in replacement strings.
15787 case $configure_input in #(
15788 *\&* | *\|* | *\\* )
15789 ac_sed_conf_input=`$as_echo "$configure_input" |
15790 sed 's/[\\\\&|]/\\\\&/g'`;; #(
15791 *) ac_sed_conf_input=$configure_input;;
15792 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000015793
15794 case $ac_tag in
Matthias Klose3cef2a92012-03-14 23:39:33 +010015795 *:-:* | *:-) cat >"$ac_tmp/stdin" \
15796 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015797 esac
15798 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015799 esac
15800
Martin v. Löwiseba40652007-08-30 20:10:57 +000015801 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000015802$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015803 X"$ac_file" : 'X\(//\)[^/]' \| \
15804 X"$ac_file" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000015805 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015806$as_echo X"$ac_file" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000015807 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15808 s//\1/
15809 q
15810 }
15811 /^X\(\/\/\)[^/].*/{
15812 s//\1/
15813 q
15814 }
15815 /^X\(\/\/\)$/{
15816 s//\1/
15817 q
15818 }
15819 /^X\(\/\).*/{
15820 s//\1/
15821 q
15822 }
15823 s/.*/./; q'`
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015824 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000015825 ac_builddir=.
15826
Martin v. Löwiseba40652007-08-30 20:10:57 +000015827case "$ac_dir" in
15828.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
15829*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015830 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015831 # A ".." for each directory in $ac_dir_suffix.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015832 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015833 case $ac_top_builddir_sub in
15834 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
15835 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
15836 esac ;;
15837esac
15838ac_abs_top_builddir=$ac_pwd
15839ac_abs_builddir=$ac_pwd$ac_dir_suffix
15840# for backward compatibility:
15841ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000015842
15843case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +000015844 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000015845 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015846 ac_top_srcdir=$ac_top_builddir_sub
15847 ac_abs_top_srcdir=$ac_pwd ;;
15848 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000015849 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015850 ac_top_srcdir=$srcdir
15851 ac_abs_top_srcdir=$srcdir ;;
15852 *) # Relative name.
15853 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
15854 ac_top_srcdir=$ac_top_build_prefix$srcdir
15855 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015856esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000015857ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000015858
Martin v. Löwis11437992002-04-12 09:54:03 +000015859
Martin v. Löwiseba40652007-08-30 20:10:57 +000015860 case $ac_mode in
15861 :F)
15862 #
15863 # CONFIG_FILE
15864 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015865
15866 case $INSTALL in
15867 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015868 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015869 esac
Trent Nelsonf6407a12012-08-30 14:56:13 +000015870 ac_MKDIR_P=$MKDIR_P
15871 case $MKDIR_P in
15872 [\\/$]* | ?:[\\/]* ) ;;
15873 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
15874 esac
Brett Cannon19fab762007-06-02 03:02:29 +000015875_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000015876
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015877cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015878# If the template does not know about datarootdir, expand it.
15879# FIXME: This hack should be removed a few years after 2.60.
15880ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015881ac_sed_dataroot='
15882/datarootdir/ {
Martin v. Löwiseba40652007-08-30 20:10:57 +000015883 p
15884 q
15885}
15886/@datadir@/p
15887/@docdir@/p
15888/@infodir@/p
15889/@localedir@/p
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015890/@mandir@/p'
15891case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Martin v. Löwiseba40652007-08-30 20:10:57 +000015892*datarootdir*) ac_datarootdir_seen=yes;;
15893*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015894 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
15895$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000015896_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015897cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015898 ac_datarootdir_hack='
15899 s&@datadir@&$datadir&g
15900 s&@docdir@&$docdir&g
15901 s&@infodir@&$infodir&g
15902 s&@localedir@&$localedir&g
15903 s&@mandir@&$mandir&g
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015904 s&\\\${datarootdir}&$datarootdir&g' ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015905esac
15906_ACEOF
15907
15908# Neutralize VPATH when `$srcdir' = `.'.
15909# Shell code in configure.ac might set extrasub.
15910# FIXME: do we really want to maintain this feature?
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015911cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15912ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000015913$extrasub
15914_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015915cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015916:t
15917/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015918s|@configure_input@|$ac_sed_conf_input|;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000015919s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015920s&@top_build_prefix@&$ac_top_build_prefix&;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000015921s&@srcdir@&$ac_srcdir&;t t
15922s&@abs_srcdir@&$ac_abs_srcdir&;t t
15923s&@top_srcdir@&$ac_top_srcdir&;t t
15924s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
15925s&@builddir@&$ac_builddir&;t t
15926s&@abs_builddir@&$ac_abs_builddir&;t t
15927s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
15928s&@INSTALL@&$ac_INSTALL&;t t
Trent Nelsonf6407a12012-08-30 14:56:13 +000015929s&@MKDIR_P@&$ac_MKDIR_P&;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000015930$ac_datarootdir_hack
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015931"
Matthias Klose3cef2a92012-03-14 23:39:33 +010015932eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
15933 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015934
Martin v. Löwiseba40652007-08-30 20:10:57 +000015935test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Matthias Klose3cef2a92012-03-14 23:39:33 +010015936 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
15937 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
15938 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015939 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015940which seems to be undefined. Please make sure it is defined" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015941$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015942which seems to be undefined. Please make sure it is defined" >&2;}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015943
Matthias Klose3cef2a92012-03-14 23:39:33 +010015944 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000015945 case $ac_file in
Matthias Klose3cef2a92012-03-14 23:39:33 +010015946 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
15947 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015948 esac \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015949 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015950 ;;
15951 :H)
15952 #
15953 # CONFIG_HEADER
15954 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015955 if test x"$ac_file" != x-; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015956 {
15957 $as_echo "/* $configure_input */" \
Matthias Klose3cef2a92012-03-14 23:39:33 +010015958 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
15959 } >"$ac_tmp/config.h" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015960 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Matthias Klose3cef2a92012-03-14 23:39:33 +010015961 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015962 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
15963$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015964 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015965 rm -f "$ac_file"
Matthias Klose3cef2a92012-03-14 23:39:33 +010015966 mv "$ac_tmp/config.h" "$ac_file" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015967 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015968 fi
15969 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015970 $as_echo "/* $configure_input */" \
Matthias Klose3cef2a92012-03-14 23:39:33 +010015971 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015972 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015973 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015974 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015975
Martin v. Löwiseba40652007-08-30 20:10:57 +000015976
15977 esac
15978
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000015979
15980 case $ac_file$ac_mode in
15981 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
15982
15983 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000015984done # for ac_tag
15985
Guido van Rossum627b2d71993-12-24 10:39:16 +000015986
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015987as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000015988_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015989ac_clean_files=$ac_clean_files_save
15990
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015991test $ac_write_fail = 0 ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015992 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015993
Martin v. Löwis11437992002-04-12 09:54:03 +000015994
15995# configure is writing to config.log, and then calls config.status.
15996# config.status does its own redirection, appending to config.log.
15997# Unfortunately, on DOS this fails, as config.log is still kept open
15998# by configure, so config.status won't be able to write to it; its
15999# output is simply discarded. So we exec the FD to /dev/null,
16000# effectively closing config.log, so it can be properly (re)opened and
16001# appended to by config.status. When coming back to configure, we
16002# need to make the FD available again.
16003if test "$no_create" != yes; then
16004 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000016005 ac_config_status_args=
16006 test "$silent" = yes &&
16007 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000016008 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000016009 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000016010 exec 5>>config.log
16011 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16012 # would make configure fail if this is the last instruction.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016013 $ac_cs_success || as_fn_exit 1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016014fi
16015if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
16016 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
16017$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016018fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000016019
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016020
Martin v. Löwisf7afe952006-04-14 15:16:15 +000016021echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016022if test ! -f Modules/Setup
16023then
16024 cp $srcdir/Modules/Setup.dist Modules/Setup
16025fi
16026
Martin v. Löwisf7afe952006-04-14 15:16:15 +000016027echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016028if test ! -f Modules/Setup.local
16029then
16030 echo "# Edit this file for local setup changes" >Modules/Setup.local
16031fi
16032
16033echo "creating Makefile"
16034$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
16035 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000016036 Modules/Setup.local Modules/Setup
Skip Montanaro89e975f2007-08-22 19:05:21 +000016037
16038case $ac_sys_system in
16039BeOS)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016040 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000016041
16042 Support for BeOS is deprecated as of Python 2.6.
16043 See PEP 11 for the gory details.
16044 " >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016045$as_echo "$as_me: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000016046
16047 Support for BeOS is deprecated as of Python 2.6.
16048 See PEP 11 for the gory details.
16049 " >&2;}
16050 ;;
16051*) ;;
16052esac
16053
Neil Schemenauerc761fc82001-02-19 04:50:49 +000016054mv config.c Modules