blob: 19e3782d6198208e8eba10953bc4469d6add723d [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#
Benjamin Petersoncc8929b2016-08-03 22:01:32 -07006# Report bugs to <https://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
Benjamin Petersoncc8929b2016-08-03 22:01:32 -0700271$0: https://bugs.python.org/ about your system, including
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000272$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'
Benjamin Petersoncc8929b2016-08-03 22:01:32 -0700586PACKAGE_BUGREPORT='https://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
Brett Cannon4ff151a2015-09-18 15:09:42 -0700664LLVM_PROF_FOUND
Gregory P. Smith794b2912016-09-08 00:07:40 -0700665target_os
666target_vendor
667target_cpu
668target
669LLVM_PROFDATA
Brett Cannon4ff151a2015-09-18 15:09:42 -0700670LLVM_PROF_ERR
671LLVM_PROF_FILE
672LLVM_PROF_MERGER
673PGO_PROF_USE_FLAG
674PGO_PROF_GEN_FLAG
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)c543a0f2016-06-02 23:44:40 +0000675LTOFLAGS
Gregory P. Smith6d8fdfc2016-09-07 23:28:23 -0700676DEF_MAKE_RULE
677DEF_MAKE_ALL_RULE
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000678UNIVERSAL_ARCH_FLAGS
679BASECFLAGS
680OPT
681LN
Trent Nelsonf6407a12012-08-30 14:56:13 +0000682MKDIR_P
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000683INSTALL_DATA
684INSTALL_SCRIPT
685INSTALL_PROGRAM
Georg Brandl3a5508e2011-03-06 10:42:21 +0100686HAS_HG
687HGBRANCH
688HGTAG
689HGVERSION
Trent Nelsond86ceec2012-10-16 09:42:45 -0400690BASECPPFLAGS
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000691SVNVERSION
692ARFLAGS
doko@python.orgd65e2ba2013-01-31 23:52:03 +0100693ac_ct_AR
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000694AR
695RANLIB
696GNULD
697LINKCC
698RUNSHARED
699INSTSONAME
700LDLIBRARYDIR
701BLDLIBRARY
702DLLLIBRARY
703LDLIBRARY
704LIBRARY
705BUILDEXEEXT
706EGREP
707GREP
708CPP
doko@python.org4e63fbe2013-01-25 13:08:27 +0100709MULTIARCH
doko@python.orgd65e2ba2013-01-31 23:52:03 +0100710ac_ct_CXX
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000711MAINCC
712CXX
713OBJEXT
714EXEEXT
715ac_ct_CC
716CPPFLAGS
717LDFLAGS
718CFLAGS
719CC
720EXPORT_MACOSX_DEPLOYMENT_TARGET
721CONFIGURE_MACOSX_DEPLOYMENT_TARGET
722EXTRAMACHDEPPATH
723EXTRAPLATDIR
doko@ubuntu.coma50b0de2015-04-13 21:55:59 +0200724PLATDIR
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000725SGI_ABI
doko@python.orgd65e2ba2013-01-31 23:52:03 +0100726_PYTHON_HOST_PLATFORM
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000727MACHDEP
728FRAMEWORKINSTALLAPPSPREFIX
729FRAMEWORKUNIXTOOLSPREFIX
730FRAMEWORKALTINSTALLLAST
731FRAMEWORKALTINSTALLFIRST
732FRAMEWORKINSTALLLAST
733FRAMEWORKINSTALLFIRST
734PYTHONFRAMEWORKINSTALLDIR
735PYTHONFRAMEWORKPREFIX
736PYTHONFRAMEWORKDIR
737PYTHONFRAMEWORKIDENTIFIER
738PYTHONFRAMEWORK
739LIPO_32BIT_FLAGS
740ARCH_RUN_32BIT
741UNIVERSALSDK
742CONFIG_ARGS
743SOVERSION
744VERSION
Martin Panterbc82de02016-07-29 05:52:32 +0000745GENERATED_COMMENT
doko@python.orgd65e2ba2013-01-31 23:52:03 +0100746PYTHON_FOR_BUILD
747host_os
748host_vendor
749host_cpu
750host
751build_os
752build_vendor
753build_cpu
754build
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000755target_alias
756host_alias
757build_alias
758LIBS
759ECHO_T
760ECHO_N
761ECHO_C
762DEFS
763mandir
764localedir
765libdir
766psdir
767pdfdir
768dvidir
769htmldir
770infodir
771docdir
772oldincludedir
773includedir
Benjamin Peterson42e10292016-07-07 00:02:31 -0700774runstatedir
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000775localstatedir
776sharedstatedir
777sysconfdir
778datadir
779datarootdir
780libexecdir
781sbindir
782bindir
783program_transform_name
784prefix
785exec_prefix
786PACKAGE_URL
787PACKAGE_BUGREPORT
788PACKAGE_STRING
789PACKAGE_VERSION
790PACKAGE_TARNAME
791PACKAGE_NAME
792PATH_SEPARATOR
793SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000794ac_subst_files=''
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000795ac_user_opts='
796enable_option_checking
797enable_universalsdk
798with_universal_archs
799with_framework_name
800enable_framework
801with_gcc
Zachary Ware6ed42ea2015-12-21 11:43:03 -0600802with_icc
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000803with_cxx_main
804with_suffix
805enable_shared
806enable_profiling
807with_pydebug
Gregory P. Smith6d8fdfc2016-09-07 23:28:23 -0700808with_optimizations
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)c543a0f2016-06-02 23:44:40 +0000809with_lto
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000810enable_toolbox_glue
811with_libs
812with_system_expat
813with_system_ffi
Ned Deilya2a9f572013-10-25 00:30:10 -0700814with_tcltk_includes
815with_tcltk_libs
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000816with_dbmliborder
817with_signal_module
818with_dec_threads
819with_threads
820with_thread
821with_pth
822enable_ipv6
823with_doc_strings
824with_tsc
825with_pymalloc
826with_valgrind
827with_wctype_functions
828with_fpectl
829with_libm
830with_libc
831enable_big_digits
832enable_unicode
Benjamin Peterson2c992a02015-05-28 12:45:31 -0500833with_computed_gotos
Ned Deily3f1d0b32014-11-20 02:11:03 -0800834with_ensurepip
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000835'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000836 ac_precious_vars='build_alias
837host_alias
838target_alias
839CC
840CFLAGS
841LDFLAGS
842LIBS
843CPPFLAGS
Benjamin Peterson64e8f6e2014-12-15 00:00:23 -0500844CPP
845PKG_CONFIG
846PKG_CONFIG_PATH
847PKG_CONFIG_LIBDIR'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000848
Guido van Rossum627b2d71993-12-24 10:39:16 +0000849
Guido van Rossum7f43da71994-08-01 12:15:30 +0000850# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000851ac_init_help=
852ac_init_version=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000853ac_unrecognized_opts=
854ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000855# The variables have the same names as the options, with
856# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000857cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000858exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000859no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000860no_recursion=
861prefix=NONE
862program_prefix=NONE
863program_suffix=NONE
864program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000865silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000866site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000867srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000868verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000869x_includes=NONE
870x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000871
872# Installation directory options.
873# These are left unexpanded so users can "make install exec_prefix=/foo"
874# and all the variables that are supposed to be based on exec_prefix
875# by default will actually change.
876# Use braces instead of parens because sh, perl, etc. also accept them.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000877# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000878bindir='${exec_prefix}/bin'
879sbindir='${exec_prefix}/sbin'
880libexecdir='${exec_prefix}/libexec'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000881datarootdir='${prefix}/share'
882datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000883sysconfdir='${prefix}/etc'
884sharedstatedir='${prefix}/com'
885localstatedir='${prefix}/var'
Benjamin Peterson42e10292016-07-07 00:02:31 -0700886runstatedir='${localstatedir}/run'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000887includedir='${prefix}/include'
888oldincludedir='/usr/include'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000889docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
890infodir='${datarootdir}/info'
891htmldir='${docdir}'
892dvidir='${docdir}'
893pdfdir='${docdir}'
894psdir='${docdir}'
895libdir='${exec_prefix}/lib'
896localedir='${datarootdir}/locale'
897mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000898
Guido van Rossum7f43da71994-08-01 12:15:30 +0000899ac_prev=
Martin v. Löwiseba40652007-08-30 20:10:57 +0000900ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000901for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000902do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000903 # If the previous option needs an argument, assign it.
904 if test -n "$ac_prev"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +0000905 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000906 ac_prev=
907 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000908 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000909
Martin v. Löwiseba40652007-08-30 20:10:57 +0000910 case $ac_option in
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000911 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
912 *=) ac_optarg= ;;
913 *) ac_optarg=yes ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000914 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000915
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000916 # Accept the important Cygnus configure options, so we can diagnose typos.
917
Martin v. Löwiseba40652007-08-30 20:10:57 +0000918 case $ac_dashdash$ac_option in
919 --)
920 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000921
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000922 -bindir | --bindir | --bindi | --bind | --bin | --bi)
923 ac_prev=bindir ;;
924 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000925 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000926
927 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000928 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000929 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000930 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000931
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000932 -cache-file | --cache-file | --cache-fil | --cache-fi \
933 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
934 ac_prev=cache_file ;;
935 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
936 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000937 cache_file=$ac_optarg ;;
938
939 --config-cache | -C)
940 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000941
Martin v. Löwiseba40652007-08-30 20:10:57 +0000942 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000943 ac_prev=datadir ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000944 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000945 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000946
Martin v. Löwiseba40652007-08-30 20:10:57 +0000947 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
948 | --dataroo | --dataro | --datar)
949 ac_prev=datarootdir ;;
950 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
951 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
952 datarootdir=$ac_optarg ;;
953
Guido van Rossum7f43da71994-08-01 12:15:30 +0000954 -disable-* | --disable-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000955 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000956 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000957 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000958 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000959 ac_useropt_orig=$ac_useropt
960 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
961 case $ac_user_opts in
962 *"
963"enable_$ac_useropt"
964"*) ;;
965 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
966 ac_unrecognized_sep=', ';;
967 esac
968 eval enable_$ac_useropt=no ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000969
970 -docdir | --docdir | --docdi | --doc | --do)
971 ac_prev=docdir ;;
972 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
973 docdir=$ac_optarg ;;
974
975 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
976 ac_prev=dvidir ;;
977 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
978 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000979
980 -enable-* | --enable-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000981 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000982 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000983 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000984 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000985 ac_useropt_orig=$ac_useropt
986 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
987 case $ac_user_opts in
988 *"
989"enable_$ac_useropt"
990"*) ;;
991 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
992 ac_unrecognized_sep=', ';;
993 esac
994 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000995
Guido van Rossum7f43da71994-08-01 12:15:30 +0000996 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
997 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
998 | --exec | --exe | --ex)
999 ac_prev=exec_prefix ;;
1000 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1001 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1002 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001003 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001004
1005 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001006 # Obsolete; use --with-gas.
1007 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001008
Martin v. Löwis11437992002-04-12 09:54:03 +00001009 -help | --help | --hel | --he | -h)
1010 ac_init_help=long ;;
1011 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1012 ac_init_help=recursive ;;
1013 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1014 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001015
1016 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001017 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001018 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001019 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001020
Martin v. Löwiseba40652007-08-30 20:10:57 +00001021 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1022 ac_prev=htmldir ;;
1023 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1024 | --ht=*)
1025 htmldir=$ac_optarg ;;
1026
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001027 -includedir | --includedir | --includedi | --included | --include \
1028 | --includ | --inclu | --incl | --inc)
1029 ac_prev=includedir ;;
1030 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1031 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001032 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001033
1034 -infodir | --infodir | --infodi | --infod | --info | --inf)
1035 ac_prev=infodir ;;
1036 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001037 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001038
1039 -libdir | --libdir | --libdi | --libd)
1040 ac_prev=libdir ;;
1041 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001042 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001043
1044 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1045 | --libexe | --libex | --libe)
1046 ac_prev=libexecdir ;;
1047 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1048 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001049 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001050
Martin v. Löwiseba40652007-08-30 20:10:57 +00001051 -localedir | --localedir | --localedi | --localed | --locale)
1052 ac_prev=localedir ;;
1053 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1054 localedir=$ac_optarg ;;
1055
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001056 -localstatedir | --localstatedir | --localstatedi | --localstated \
Martin v. Löwiseba40652007-08-30 20:10:57 +00001057 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001058 ac_prev=localstatedir ;;
1059 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Martin v. Löwiseba40652007-08-30 20:10:57 +00001060 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001061 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001062
1063 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1064 ac_prev=mandir ;;
1065 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001066 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001067
Guido van Rossum7f43da71994-08-01 12:15:30 +00001068 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001069 # Obsolete; use --without-fp.
1070 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001071
1072 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001073 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001074 no_create=yes ;;
1075
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001076 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1077 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1078 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001079
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001080 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1081 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1082 | --oldin | --oldi | --old | --ol | --o)
1083 ac_prev=oldincludedir ;;
1084 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1085 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1086 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001087 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001088
Guido van Rossum7f43da71994-08-01 12:15:30 +00001089 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1090 ac_prev=prefix ;;
1091 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001092 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001093
1094 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1095 | --program-pre | --program-pr | --program-p)
1096 ac_prev=program_prefix ;;
1097 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1098 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001099 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001100
1101 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1102 | --program-suf | --program-su | --program-s)
1103 ac_prev=program_suffix ;;
1104 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1105 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001106 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001107
1108 -program-transform-name | --program-transform-name \
1109 | --program-transform-nam | --program-transform-na \
1110 | --program-transform-n | --program-transform- \
1111 | --program-transform | --program-transfor \
1112 | --program-transfo | --program-transf \
1113 | --program-trans | --program-tran \
1114 | --progr-tra | --program-tr | --program-t)
1115 ac_prev=program_transform_name ;;
1116 -program-transform-name=* | --program-transform-name=* \
1117 | --program-transform-nam=* | --program-transform-na=* \
1118 | --program-transform-n=* | --program-transform-=* \
1119 | --program-transform=* | --program-transfor=* \
1120 | --program-transfo=* | --program-transf=* \
1121 | --program-trans=* | --program-tran=* \
1122 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001123 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001124
Martin v. Löwiseba40652007-08-30 20:10:57 +00001125 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1126 ac_prev=pdfdir ;;
1127 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1128 pdfdir=$ac_optarg ;;
1129
1130 -psdir | --psdir | --psdi | --psd | --ps)
1131 ac_prev=psdir ;;
1132 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1133 psdir=$ac_optarg ;;
1134
Guido van Rossum7f43da71994-08-01 12:15:30 +00001135 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1136 | -silent | --silent | --silen | --sile | --sil)
1137 silent=yes ;;
1138
Benjamin Peterson42e10292016-07-07 00:02:31 -07001139 -runstatedir | --runstatedir | --runstatedi | --runstated \
1140 | --runstate | --runstat | --runsta | --runst | --runs \
1141 | --run | --ru | --r)
1142 ac_prev=runstatedir ;;
1143 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1144 | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1145 | --run=* | --ru=* | --r=*)
1146 runstatedir=$ac_optarg ;;
1147
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001148 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1149 ac_prev=sbindir ;;
1150 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1151 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001152 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001153
1154 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1155 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1156 | --sharedst | --shareds | --shared | --share | --shar \
1157 | --sha | --sh)
1158 ac_prev=sharedstatedir ;;
1159 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1160 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1161 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1162 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001163 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001164
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001165 -site | --site | --sit)
1166 ac_prev=site ;;
1167 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001168 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001169
Guido van Rossum7f43da71994-08-01 12:15:30 +00001170 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1171 ac_prev=srcdir ;;
1172 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001173 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001174
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001175 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1176 | --syscon | --sysco | --sysc | --sys | --sy)
1177 ac_prev=sysconfdir ;;
1178 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1179 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001180 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001181
Guido van Rossum7f43da71994-08-01 12:15:30 +00001182 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001183 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001184 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001185 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001186
1187 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1188 verbose=yes ;;
1189
Martin v. Löwis11437992002-04-12 09:54:03 +00001190 -version | --version | --versio | --versi | --vers | -V)
1191 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001192
1193 -with-* | --with-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001194 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001195 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001196 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001197 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001198 ac_useropt_orig=$ac_useropt
1199 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1200 case $ac_user_opts in
1201 *"
1202"with_$ac_useropt"
1203"*) ;;
1204 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1205 ac_unrecognized_sep=', ';;
1206 esac
1207 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001208
1209 -without-* | --without-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001210 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001211 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001212 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001213 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001214 ac_useropt_orig=$ac_useropt
1215 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1216 case $ac_user_opts in
1217 *"
1218"with_$ac_useropt"
1219"*) ;;
1220 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1221 ac_unrecognized_sep=', ';;
1222 esac
1223 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001224
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001225 --x)
1226 # Obsolete; use --with-x.
1227 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001228
1229 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1230 | --x-incl | --x-inc | --x-in | --x-i)
1231 ac_prev=x_includes ;;
1232 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1233 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001234 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001235
1236 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1237 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1238 ac_prev=x_libraries ;;
1239 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1240 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001241 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001242
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001243 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1244Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001245 ;;
1246
Martin v. Löwis11437992002-04-12 09:54:03 +00001247 *=*)
1248 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1249 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001250 case $ac_envvar in #(
1251 '' | [0-9]* | *[!_$as_cr_alnum]* )
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001252 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001253 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001254 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001255 export $ac_envvar ;;
1256
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001257 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001258 # FIXME: should be removed in autoconf 3.0.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001259 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001260 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001261 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Matthias Klose3cef2a92012-03-14 23:39:33 +01001262 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001263 ;;
1264
1265 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001266done
1267
Guido van Rossum7f43da71994-08-01 12:15:30 +00001268if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001269 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001270 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001271fi
1272
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001273if test -n "$ac_unrecognized_opts"; then
1274 case $enable_option_checking in
1275 no) ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001276 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001277 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1278 esac
1279fi
1280
1281# Check all directory arguments for consistency.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001282for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1283 datadir sysconfdir sharedstatedir localstatedir includedir \
1284 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
Benjamin Peterson42e10292016-07-07 00:02:31 -07001285 libdir localedir mandir runstatedir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001286do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001287 eval ac_val=\$$ac_var
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001288 # Remove trailing slashes.
1289 case $ac_val in
1290 */ )
1291 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1292 eval $ac_var=\$ac_val;;
1293 esac
1294 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001295 case $ac_val in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001296 [\\/$]* | ?:[\\/]* ) continue;;
1297 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001298 esac
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001299 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001300done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001301
Martin v. Löwis11437992002-04-12 09:54:03 +00001302# There might be people who depend on the old broken behavior: `$host'
1303# used to hold the argument of --host etc.
1304# FIXME: To remove some day.
1305build=$build_alias
1306host=$host_alias
1307target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001308
Martin v. Löwis11437992002-04-12 09:54:03 +00001309# FIXME: To remove some day.
1310if test "x$host_alias" != x; then
1311 if test "x$build_alias" = x; then
1312 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001313 elif test "x$build_alias" != "x$host_alias"; then
1314 cross_compiling=yes
1315 fi
1316fi
1317
1318ac_tool_prefix=
1319test -n "$host_alias" && ac_tool_prefix=$host_alias-
1320
1321test "$silent" = yes && exec 6>/dev/null
1322
Guido van Rossum627b2d71993-12-24 10:39:16 +00001323
Martin v. Löwiseba40652007-08-30 20:10:57 +00001324ac_pwd=`pwd` && test -n "$ac_pwd" &&
1325ac_ls_di=`ls -di .` &&
1326ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001327 as_fn_error $? "working directory cannot be determined"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001328test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001329 as_fn_error $? "pwd does not report name of working directory"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001330
1331
Guido van Rossum627b2d71993-12-24 10:39:16 +00001332# Find the source files, if location was not specified.
1333if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001334 ac_srcdir_defaulted=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +00001335 # Try the directory containing this script, then the parent directory.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001336 ac_confdir=`$as_dirname -- "$as_myself" ||
1337$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1338 X"$as_myself" : 'X\(//\)[^/]' \| \
1339 X"$as_myself" : 'X\(//\)$' \| \
1340 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1341$as_echo X"$as_myself" |
Martin v. Löwiseba40652007-08-30 20:10:57 +00001342 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1343 s//\1/
1344 q
1345 }
1346 /^X\(\/\/\)[^/].*/{
1347 s//\1/
1348 q
1349 }
1350 /^X\(\/\/\)$/{
1351 s//\1/
1352 q
1353 }
1354 /^X\(\/\).*/{
1355 s//\1/
1356 q
1357 }
1358 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001359 srcdir=$ac_confdir
Martin v. Löwiseba40652007-08-30 20:10:57 +00001360 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001361 srcdir=..
1362 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001363else
1364 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001365fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001366if test ! -r "$srcdir/$ac_unique_file"; then
1367 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001368 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Brett Cannon19fab762007-06-02 03:02:29 +00001369fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001370ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1371ac_abs_confdir=`(
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001372 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001373 pwd)`
1374# When building in place, set srcdir=.
1375if test "$ac_abs_confdir" = "$ac_pwd"; then
1376 srcdir=.
1377fi
1378# Remove unnecessary trailing slashes from srcdir.
1379# Double slashes in file names in object file debugging info
1380# mess up M-x gdb in Emacs.
1381case $srcdir in
1382*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1383esac
1384for ac_var in $ac_precious_vars; do
1385 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1386 eval ac_env_${ac_var}_value=\$${ac_var}
1387 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1388 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1389done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001390
Martin v. Löwis11437992002-04-12 09:54:03 +00001391#
1392# Report the --help message.
1393#
1394if test "$ac_init_help" = "long"; then
1395 # Omit some internal or obsolete options to make the list less imposing.
1396 # This message is too long to be a string in the A/UX 3.1 sh.
1397 cat <<_ACEOF
Martin v. Löwis174440b2008-10-03 08:59:41 +00001398\`configure' configures python 2.7 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001399
1400Usage: $0 [OPTION]... [VAR=VALUE]...
1401
1402To assign environment variables (e.g., CC, CFLAGS...), specify them as
1403VAR=VALUE. See below for descriptions of some of the useful variables.
1404
1405Defaults for the options are specified in brackets.
1406
1407Configuration:
1408 -h, --help display this help and exit
1409 --help=short display options specific to this package
1410 --help=recursive display the short help of all the included packages
1411 -V, --version display version information and exit
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001412 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001413 --cache-file=FILE cache test results in FILE [disabled]
1414 -C, --config-cache alias for \`--cache-file=config.cache'
1415 -n, --no-create do not create output files
1416 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1417
Martin v. Löwis11437992002-04-12 09:54:03 +00001418Installation directories:
1419 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001420 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001421 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001422 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001423
1424By default, \`make install' will install all the files in
1425\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1426an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1427for instance \`--prefix=\$HOME'.
1428
1429For better control, use the options below.
1430
1431Fine tuning of the installation directories:
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001432 --bindir=DIR user executables [EPREFIX/bin]
1433 --sbindir=DIR system admin executables [EPREFIX/sbin]
1434 --libexecdir=DIR program executables [EPREFIX/libexec]
1435 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1436 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1437 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
Benjamin Peterson42e10292016-07-07 00:02:31 -07001438 --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001439 --libdir=DIR object code libraries [EPREFIX/lib]
1440 --includedir=DIR C header files [PREFIX/include]
1441 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1442 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1443 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1444 --infodir=DIR info documentation [DATAROOTDIR/info]
1445 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1446 --mandir=DIR man documentation [DATAROOTDIR/man]
1447 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1448 --htmldir=DIR html documentation [DOCDIR]
1449 --dvidir=DIR dvi documentation [DOCDIR]
1450 --pdfdir=DIR pdf documentation [DOCDIR]
1451 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001452_ACEOF
1453
1454 cat <<\_ACEOF
doko@python.orgd65e2ba2013-01-31 23:52:03 +01001455
1456System types:
1457 --build=BUILD configure for building on BUILD [guessed]
1458 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Gregory P. Smith794b2912016-09-08 00:07:40 -07001459 --target=TARGET configure for building compilers for TARGET [HOST]
Martin v. Löwis11437992002-04-12 09:54:03 +00001460_ACEOF
1461fi
1462
1463if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001464 case $ac_init_help in
Martin v. Löwis174440b2008-10-03 08:59:41 +00001465 short | recursive ) echo "Configuration of python 2.7:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001466 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001467 cat <<\_ACEOF
1468
1469Optional Features:
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001470 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001471 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1472 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Brett Cannon91a1dec2008-02-13 19:15:44 +00001473 --enable-universalsdk[=SDKDIR]
Brett Cannon9a8bb0e2008-02-03 02:07:55 +00001474 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001475 --enable-framework[=INSTALLDIR]
1476 Build (MacOSX|Darwin) framework
1477 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001478 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001479 --enable-toolbox-glue disable/enable MacOSX glue code for extensions
1480 --enable-ipv6 Enable ipv6 (with ipv4) support
1481 --disable-ipv6 Disable ipv6 support
Mark Dickinsonefc82f72009-03-20 15:51:55 +00001482 --enable-big-digits[=BITS]
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001483 use big digits for Python longs [[BITS=30]]
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001484 --enable-unicode[=ucs[24]]
Benjamin Peterson66556b02010-05-25 02:23:32 +00001485 Enable Unicode strings (default is ucs2)
Martin v. Löwis11437992002-04-12 09:54:03 +00001486
1487Optional Packages:
1488 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1489 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001490 --with-universal-archs=ARCH
1491 select architectures for universal build ("32-bit",
Ronald Oussoren23d92532009-09-07 06:12:00 +00001492 "64-bit", "3-way", "intel" or "all")
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001493 --with-framework-name=FRAMEWORK
1494 specify an alternate name of the framework built
1495 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001496 --without-gcc never use gcc
Zachary Ware6ed42ea2015-12-21 11:43:03 -06001497 --with-icc build with icc
Martin v. Löwis0f48d982006-04-14 14:34:26 +00001498 --with-cxx-main=<compiler>
1499 compile main() and link python executable with C++
1500 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001501 --with-suffix=.exe set executable suffix
1502 --with-pydebug build with Py_DEBUG defined
Gregory P. Smith6d8fdfc2016-09-07 23:28:23 -07001503 --with-optimizations Enable all optimizations when available (LTO, PGO,
1504 etc). Disabled by default.
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)c543a0f2016-06-02 23:44:40 +00001505 --with-lto Enable Link Time Optimization in PGO builds.
1506 Disabled by default.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001507 --with-libs='lib1 ...' link against additional libs
Benjamin Peterson2c196742009-12-31 03:17:18 +00001508 --with-system-expat build pyexpat module using an installed expat
1509 library
Martin v. Löwis9176fc12006-04-11 11:12:43 +00001510 --with-system-ffi build _ctypes module using an installed ffi library
Ned Deilya2a9f572013-10-25 00:30:10 -07001511 --with-tcltk-includes='-I...'
1512 override search for Tcl and Tk include files
1513 --with-tcltk-libs='-L...'
1514 override search for Tcl and Tk libs
Benjamin Peterson867475c2009-04-29 20:36:25 +00001515 --with-dbmliborder=db1:db2:...
1516 order to check db backends for dbm. Valid value is a
1517 colon separated string with the backend names
1518 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001519 --with-signal-module disable/enable signal module
1520 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1521 --with(out)-threads[=DIRECTORY]
1522 disable/enable thread support
1523 --with(out)-thread[=DIRECTORY]
1524 deprecated; use --with(out)-threads
1525 --with-pth use GNU pth threading libraries
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001526 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001527 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001528 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00001529 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001530 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001531 --with-fpectl enable SIGFPE catching
1532 --with-libm=STRING math library
1533 --with-libc=STRING C library
Benjamin Peterson2c992a02015-05-28 12:45:31 -05001534 --with(out)-computed-gotos
1535 Use computed gotos in evaluation loop (enabled by
1536 default on supported compilers)
Ned Deily3f1d0b32014-11-20 02:11:03 -08001537 --with(out)-ensurepip=[=OPTION]
1538 "install" or "upgrade" using bundled pip, default is
1539 "no"
Martin v. Löwis11437992002-04-12 09:54:03 +00001540
1541Some influential environment variables:
1542 CC C compiler command
1543 CFLAGS C compiler flags
1544 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1545 nonstandard directory <lib dir>
Martin v. Löwiseba40652007-08-30 20:10:57 +00001546 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001547 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Martin v. Löwiseba40652007-08-30 20:10:57 +00001548 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001549 CPP C preprocessor
Benjamin Peterson64e8f6e2014-12-15 00:00:23 -05001550 PKG_CONFIG path to pkg-config utility
1551 PKG_CONFIG_PATH
1552 directories to add to pkg-config's search path
1553 PKG_CONFIG_LIBDIR
1554 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001555
1556Use these variables to override the choices made by `configure' or to help
1557it to find libraries and programs with nonstandard names/locations.
1558
Benjamin Petersoncc8929b2016-08-03 22:01:32 -07001559Report bugs to <https://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001560_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001561ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001562fi
1563
1564if test "$ac_init_help" = "recursive"; then
1565 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001566 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001567 test -d "$ac_dir" ||
1568 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1569 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001570 ac_builddir=.
1571
Martin v. Löwiseba40652007-08-30 20:10:57 +00001572case "$ac_dir" in
1573.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1574*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001575 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001576 # A ".." for each directory in $ac_dir_suffix.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001577 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001578 case $ac_top_builddir_sub in
1579 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1580 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1581 esac ;;
1582esac
1583ac_abs_top_builddir=$ac_pwd
1584ac_abs_builddir=$ac_pwd$ac_dir_suffix
1585# for backward compatibility:
1586ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001587
1588case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001589 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001590 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001591 ac_top_srcdir=$ac_top_builddir_sub
1592 ac_abs_top_srcdir=$ac_pwd ;;
1593 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001594 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001595 ac_top_srcdir=$srcdir
1596 ac_abs_top_srcdir=$srcdir ;;
1597 *) # Relative name.
1598 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1599 ac_top_srcdir=$ac_top_build_prefix$srcdir
1600 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001601esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001602ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001603
Martin v. Löwiseba40652007-08-30 20:10:57 +00001604 cd "$ac_dir" || { ac_status=$?; continue; }
1605 # Check for guested configure.
1606 if test -f "$ac_srcdir/configure.gnu"; then
1607 echo &&
1608 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1609 elif test -f "$ac_srcdir/configure"; then
1610 echo &&
1611 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001612 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001613 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001614 fi || ac_status=$?
1615 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001616 done
1617fi
1618
Martin v. Löwiseba40652007-08-30 20:10:57 +00001619test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001620if $ac_init_version; then
1621 cat <<\_ACEOF
Martin v. Löwis174440b2008-10-03 08:59:41 +00001622python configure 2.7
Charles-François Natalibe2b9072013-01-08 19:47:00 +01001623generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001624
Charles-François Natalibe2b9072013-01-08 19:47:00 +01001625Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001626This configure script is free software; the Free Software Foundation
1627gives unlimited permission to copy, distribute and modify it.
1628_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001629 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001630fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001631
1632## ------------------------ ##
1633## Autoconf initialization. ##
1634## ------------------------ ##
1635
1636# ac_fn_c_try_compile LINENO
1637# --------------------------
1638# Try to compile conftest.$ac_ext, and return whether this succeeded.
1639ac_fn_c_try_compile ()
1640{
1641 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1642 rm -f conftest.$ac_objext
1643 if { { ac_try="$ac_compile"
1644case "(($ac_try" in
1645 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1646 *) ac_try_echo=$ac_try;;
1647esac
1648eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1649$as_echo "$ac_try_echo"; } >&5
1650 (eval "$ac_compile") 2>conftest.err
1651 ac_status=$?
1652 if test -s conftest.err; then
1653 grep -v '^ *+' conftest.err >conftest.er1
1654 cat conftest.er1 >&5
1655 mv -f conftest.er1 conftest.err
1656 fi
1657 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1658 test $ac_status = 0; } && {
1659 test -z "$ac_c_werror_flag" ||
1660 test ! -s conftest.err
1661 } && test -s conftest.$ac_objext; then :
1662 ac_retval=0
1663else
1664 $as_echo "$as_me: failed program was:" >&5
1665sed 's/^/| /' conftest.$ac_ext >&5
1666
1667 ac_retval=1
1668fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01001669 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001670 as_fn_set_status $ac_retval
1671
1672} # ac_fn_c_try_compile
1673
1674# ac_fn_c_try_cpp LINENO
1675# ----------------------
1676# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1677ac_fn_c_try_cpp ()
1678{
1679 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1680 if { { ac_try="$ac_cpp conftest.$ac_ext"
1681case "(($ac_try" in
1682 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1683 *) ac_try_echo=$ac_try;;
1684esac
1685eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1686$as_echo "$ac_try_echo"; } >&5
1687 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1688 ac_status=$?
1689 if test -s conftest.err; then
1690 grep -v '^ *+' conftest.err >conftest.er1
1691 cat conftest.er1 >&5
1692 mv -f conftest.er1 conftest.err
1693 fi
1694 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001695 test $ac_status = 0; } > conftest.i && {
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001696 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1697 test ! -s conftest.err
1698 }; then :
1699 ac_retval=0
1700else
1701 $as_echo "$as_me: failed program was:" >&5
1702sed 's/^/| /' conftest.$ac_ext >&5
1703
1704 ac_retval=1
1705fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01001706 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001707 as_fn_set_status $ac_retval
1708
1709} # ac_fn_c_try_cpp
1710
1711# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1712# -------------------------------------------------------
1713# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1714# the include files in INCLUDES and setting the cache variable VAR
1715# accordingly.
1716ac_fn_c_check_header_mongrel ()
1717{
1718 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Matthias Klose3cef2a92012-03-14 23:39:33 +01001719 if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001720 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1721$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001722if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001723 $as_echo_n "(cached) " >&6
1724fi
1725eval ac_res=\$$3
1726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1727$as_echo "$ac_res" >&6; }
1728else
1729 # Is the header compilable?
1730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1731$as_echo_n "checking $2 usability... " >&6; }
1732cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1733/* end confdefs.h. */
1734$4
1735#include <$2>
1736_ACEOF
1737if ac_fn_c_try_compile "$LINENO"; then :
1738 ac_header_compiler=yes
1739else
1740 ac_header_compiler=no
1741fi
1742rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1743{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1744$as_echo "$ac_header_compiler" >&6; }
1745
1746# Is the header present?
1747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1748$as_echo_n "checking $2 presence... " >&6; }
1749cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1750/* end confdefs.h. */
1751#include <$2>
1752_ACEOF
1753if ac_fn_c_try_cpp "$LINENO"; then :
1754 ac_header_preproc=yes
1755else
1756 ac_header_preproc=no
1757fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001758rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001759{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1760$as_echo "$ac_header_preproc" >&6; }
1761
1762# So? What about this header?
1763case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1764 yes:no: )
1765 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1766$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1767 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1768$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1769 ;;
1770 no:yes:* )
1771 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1772$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1773 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1774$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1775 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1776$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1777 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1778$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1779 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1780$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Benjamin Petersoncc8929b2016-08-03 22:01:32 -07001781( $as_echo "## --------------------------------------- ##
1782## Report this to https://bugs.python.org/ ##
1783## --------------------------------------- ##"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001784 ) | sed "s/^/$as_me: WARNING: /" >&2
1785 ;;
1786esac
1787 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1788$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001789if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001790 $as_echo_n "(cached) " >&6
1791else
1792 eval "$3=\$ac_header_compiler"
1793fi
1794eval ac_res=\$$3
1795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1796$as_echo "$ac_res" >&6; }
1797fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01001798 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001799
1800} # ac_fn_c_check_header_mongrel
1801
1802# ac_fn_c_try_run LINENO
1803# ----------------------
1804# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1805# that executables *can* be run.
1806ac_fn_c_try_run ()
1807{
1808 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1809 if { { ac_try="$ac_link"
1810case "(($ac_try" in
1811 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1812 *) ac_try_echo=$ac_try;;
1813esac
1814eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1815$as_echo "$ac_try_echo"; } >&5
1816 (eval "$ac_link") 2>&5
1817 ac_status=$?
1818 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1819 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1820 { { case "(($ac_try" in
1821 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1822 *) ac_try_echo=$ac_try;;
1823esac
1824eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1825$as_echo "$ac_try_echo"; } >&5
1826 (eval "$ac_try") 2>&5
1827 ac_status=$?
1828 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1829 test $ac_status = 0; }; }; then :
1830 ac_retval=0
1831else
1832 $as_echo "$as_me: program exited with status $ac_status" >&5
1833 $as_echo "$as_me: failed program was:" >&5
1834sed 's/^/| /' conftest.$ac_ext >&5
1835
1836 ac_retval=$ac_status
1837fi
1838 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Matthias Klose3cef2a92012-03-14 23:39:33 +01001839 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001840 as_fn_set_status $ac_retval
1841
1842} # ac_fn_c_try_run
1843
1844# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1845# -------------------------------------------------------
1846# Tests whether HEADER exists and can be compiled using the include files in
1847# INCLUDES, setting the cache variable VAR accordingly.
1848ac_fn_c_check_header_compile ()
1849{
1850 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1851 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1852$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001853if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001854 $as_echo_n "(cached) " >&6
1855else
1856 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1857/* end confdefs.h. */
1858$4
1859#include <$2>
1860_ACEOF
1861if ac_fn_c_try_compile "$LINENO"; then :
1862 eval "$3=yes"
1863else
1864 eval "$3=no"
1865fi
1866rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1867fi
1868eval ac_res=\$$3
1869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1870$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001871 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001872
1873} # ac_fn_c_check_header_compile
1874
1875# ac_fn_c_try_link LINENO
1876# -----------------------
1877# Try to link conftest.$ac_ext, and return whether this succeeded.
1878ac_fn_c_try_link ()
1879{
1880 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1881 rm -f conftest.$ac_objext conftest$ac_exeext
1882 if { { ac_try="$ac_link"
1883case "(($ac_try" in
1884 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1885 *) ac_try_echo=$ac_try;;
1886esac
1887eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1888$as_echo "$ac_try_echo"; } >&5
1889 (eval "$ac_link") 2>conftest.err
1890 ac_status=$?
1891 if test -s conftest.err; then
1892 grep -v '^ *+' conftest.err >conftest.er1
1893 cat conftest.er1 >&5
1894 mv -f conftest.er1 conftest.err
1895 fi
1896 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1897 test $ac_status = 0; } && {
1898 test -z "$ac_c_werror_flag" ||
1899 test ! -s conftest.err
1900 } && test -s conftest$ac_exeext && {
1901 test "$cross_compiling" = yes ||
Charles-François Natalibe2b9072013-01-08 19:47:00 +01001902 test -x conftest$ac_exeext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001903 }; then :
1904 ac_retval=0
1905else
1906 $as_echo "$as_me: failed program was:" >&5
1907sed 's/^/| /' conftest.$ac_ext >&5
1908
1909 ac_retval=1
1910fi
1911 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1912 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1913 # interfere with the next link command; also delete a directory that is
1914 # left behind by Apple's compiler. We do this before executing the actions.
1915 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Matthias Klose3cef2a92012-03-14 23:39:33 +01001916 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001917 as_fn_set_status $ac_retval
1918
1919} # ac_fn_c_try_link
1920
1921# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1922# -------------------------------------------
1923# Tests whether TYPE exists after having included INCLUDES, setting cache
1924# variable VAR accordingly.
1925ac_fn_c_check_type ()
1926{
1927 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1928 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1929$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001930if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001931 $as_echo_n "(cached) " >&6
1932else
1933 eval "$3=no"
1934 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1935/* end confdefs.h. */
1936$4
1937int
1938main ()
1939{
1940if (sizeof ($2))
1941 return 0;
1942 ;
1943 return 0;
1944}
1945_ACEOF
1946if ac_fn_c_try_compile "$LINENO"; then :
1947 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1948/* end confdefs.h. */
1949$4
1950int
1951main ()
1952{
1953if (sizeof (($2)))
1954 return 0;
1955 ;
1956 return 0;
1957}
1958_ACEOF
1959if ac_fn_c_try_compile "$LINENO"; then :
1960
1961else
1962 eval "$3=yes"
1963fi
1964rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1965fi
1966rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1967fi
1968eval ac_res=\$$3
1969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1970$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001971 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001972
1973} # ac_fn_c_check_type
1974
1975# ac_fn_c_find_uintX_t LINENO BITS VAR
1976# ------------------------------------
1977# Finds an unsigned integer type with width BITS, setting cache variable VAR
1978# accordingly.
1979ac_fn_c_find_uintX_t ()
1980{
1981 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1982 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1983$as_echo_n "checking for uint$2_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001984if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001985 $as_echo_n "(cached) " >&6
1986else
1987 eval "$3=no"
1988 # Order is important - never check a type that is potentially smaller
1989 # than half of the expected target width.
1990 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1991 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1992 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1993/* end confdefs.h. */
1994$ac_includes_default
1995int
1996main ()
1997{
1998static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01001999test_array [0] = 0;
2000return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002001
2002 ;
2003 return 0;
2004}
2005_ACEOF
2006if ac_fn_c_try_compile "$LINENO"; then :
2007 case $ac_type in #(
2008 uint$2_t) :
2009 eval "$3=yes" ;; #(
2010 *) :
2011 eval "$3=\$ac_type" ;;
2012esac
2013fi
2014rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002015 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002016
2017else
2018 break
2019fi
2020 done
2021fi
2022eval ac_res=\$$3
2023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2024$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002025 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002026
2027} # ac_fn_c_find_uintX_t
2028
2029# ac_fn_c_find_intX_t LINENO BITS VAR
2030# -----------------------------------
2031# Finds a signed integer type with width BITS, setting cache variable VAR
2032# accordingly.
2033ac_fn_c_find_intX_t ()
2034{
2035 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2036 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
2037$as_echo_n "checking for int$2_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002038if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002039 $as_echo_n "(cached) " >&6
2040else
2041 eval "$3=no"
2042 # Order is important - never check a type that is potentially smaller
2043 # than half of the expected target width.
2044 for ac_type in int$2_t 'int' 'long int' \
2045 'long long int' 'short int' 'signed char'; do
2046 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2047/* end confdefs.h. */
2048$ac_includes_default
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002049 enum { N = $2 / 2 - 1 };
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002050int
2051main ()
2052{
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002053static 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 +01002054test_array [0] = 0;
2055return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002056
2057 ;
2058 return 0;
2059}
2060_ACEOF
2061if ac_fn_c_try_compile "$LINENO"; then :
2062 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2063/* end confdefs.h. */
2064$ac_includes_default
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002065 enum { N = $2 / 2 - 1 };
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002066int
2067main ()
2068{
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002069static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002070 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002071test_array [0] = 0;
2072return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002073
2074 ;
2075 return 0;
2076}
2077_ACEOF
2078if ac_fn_c_try_compile "$LINENO"; then :
2079
2080else
2081 case $ac_type in #(
2082 int$2_t) :
2083 eval "$3=yes" ;; #(
2084 *) :
2085 eval "$3=\$ac_type" ;;
2086esac
2087fi
2088rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2089fi
2090rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002091 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002092
2093else
2094 break
2095fi
2096 done
2097fi
2098eval ac_res=\$$3
2099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2100$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002101 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002102
2103} # ac_fn_c_find_intX_t
2104
2105# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2106# --------------------------------------------
2107# Tries to find the compile-time value of EXPR in a program that includes
2108# INCLUDES, setting VAR accordingly. Returns whether the value could be
2109# computed
2110ac_fn_c_compute_int ()
2111{
2112 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2113 if test "$cross_compiling" = yes; then
2114 # Depending upon the size, compute the lo and hi bounds.
2115cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2116/* end confdefs.h. */
2117$4
2118int
2119main ()
2120{
2121static int test_array [1 - 2 * !(($2) >= 0)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002122test_array [0] = 0;
2123return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002124
2125 ;
2126 return 0;
2127}
2128_ACEOF
2129if ac_fn_c_try_compile "$LINENO"; then :
2130 ac_lo=0 ac_mid=0
2131 while :; do
2132 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2133/* end confdefs.h. */
2134$4
2135int
2136main ()
2137{
2138static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002139test_array [0] = 0;
2140return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002141
2142 ;
2143 return 0;
2144}
2145_ACEOF
2146if ac_fn_c_try_compile "$LINENO"; then :
2147 ac_hi=$ac_mid; break
2148else
2149 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2150 if test $ac_lo -le $ac_mid; then
2151 ac_lo= ac_hi=
2152 break
2153 fi
2154 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2155fi
2156rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2157 done
2158else
2159 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2160/* end confdefs.h. */
2161$4
2162int
2163main ()
2164{
2165static int test_array [1 - 2 * !(($2) < 0)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002166test_array [0] = 0;
2167return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002168
2169 ;
2170 return 0;
2171}
2172_ACEOF
2173if ac_fn_c_try_compile "$LINENO"; then :
2174 ac_hi=-1 ac_mid=-1
2175 while :; do
2176 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2177/* end confdefs.h. */
2178$4
2179int
2180main ()
2181{
2182static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002183test_array [0] = 0;
2184return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002185
2186 ;
2187 return 0;
2188}
2189_ACEOF
2190if ac_fn_c_try_compile "$LINENO"; then :
2191 ac_lo=$ac_mid; break
2192else
2193 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2194 if test $ac_mid -le $ac_hi; then
2195 ac_lo= ac_hi=
2196 break
2197 fi
2198 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2199fi
2200rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2201 done
2202else
2203 ac_lo= ac_hi=
2204fi
2205rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2206fi
2207rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2208# Binary search between lo and hi bounds.
2209while test "x$ac_lo" != "x$ac_hi"; do
2210 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2211 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2212/* end confdefs.h. */
2213$4
2214int
2215main ()
2216{
2217static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002218test_array [0] = 0;
2219return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002220
2221 ;
2222 return 0;
2223}
2224_ACEOF
2225if ac_fn_c_try_compile "$LINENO"; then :
2226 ac_hi=$ac_mid
2227else
2228 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2229fi
2230rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2231done
2232case $ac_lo in #((
2233?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2234'') ac_retval=1 ;;
2235esac
2236 else
2237 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2238/* end confdefs.h. */
2239$4
2240static long int longval () { return $2; }
2241static unsigned long int ulongval () { return $2; }
2242#include <stdio.h>
2243#include <stdlib.h>
2244int
2245main ()
2246{
2247
2248 FILE *f = fopen ("conftest.val", "w");
2249 if (! f)
2250 return 1;
2251 if (($2) < 0)
2252 {
2253 long int i = longval ();
2254 if (i != ($2))
2255 return 1;
2256 fprintf (f, "%ld", i);
2257 }
2258 else
2259 {
2260 unsigned long int i = ulongval ();
2261 if (i != ($2))
2262 return 1;
2263 fprintf (f, "%lu", i);
2264 }
2265 /* Do not output a trailing newline, as this causes \r\n confusion
2266 on some platforms. */
2267 return ferror (f) || fclose (f) != 0;
2268
2269 ;
2270 return 0;
2271}
2272_ACEOF
2273if ac_fn_c_try_run "$LINENO"; then :
2274 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2275else
2276 ac_retval=1
2277fi
2278rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2279 conftest.$ac_objext conftest.beam conftest.$ac_ext
2280rm -f conftest.val
2281
2282 fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01002283 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002284 as_fn_set_status $ac_retval
2285
2286} # ac_fn_c_compute_int
2287
2288# ac_fn_c_check_func LINENO FUNC VAR
2289# ----------------------------------
2290# Tests whether FUNC exists, setting the cache variable VAR accordingly
2291ac_fn_c_check_func ()
2292{
2293 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2294 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2295$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002296if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002297 $as_echo_n "(cached) " >&6
2298else
2299 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2300/* end confdefs.h. */
2301/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2302 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2303#define $2 innocuous_$2
2304
2305/* System header to define __stub macros and hopefully few prototypes,
2306 which can conflict with char $2 (); below.
2307 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2308 <limits.h> exists even on freestanding compilers. */
2309
2310#ifdef __STDC__
2311# include <limits.h>
2312#else
2313# include <assert.h>
2314#endif
2315
2316#undef $2
2317
2318/* Override any GCC internal prototype to avoid an error.
2319 Use char because int might match the return type of a GCC
2320 builtin and then its argument prototype would still apply. */
2321#ifdef __cplusplus
2322extern "C"
2323#endif
2324char $2 ();
2325/* The GNU C library defines this for functions which it implements
2326 to always fail with ENOSYS. Some functions are actually named
2327 something starting with __ and the normal name is an alias. */
2328#if defined __stub_$2 || defined __stub___$2
2329choke me
2330#endif
2331
2332int
2333main ()
2334{
2335return $2 ();
2336 ;
2337 return 0;
2338}
2339_ACEOF
2340if ac_fn_c_try_link "$LINENO"; then :
2341 eval "$3=yes"
2342else
2343 eval "$3=no"
2344fi
2345rm -f core conftest.err conftest.$ac_objext \
2346 conftest$ac_exeext conftest.$ac_ext
2347fi
2348eval ac_res=\$$3
2349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2350$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002351 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002352
2353} # ac_fn_c_check_func
2354
2355# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2356# ----------------------------------------------------
2357# Tries to find if the field MEMBER exists in type AGGR, after including
2358# INCLUDES, setting cache variable VAR accordingly.
2359ac_fn_c_check_member ()
2360{
2361 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2362 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2363$as_echo_n "checking for $2.$3... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002364if eval \${$4+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002365 $as_echo_n "(cached) " >&6
2366else
2367 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2368/* end confdefs.h. */
2369$5
2370int
2371main ()
2372{
2373static $2 ac_aggr;
2374if (ac_aggr.$3)
2375return 0;
2376 ;
2377 return 0;
2378}
2379_ACEOF
2380if ac_fn_c_try_compile "$LINENO"; then :
2381 eval "$4=yes"
2382else
2383 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2384/* end confdefs.h. */
2385$5
2386int
2387main ()
2388{
2389static $2 ac_aggr;
2390if (sizeof ac_aggr.$3)
2391return 0;
2392 ;
2393 return 0;
2394}
2395_ACEOF
2396if ac_fn_c_try_compile "$LINENO"; then :
2397 eval "$4=yes"
2398else
2399 eval "$4=no"
2400fi
2401rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2402fi
2403rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2404fi
2405eval ac_res=\$$4
2406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2407$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002408 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002409
2410} # ac_fn_c_check_member
2411
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002412# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2413# ---------------------------------------------
2414# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2415# accordingly.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002416ac_fn_c_check_decl ()
2417{
2418 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002419 as_decl_name=`echo $2|sed 's/ *(.*//'`
2420 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2421 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2422$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002423if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002424 $as_echo_n "(cached) " >&6
2425else
2426 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2427/* end confdefs.h. */
2428$4
2429int
2430main ()
2431{
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002432#ifndef $as_decl_name
2433#ifdef __cplusplus
2434 (void) $as_decl_use;
2435#else
2436 (void) $as_decl_name;
2437#endif
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002438#endif
2439
2440 ;
2441 return 0;
2442}
2443_ACEOF
2444if ac_fn_c_try_compile "$LINENO"; then :
2445 eval "$3=yes"
2446else
2447 eval "$3=no"
2448fi
2449rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2450fi
2451eval ac_res=\$$3
2452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2453$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002454 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002455
2456} # ac_fn_c_check_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +00002457cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002458This file contains any messages produced by compilers while
2459running configure, to aid debugging if configure makes a mistake.
2460
Martin v. Löwis174440b2008-10-03 08:59:41 +00002461It was created by python $as_me 2.7, which was
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002462generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002463
2464 $ $0 $@
2465
2466_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00002467exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002468{
2469cat <<_ASUNAME
2470## --------- ##
2471## Platform. ##
2472## --------- ##
2473
2474hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2475uname -m = `(uname -m) 2>/dev/null || echo unknown`
2476uname -r = `(uname -r) 2>/dev/null || echo unknown`
2477uname -s = `(uname -s) 2>/dev/null || echo unknown`
2478uname -v = `(uname -v) 2>/dev/null || echo unknown`
2479
2480/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2481/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2482
2483/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2484/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2485/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Martin v. Löwiseba40652007-08-30 20:10:57 +00002486/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002487/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2488/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2489/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2490
2491_ASUNAME
2492
2493as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2494for as_dir in $PATH
2495do
2496 IFS=$as_save_IFS
2497 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002498 $as_echo "PATH: $as_dir"
2499 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002500IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002501
2502} >&5
2503
2504cat >&5 <<_ACEOF
2505
2506
2507## ----------- ##
2508## Core tests. ##
2509## ----------- ##
2510
2511_ACEOF
2512
2513
2514# Keep a trace of the command line.
2515# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002516# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002517# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002518# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002519ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002520ac_configure_args0=
2521ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002522ac_must_keep_next=false
2523for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002524do
Skip Montanaro6dead952003-09-25 14:50:04 +00002525 for ac_arg
2526 do
2527 case $ac_arg in
2528 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2529 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2530 | -silent | --silent | --silen | --sile | --sil)
2531 continue ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002532 *\'*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002533 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002534 esac
2535 case $ac_pass in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002536 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002537 2)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002538 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002539 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002540 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002541 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002542 case $ac_arg in
2543 *=* | --config-cache | -C | -disable-* | --disable-* \
2544 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2545 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2546 | -with-* | --with-* | -without-* | --without-* | --x)
2547 case "$ac_configure_args0 " in
2548 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2549 esac
2550 ;;
2551 -* ) ac_must_keep_next=true ;;
2552 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002553 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002554 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002555 ;;
2556 esac
2557 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002558done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002559{ ac_configure_args0=; unset ac_configure_args0;}
2560{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002561
2562# When interrupted or exit'd, cleanup temporary files, and complete
2563# config.log. We remove comments because anyway the quotes in there
2564# would cause problems or look ugly.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002565# WARNING: Use '\'' to represent an apostrophe within the trap.
2566# 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 +00002567trap 'exit_status=$?
2568 # Save into config.log some information that might help in debugging.
2569 {
2570 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002571
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002572 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002573## Cache variables. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002574## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002575 echo
2576 # The following way of writing the cache mishandles newlines in values,
Martin v. Löwiseba40652007-08-30 20:10:57 +00002577(
2578 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2579 eval ac_val=\$$ac_var
2580 case $ac_val in #(
2581 *${as_nl}*)
2582 case $ac_var in #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002583 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2584$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002585 esac
2586 case $ac_var in #(
2587 _ | IFS | as_nl) ;; #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002588 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2589 *) { eval $ac_var=; unset $ac_var;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002590 esac ;;
2591 esac
2592 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002593 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +00002594 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2595 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002596 sed -n \
Martin v. Löwiseba40652007-08-30 20:10:57 +00002597 "s/'\''/'\''\\\\'\'''\''/g;
2598 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2599 ;; #(
Skip Montanaro89e975f2007-08-22 19:05:21 +00002600 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00002601 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaro89e975f2007-08-22 19:05:21 +00002602 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002603 esac |
2604 sort
2605)
Martin v. Löwis11437992002-04-12 09:54:03 +00002606 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002607
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002608 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002609## Output variables. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002610## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002611 echo
2612 for ac_var in $ac_subst_vars
2613 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002614 eval ac_val=\$$ac_var
2615 case $ac_val in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002616 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002617 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002618 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002619 done | sort
2620 echo
2621
2622 if test -n "$ac_subst_files"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002623 $as_echo "## ------------------- ##
Martin v. Löwiseba40652007-08-30 20:10:57 +00002624## File substitutions. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002625## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002626 echo
2627 for ac_var in $ac_subst_files
2628 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002629 eval ac_val=\$$ac_var
2630 case $ac_val in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002631 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002632 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002633 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002634 done | sort
2635 echo
2636 fi
2637
Martin v. Löwis11437992002-04-12 09:54:03 +00002638 if test -s confdefs.h; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002639 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002640## confdefs.h. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002641## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002642 echo
Martin v. Löwiseba40652007-08-30 20:10:57 +00002643 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002644 echo
2645 fi
2646 test "$ac_signal" != 0 &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002647 $as_echo "$as_me: caught signal $ac_signal"
2648 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002649 } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002650 rm -f core *.core core.conftest.* &&
2651 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002652 exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +00002653' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002654for ac_signal in 1 2 13 15; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002655 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002656done
2657ac_signal=0
2658
2659# confdefs.h avoids OS command line length limits that DEFS can exceed.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002660rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002661
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002662$as_echo "/* confdefs.h */" > confdefs.h
2663
Martin v. Löwis11437992002-04-12 09:54:03 +00002664# Predefined preprocessor variables.
2665
2666cat >>confdefs.h <<_ACEOF
2667#define PACKAGE_NAME "$PACKAGE_NAME"
2668_ACEOF
2669
Martin v. Löwis11437992002-04-12 09:54:03 +00002670cat >>confdefs.h <<_ACEOF
2671#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2672_ACEOF
2673
Martin v. Löwis11437992002-04-12 09:54:03 +00002674cat >>confdefs.h <<_ACEOF
2675#define PACKAGE_VERSION "$PACKAGE_VERSION"
2676_ACEOF
2677
Martin v. Löwis11437992002-04-12 09:54:03 +00002678cat >>confdefs.h <<_ACEOF
2679#define PACKAGE_STRING "$PACKAGE_STRING"
2680_ACEOF
2681
Martin v. Löwis11437992002-04-12 09:54:03 +00002682cat >>confdefs.h <<_ACEOF
2683#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2684_ACEOF
2685
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002686cat >>confdefs.h <<_ACEOF
2687#define PACKAGE_URL "$PACKAGE_URL"
2688_ACEOF
2689
Martin v. Löwis11437992002-04-12 09:54:03 +00002690
2691# Let the site file select an alternate cache file if it wants to.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002692# Prefer an explicitly selected file to automatically selected ones.
2693ac_site_file1=NONE
2694ac_site_file2=NONE
Martin v. Löwiseba40652007-08-30 20:10:57 +00002695if test -n "$CONFIG_SITE"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002696 # We do not want a PATH search for config.site.
2697 case $CONFIG_SITE in #((
2698 -*) ac_site_file1=./$CONFIG_SITE;;
2699 */*) ac_site_file1=$CONFIG_SITE;;
2700 *) ac_site_file1=./$CONFIG_SITE;;
2701 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00002702elif test "x$prefix" != xNONE; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002703 ac_site_file1=$prefix/share/config.site
2704 ac_site_file2=$prefix/etc/config.site
Martin v. Löwiseba40652007-08-30 20:10:57 +00002705else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002706 ac_site_file1=$ac_default_prefix/share/config.site
2707 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002708fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002709for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Martin v. Löwiseba40652007-08-30 20:10:57 +00002710do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002711 test "x$ac_site_file" = xNONE && continue
2712 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2713 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2714$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002715 sed 's/^/| /' "$ac_site_file" >&5
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002716 . "$ac_site_file" \
2717 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2718$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2719as_fn_error $? "failed to load site script $ac_site_file
Matthias Klose3cef2a92012-03-14 23:39:33 +01002720See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002721 fi
2722done
2723
2724if test -r "$cache_file"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002725 # Some versions of bash will fail to source /dev/null (special files
2726 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2727 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2728 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2729$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002730 case $cache_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00002731 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2732 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002733 esac
2734 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002735else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002736 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2737$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002738 >$cache_file
2739fi
2740
2741# Check that the precious variables saved in the cache have kept the same
2742# value.
2743ac_cache_corrupted=false
Martin v. Löwiseba40652007-08-30 20:10:57 +00002744for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002745 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2746 eval ac_new_set=\$ac_env_${ac_var}_set
Martin v. Löwiseba40652007-08-30 20:10:57 +00002747 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2748 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002749 case $ac_old_set,$ac_new_set in
2750 set,)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002751 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2752$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 +00002753 ac_cache_corrupted=: ;;
2754 ,set)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002755 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2756$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002757 ac_cache_corrupted=: ;;
2758 ,);;
2759 *)
2760 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002761 # differences in whitespace do not lead to failure.
2762 ac_old_val_w=`echo x $ac_old_val`
2763 ac_new_val_w=`echo x $ac_new_val`
2764 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2765 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2766$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2767 ac_cache_corrupted=:
2768 else
2769 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2770$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2771 eval $ac_var=\$ac_old_val
2772 fi
2773 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2774$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2775 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2776$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002777 fi;;
2778 esac
2779 # Pass precious variables to config.status.
2780 if test "$ac_new_set" = set; then
2781 case $ac_new_val in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002782 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002783 *) ac_arg=$ac_var=$ac_new_val ;;
2784 esac
2785 case " $ac_configure_args " in
2786 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002787 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002788 esac
2789 fi
2790done
2791if $ac_cache_corrupted; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002792 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2793$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2794 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2795$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002796 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002797fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002798## -------------------- ##
2799## Main body of script. ##
2800## -------------------- ##
Martin v. Löwiseba40652007-08-30 20:10:57 +00002801
Guido van Rossum7f43da71994-08-01 12:15:30 +00002802ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002803ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002804ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2805ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2806ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002807
Guido van Rossum627b2d71993-12-24 10:39:16 +00002808
Michael W. Hudson54241132001-12-07 15:38:26 +00002809
Martin v. Löwiseba40652007-08-30 20:10:57 +00002810ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002811
2812
doko@python.orgd65e2ba2013-01-31 23:52:03 +01002813ac_aux_dir=
2814for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2815 if test -f "$ac_dir/install-sh"; then
2816 ac_aux_dir=$ac_dir
2817 ac_install_sh="$ac_aux_dir/install-sh -c"
2818 break
2819 elif test -f "$ac_dir/install.sh"; then
2820 ac_aux_dir=$ac_dir
2821 ac_install_sh="$ac_aux_dir/install.sh -c"
2822 break
2823 elif test -f "$ac_dir/shtool"; then
2824 ac_aux_dir=$ac_dir
2825 ac_install_sh="$ac_aux_dir/shtool install -c"
2826 break
2827 fi
2828done
2829if test -z "$ac_aux_dir"; then
2830 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2831fi
2832
2833# These three variables are undocumented and unsupported,
2834# and are intended to be withdrawn in a future Autoconf release.
2835# They can cause serious problems if a builder's source tree is in a directory
2836# whose full name contains unusual characters.
2837ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2838ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2839ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2840
2841
2842# Make sure we can run config.sub.
2843$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2844 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2845
2846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2847$as_echo_n "checking build system type... " >&6; }
2848if ${ac_cv_build+:} false; then :
2849 $as_echo_n "(cached) " >&6
2850else
2851 ac_build_alias=$build_alias
2852test "x$ac_build_alias" = x &&
2853 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2854test "x$ac_build_alias" = x &&
2855 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2856ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2857 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2858
2859fi
2860{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2861$as_echo "$ac_cv_build" >&6; }
2862case $ac_cv_build in
2863*-*-*) ;;
2864*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2865esac
2866build=$ac_cv_build
2867ac_save_IFS=$IFS; IFS='-'
2868set x $ac_cv_build
2869shift
2870build_cpu=$1
2871build_vendor=$2
2872shift; shift
2873# Remember, the first character of IFS is used to create $*,
2874# except with old shells:
2875build_os=$*
2876IFS=$ac_save_IFS
2877case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2878
2879
2880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2881$as_echo_n "checking host system type... " >&6; }
2882if ${ac_cv_host+:} false; then :
2883 $as_echo_n "(cached) " >&6
2884else
2885 if test "x$host_alias" = x; then
2886 ac_cv_host=$ac_cv_build
2887else
2888 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2889 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2890fi
2891
2892fi
2893{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2894$as_echo "$ac_cv_host" >&6; }
2895case $ac_cv_host in
2896*-*-*) ;;
2897*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2898esac
2899host=$ac_cv_host
2900ac_save_IFS=$IFS; IFS='-'
2901set x $ac_cv_host
2902shift
2903host_cpu=$1
2904host_vendor=$2
2905shift; shift
2906# Remember, the first character of IFS is used to create $*,
2907# except with old shells:
2908host_os=$*
2909IFS=$ac_save_IFS
2910case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2911
2912
2913
2914
2915
Ned Deily983df862014-08-22 13:30:59 -07002916# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2917rm -f pybuilddir.txt
2918
doko@python.orgd65e2ba2013-01-31 23:52:03 +01002919if test "$cross_compiling" = yes; then
2920 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2921$as_echo_n "checking for python interpreter for cross build... " >&6; }
2922 if test -z "$PYTHON_FOR_BUILD"; then
2923 for interp in python$PACKAGE_VERSION python2 python; do
2924 which $interp >/dev/null 2>&1 || continue
2925 if $interp -c 'import sys;sys.exit(not (sys.version_info[:2] >= (2,7) and sys.version_info[0] < 3))'; then
2926 break
2927 fi
2928 interp=
2929 done
2930 if test x$interp = x; then
2931 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2932 fi
2933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2934$as_echo "$interp" >&6; }
doko@ubuntu.coma50b0de2015-04-13 21:55:59 +02002935 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 +01002936 fi
Martin Panterbc82de02016-07-29 05:52:32 +00002937 # Used to comment out stuff for rebuilding generated files
2938 GENERATED_COMMENT='#'
doko@python.orgd65e2ba2013-01-31 23:52:03 +01002939elif test "$cross_compiling" = maybe; then
2940 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
2941else
2942 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
Martin Panterbc82de02016-07-29 05:52:32 +00002943 GENERATED_COMMENT=''
doko@python.orgd65e2ba2013-01-31 23:52:03 +01002944fi
2945
2946
Martin v. Löwis11437992002-04-12 09:54:03 +00002947
Martin Panter801110b2016-07-28 01:28:27 +00002948
Georg Brandlbcd64a32009-03-31 21:45:18 +00002949if test "$prefix" != "/"; then
2950 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2951fi
2952
2953
Martin v. Löwis11437992002-04-12 09:54:03 +00002954
2955
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002956# We don't use PACKAGE_ variables, and they cause conflicts
2957# with other autoconf-based packages that include Python.h
2958grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2959rm confdefs.h
2960mv confdefs.h.new confdefs.h
2961
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002962
Martin v. Löwis174440b2008-10-03 08:59:41 +00002963VERSION=2.7
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002964
Martin v. Löwis1142de32002-03-29 16:28:31 +00002965
2966SOVERSION=1.0
2967
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002968# The later defininition of _XOPEN_SOURCE disables certain features
2969# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2970
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002971$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002972
2973
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002974# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2975# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2976# them.
2977
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002978$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002979
2980
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002981# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2982# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2983# them.
2984
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002985$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002986
2987
Martin v. Löwisd6320502004-08-12 13:45:08 +00002988# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2989# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2990
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002991$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002992
2993
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002994# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2995# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2996# them.
2997
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002998$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002999
3000
3001
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003002define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003003
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003004# Arguments passed to configure.
3005
3006CONFIG_ARGS="$ac_configure_args"
3007
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3009$as_echo_n "checking for --enable-universalsdk... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003010# Check whether --enable-universalsdk was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003011if test "${enable_universalsdk+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003012 enableval=$enable_universalsdk;
Ronald Oussoren988117f2006-04-29 11:31:35 +00003013 case $enableval in
3014 yes)
3015 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003016 if test ! -d "${enableval}"
3017 then
3018 enableval=/
3019 fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00003020 ;;
3021 esac
3022 case $enableval in
3023 no)
3024 UNIVERSALSDK=
3025 enable_universalsdk=
3026 ;;
3027 *)
3028 UNIVERSALSDK=$enableval
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003029 if test ! -d "${UNIVERSALSDK}"
3030 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003031 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003032 fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00003033 ;;
3034 esac
3035
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003036
Ronald Oussoren988117f2006-04-29 11:31:35 +00003037else
3038
3039 UNIVERSALSDK=
3040 enable_universalsdk=
3041
Martin v. Löwiseba40652007-08-30 20:10:57 +00003042fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00003043
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003044if test -n "${UNIVERSALSDK}"
3045then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3047$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003048else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3050$as_echo "no" >&6; }
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003051fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00003052
Martin v. Löwiseba40652007-08-30 20:10:57 +00003053
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +00003054
Ned Deily8e60f6e2013-05-30 00:14:29 -07003055ARCH_RUN_32BIT=""
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +00003056
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003057UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren92919a62009-12-24 13:30:58 +00003058
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3060$as_echo_n "checking for --with-universal-archs... " >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003061
3062# Check whether --with-universal-archs was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003063if test "${with_universal_archs+set}" = set; then :
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003064 withval=$with_universal_archs;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
3066$as_echo "$withval" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003067 UNIVERSAL_ARCHS="$withval"
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00003068 if test "${enable_universalsdk}" ; then
3069 :
3070 else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003071 as_fn_error $? "--with-universal-archs without --enable-universalsdk. See Mac/README" "$LINENO" 5
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00003072 fi
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003073
3074else
3075
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 32-bit" >&5
3077$as_echo "32-bit" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003078
3079fi
3080
3081
3082
3083
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003084
3085# Check whether --with-framework-name was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003086if test "${with_framework_name+set}" = set; then :
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003087 withval=$with_framework_name;
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00003088 if test "${enable_framework}"; then
3089 :
3090 else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003091 as_fn_error $? "--with-framework-name without --enable-framework. See Mac/README" "$LINENO" 5
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00003092 fi
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003093 PYTHONFRAMEWORK=${withval}
3094 PYTHONFRAMEWORKDIR=${withval}.framework
3095 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3096
3097else
3098
3099 PYTHONFRAMEWORK=Python
3100 PYTHONFRAMEWORKDIR=Python.framework
3101 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3102
3103fi
3104
Martin v. Löwiseba40652007-08-30 20:10:57 +00003105# Check whether --enable-framework was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003106if test "${enable_framework+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003107 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003108 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003109 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003110 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003111 esac
3112 case $enableval in
3113 no)
3114 PYTHONFRAMEWORK=
3115 PYTHONFRAMEWORKDIR=no-framework
3116 PYTHONFRAMEWORKPREFIX=
3117 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00003118 FRAMEWORKINSTALLFIRST=
3119 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00003120 FRAMEWORKALTINSTALLFIRST=
3121 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00003122 if test "x${prefix}" = "xNONE"; then
3123 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3124 else
3125 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3126 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003127 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003128 ;;
3129 *)
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003130 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003131 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00003132 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003133 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure bininstall maninstall"
Ronald Oussoren92919a62009-12-24 13:30:58 +00003134 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3135 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003136 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003137
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00003138 if test "x${prefix}" = "xNONE" ; then
3139 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003140
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00003141 else
3142 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3143 fi
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003144
3145 case "${enableval}" in
3146 /System*)
3147 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3148 if test "${prefix}" = "NONE" ; then
3149 # See below
3150 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3151 fi
3152 ;;
3153
3154 /Library*)
3155 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3156 ;;
3157
3158 */Library/Frameworks)
3159 MDIR="`dirname "${enableval}"`"
3160 MDIR="`dirname "${MDIR}"`"
3161 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3162
3163 if test "${prefix}" = "NONE"; then
3164 # User hasn't specified the
3165 # --prefix option, but wants to install
3166 # the framework in a non-default location,
3167 # ensure that the compatibility links get
3168 # installed relative to that prefix as well
3169 # instead of in /usr/local.
3170 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3171 fi
3172 ;;
3173
3174 *)
3175 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3176 ;;
3177 esac
3178
Jack Jansen127e56e2001-09-11 14:41:54 +00003179 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Ronald Oussoren836b0392006-05-14 19:56:34 +00003180
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003181 # Add files for Mac specific code to the list of output
Ronald Oussoren836b0392006-05-14 19:56:34 +00003182 # files:
Martin v. Löwiseba40652007-08-30 20:10:57 +00003183 ac_config_files="$ac_config_files Mac/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00003184
Martin v. Löwiseba40652007-08-30 20:10:57 +00003185 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00003186
Martin v. Löwiseba40652007-08-30 20:10:57 +00003187 ac_config_files="$ac_config_files Mac/IDLE/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00003188
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003189 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3190
3191 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3192
Jack Jansene578a632001-08-15 01:27:14 +00003193 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003194
Guido van Rossum563e7081996-09-10 18:20:48 +00003195else
Martin v. Löwis11437992002-04-12 09:54:03 +00003196
Jack Jansene578a632001-08-15 01:27:14 +00003197 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003198 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003199 PYTHONFRAMEWORKPREFIX=
3200 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00003201 FRAMEWORKINSTALLFIRST=
3202 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00003203 FRAMEWORKALTINSTALLFIRST=
3204 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00003205 if test "x${prefix}" = "xNONE" ; then
3206 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3207 else
3208 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3209 fi
Jack Jansene578a632001-08-15 01:27:14 +00003210 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003211
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003212
Martin v. Löwiseba40652007-08-30 20:10:57 +00003213fi
3214
Michael W. Hudson54241132001-12-07 15:38:26 +00003215
3216
3217
3218
Jack Jansene578a632001-08-15 01:27:14 +00003219
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00003220
3221
Ronald Oussoren5b787322006-06-06 19:50:24 +00003222
3223
3224
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003225
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003226
Jack Jansene578a632001-08-15 01:27:14 +00003227##AC_ARG_WITH(dyld,
Matthias Klose22520ea2010-05-08 10:14:46 +00003228## AS_HELP_STRING([--with-dyld],
3229## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003230##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003231# Set name for machine-dependent library files
3232
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3234$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003235if test -z "$MACHDEP"
3236then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003237 # avoid using uname for cross builds
3238 if test "$cross_compiling" = yes; then
3239 # ac_sys_system and ac_sys_release are only used for setting
3240 # `define_xopen_source' in the case statement below. For the
3241 # current supported cross builds, this macro is not adjusted.
3242 case "$host" in
3243 *-*-linux*)
3244 ac_sys_system=Linux
3245 ;;
3246 *-*-cygwin*)
3247 ac_sys_system=Cygwin
3248 ;;
3249 *)
3250 # for now, limit cross builds to known configurations
3251 MACHDEP="unknown"
3252 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3253 esac
3254 ac_sys_release=
3255 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003256 ac_sys_system=`uname -s`
Georg Brandlfe18a112009-09-04 07:55:14 +00003257 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003258 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003259 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003260 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003261 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003262 fi
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003263 fi
3264 ac_md_system=`echo $ac_sys_system |
3265 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3266 ac_md_release=`echo $ac_sys_release |
3267 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3268 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003269
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003270 case $MACHDEP in
Victor Stinneracacbaa2011-08-20 14:02:38 +02003271 linux*) MACHDEP="linux2";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003272 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003273 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003274 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00003275 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003276 '') MACHDEP="unknown";;
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003277 esac
3278fi
3279
3280
3281if test "$cross_compiling" = yes; then
3282 case "$host" in
3283 *-*-linux*)
3284 case "$host_cpu" in
3285 arm*)
3286 _host_cpu=arm
3287 ;;
3288 *)
3289 _host_cpu=$host_cpu
3290 esac
3291 ;;
3292 *-*-cygwin*)
3293 _host_cpu=
3294 ;;
3295 *)
3296 # for now, limit cross builds to known configurations
3297 MACHDEP="unknown"
3298 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003299 esac
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003300 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003301fi
Guido van Rossum91922671997-10-09 20:24:13 +00003302
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003303# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3304# disable features if it is defined, without any means to access these
3305# features as extensions. For these systems, we skip the definition of
3306# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3307# some feature, make sure there is no alternative way to access this
3308# feature. Also, when using wildcards, make sure you have verified the
3309# need for not defining _XOPEN_SOURCE on all systems matching the
3310# wildcard, and that the wildcard does not include future systems
3311# (which may remove their limitations).
3312case $ac_sys_system/$ac_sys_release in
3313 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3314 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003315 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis7875ef62010-02-15 21:41:12 +00003316 # In addition, Stefan Krah confirms that issue #1244610 exists through
3317 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali97781b02011-07-22 23:43:42 +02003318 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Martin v. Löwiscb78de62007-12-29 18:49:21 +00003319 define_xopen_source=no
3320 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3321 # also defined. This can be overridden by defining _BSD_SOURCE
3322 # As this has a different meaning on Linux, only define it on OpenBSD
3323
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003324$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwiscb78de62007-12-29 18:49:21 +00003325
3326 ;;
Charles-François Natali97781b02011-07-22 23:43:42 +02003327 OpenBSD/*)
Martin v. Löwis5e2dd862010-02-15 08:32:00 +00003328 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3329 # also defined. This can be overridden by defining _BSD_SOURCE
3330 # As this has a different meaning on Linux, only define it on OpenBSD
3331
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003332$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis5e2dd862010-02-15 08:32:00 +00003333
3334 ;;
Martin v. Löwis4d542ec2006-11-25 15:39:19 +00003335 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3336 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3337 # Marc Recht
Benjamin Petersoneac68f42008-11-16 17:54:55 +00003338 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 +00003339 define_xopen_source=no;;
Martin v. Löwisb41afb52010-05-28 15:28:47 +00003340 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3341 # request to enable features supported by the standard as a request
3342 # to disable features not supported by the standard. The best way
3343 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3344 # entirely and define __EXTENSIONS__ instead.
3345 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003346 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003347 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3348 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003349 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003350 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003351 define_xopen_source=no;;
3352 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003353 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003354 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003355 define_xopen_source=no;;
Martin v. Löwisbb86d832008-11-04 20:40:09 +00003356 # On FreeBSD 4, the math functions C89 does not cover are never defined
3357 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3358 FreeBSD/4.*)
3359 define_xopen_source=no;;
3360 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3361 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3362 # identifies itself as Darwin/7.*
3363 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3364 # disables platform specific features beyond repair.
3365 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3366 # has no effect, don't bother defining them
3367 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003368 define_xopen_source=no;;
Ronald Oussorena55af9a2010-01-17 16:25:57 +00003369 Darwin/1[0-9].*)
3370 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003371 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3372 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3373 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003374 AIX/4)
3375 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003376 AIX/5)
3377 if test `uname -r` -eq 1; then
3378 define_xopen_source=no
3379 fi
3380 ;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00003381 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3382 # defining NI_NUMERICHOST.
3383 QNX/6.3.2)
3384 define_xopen_source=no
3385 ;;
Martin v. Löwisa0588362006-04-04 06:03:50 +00003386
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003387esac
3388
3389if test $define_xopen_source = yes
3390then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003391
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003392$as_echo "#define _XOPEN_SOURCE 600" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003393
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003394
3395 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3396 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3397 # several APIs are not declared. Since this is also needed in some
3398 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003399
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003400$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003401
3402
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003403
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003404$as_echo "#define _POSIX_C_SOURCE 200112L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003405
3406
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003407fi
3408
Guido van Rossum91922671997-10-09 20:24:13 +00003409#
3410# SGI compilers allow the specification of the both the ABI and the
3411# ISA on the command line. Depending on the values of these switches,
Martin Panterb1d867f2016-05-26 05:28:50 +00003412# different and often incompatible code will be generated.
Guido van Rossum91922671997-10-09 20:24:13 +00003413#
3414# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3415# thus supply support for various ABI/ISA combinations. The MACHDEP
3416# variable is also adjusted.
3417#
3418
3419if test ! -z "$SGI_ABI"
3420then
3421 CC="cc $SGI_ABI"
3422 LDFLAGS="$SGI_ABI $LDFLAGS"
3423 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3424fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003425{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3426$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003427
doko@ubuntu.coma50b0de2015-04-13 21:55:59 +02003428
3429PLATDIR=plat-$MACHDEP
3430
Jack Jansen83f898c2002-12-30 22:23:40 +00003431# And add extra plat-mac for darwin
3432
Jack Jansen7b59b422003-03-17 15:44:10 +00003433
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking EXTRAPLATDIR" >&5
3435$as_echo_n "checking EXTRAPLATDIR... " >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00003436if test -z "$EXTRAPLATDIR"
3437then
3438 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00003439 darwin)
3440 EXTRAPLATDIR="\$(PLATMACDIRS)"
3441 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
3442 ;;
3443 *)
3444 EXTRAPLATDIR=""
3445 EXTRAMACHDEPPATH=""
3446 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00003447 esac
3448fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003449{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRAPLATDIR" >&5
3450$as_echo "$EXTRAPLATDIR" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00003451
Jack Jansen6b08a402004-06-03 12:41:45 +00003452# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3453# it may influence the way we can build extensions, so distutils
3454# needs to check it
3455
Ronald Oussoren988117f2006-04-29 11:31:35 +00003456
Jack Jansen6b08a402004-06-03 12:41:45 +00003457CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Ronald Oussoren988117f2006-04-29 11:31:35 +00003458EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003459
Guido van Rossum627b2d71993-12-24 10:39:16 +00003460# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003461
3462# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3463# for debug/optimization stuff. BASECFLAGS is for flags that are required
3464# just to get things to compile and link. Users are free to override OPT
3465# when running configure or make. The build should not break if they do.
3466# BASECFLAGS should generally not be messed with, however.
3467
3468# XXX shouldn't some/most/all of this code be merged with the stuff later
3469# on that fiddles with OPT and BASECFLAGS?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3471$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003472
Martin v. Löwiseba40652007-08-30 20:10:57 +00003473# Check whether --with-gcc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003474if test "${with_gcc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003475 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003476 case $withval in
Mark Dickinson04b27232009-01-04 12:29:36 +00003477 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003478 without_gcc=yes;;
3479 yes) CC=gcc
3480 without_gcc=no;;
3481 *) CC=$withval
3482 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003483 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003484else
Martin v. Löwis11437992002-04-12 09:54:03 +00003485
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003486 case $ac_sys_system in
Antoine Pitrou285cd162010-09-21 15:23:17 +00003487 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003488 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003489 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003490 case $BE_HOST_CPU in
3491 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00003492 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003493 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00003494 BASECFLAGS="$BASECFLAGS -export pragma"
3495 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003496 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003497 ;;
3498 x86)
Fred Drake5790be12000-10-09 17:06:13 +00003499 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003500 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00003501 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003502 ;;
3503 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003504 as_fn_error $? "Unknown BeOS platform \"$BE_HOST_CPU\"" "$LINENO" 5
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003505 ;;
3506 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003507 AR="\$(srcdir)/Modules/ar_beos"
3508 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003509 ;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003510 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003511 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00003512fi
3513
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003514{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3515$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003516
Zachary Ware6ed42ea2015-12-21 11:43:03 -06003517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-icc" >&5
3518$as_echo_n "checking for --with-icc... " >&6; }
3519
3520# Check whether --with-icc was given.
3521if test "${with_icc+set}" = set; then :
3522 withval=$with_icc;
3523 case $withval in
3524 no) CC=${CC:-cc}
3525 with_icc=no;;
3526 yes) CC=icc
3527 CXX=icpc
3528 with_icc=yes;;
3529 *) CC=$withval
3530 with_icc=$withval;;
3531 esac
3532else
3533
3534 with_icc=no
3535fi
3536
3537{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icc" >&5
3538$as_echo "$with_icc" >&6; }
3539
Guido van Rossum8b131c51995-03-09 14:10:13 +00003540# If the user switches compilers, we can't believe the cache
3541if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3542then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003543 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003544(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003545fi
3546
Trent Nelson15daa352012-12-13 06:46:39 +00003547if test "$MACHDEP" = "irix6" && test "$CC" != "gcc"; then
3548 # Normally, MIPSpro CC treats #error directives as warnings, which means
3549 # a successful exit code is returned (0). This is a problem because IRIX
3550 # has a bunch of system headers with this guard at the top:
3551 #
3552 # #ifndef __c99
3553 # #error This header file is to be used only for c99 mode compilations
3554 # #else
3555 #
3556 # When autoconf tests for such a header, like stdint.h, this happens:
3557 #
3558 # configure:4619: cc -c conftest.c >&5
3559 # cc-1035 cc: WARNING File = /usr/include/stdint.h, Line = 5
3560 # #error directive: This header file is to be used only for c99 mode
3561 # compilations
3562 #
3563 # #error This header file is to be used only for c99 mode compilations
3564 # ^
3565 #
3566 # configure:4619: $? = 0
3567 # configure:4619: result: yes
3568 #
3569 # Therefore, we use `-diag_error 1035` to have the compiler treat the
3570 # warning as an error, which causes cc to return a non-zero result,
3571 # which autoconf can interpret correctly.
3572 CFLAGS="$CFLAGS -diag_error 1035"
3573 # Whilst we're here, we might as well make sure CXX defaults to something
3574 # sensible if we're not using gcc.
3575 if test -z "$CXX"; then
3576 CXX="CC"
3577 fi
3578fi
3579
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00003580# If the user set CFLAGS, use this instead of the automatically
3581# determined setting
3582preset_cflags="$CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +00003583ac_ext=c
3584ac_cpp='$CPP $CPPFLAGS'
3585ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3586ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3587ac_compiler_gnu=$ac_cv_c_compiler_gnu
3588if test -n "$ac_tool_prefix"; then
3589 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3590set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3592$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003593if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003594 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003595else
3596 if test -n "$CC"; then
3597 ac_cv_prog_CC="$CC" # Let the user override the test.
3598else
Martin v. Löwis11437992002-04-12 09:54:03 +00003599as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3600for as_dir in $PATH
3601do
3602 IFS=$as_save_IFS
3603 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003604 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003605 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003606 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003607 $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 +00003608 break 2
3609 fi
3610done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003611 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003612IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003613
Jack Jansendd19cf82001-12-06 22:36:17 +00003614fi
3615fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003616CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003617if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003618 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3619$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003620else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3622$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003623fi
3624
Martin v. Löwiseba40652007-08-30 20:10:57 +00003625
Martin v. Löwis11437992002-04-12 09:54:03 +00003626fi
3627if test -z "$ac_cv_prog_CC"; then
3628 ac_ct_CC=$CC
3629 # Extract the first word of "gcc", so it can be a program name with args.
3630set dummy gcc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3632$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003633if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003634 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003635else
3636 if test -n "$ac_ct_CC"; then
3637 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3638else
3639as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3640for as_dir in $PATH
3641do
3642 IFS=$as_save_IFS
3643 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003644 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003645 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003646 ac_cv_prog_ac_ct_CC="gcc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003647 $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 +00003648 break 2
3649 fi
3650done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003651 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003652IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003653
3654fi
3655fi
3656ac_ct_CC=$ac_cv_prog_ac_ct_CC
3657if test -n "$ac_ct_CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3659$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003660else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3662$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003663fi
3664
Martin v. Löwiseba40652007-08-30 20:10:57 +00003665 if test "x$ac_ct_CC" = x; then
3666 CC=""
3667 else
3668 case $cross_compiling:$ac_tool_warned in
3669yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003670{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3671$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00003672ac_tool_warned=yes ;;
3673esac
3674 CC=$ac_ct_CC
3675 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003676else
3677 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003678fi
3679
Jack Jansendd19cf82001-12-06 22:36:17 +00003680if test -z "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003681 if test -n "$ac_tool_prefix"; then
3682 # 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 +00003683set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3685$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003686if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003687 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003688else
3689 if test -n "$CC"; then
3690 ac_cv_prog_CC="$CC" # Let the user override the test.
3691else
Martin v. Löwis11437992002-04-12 09:54:03 +00003692as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3693for as_dir in $PATH
3694do
3695 IFS=$as_save_IFS
3696 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003697 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003698 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003699 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003700 $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 +00003701 break 2
3702 fi
3703done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003704 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003705IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003706
3707fi
3708fi
3709CC=$ac_cv_prog_CC
3710if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3712$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003713else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3715$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003716fi
3717
Martin v. Löwiseba40652007-08-30 20:10:57 +00003718
Martin v. Löwis11437992002-04-12 09:54:03 +00003719 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003720fi
3721if test -z "$CC"; then
3722 # Extract the first word of "cc", so it can be a program name with args.
3723set dummy cc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3725$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003726if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003727 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003728else
3729 if test -n "$CC"; then
3730 ac_cv_prog_CC="$CC" # Let the user override the test.
3731else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003732 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003733as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3734for as_dir in $PATH
3735do
3736 IFS=$as_save_IFS
3737 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003738 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003739 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003740 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3741 ac_prog_rejected=yes
3742 continue
3743 fi
3744 ac_cv_prog_CC="cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003745 $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 +00003746 break 2
3747 fi
3748done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003749 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003750IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003751
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003752if test $ac_prog_rejected = yes; then
3753 # We found a bogon in the path, so make sure we never use it.
3754 set dummy $ac_cv_prog_CC
3755 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003756 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003757 # We chose a different compiler from the bogus one.
3758 # However, it has the same basename, so the bogon will be chosen
3759 # first if we set CC to just the basename; use the full file name.
3760 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003761 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003762 fi
3763fi
3764fi
3765fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003766CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003767if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3769$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003770else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003771 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3772$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003773fi
3774
Martin v. Löwiseba40652007-08-30 20:10:57 +00003775
Martin v. Löwis11437992002-04-12 09:54:03 +00003776fi
3777if test -z "$CC"; then
3778 if test -n "$ac_tool_prefix"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003779 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003780 do
3781 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3782set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3784$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003785if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003786 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003787else
3788 if test -n "$CC"; then
3789 ac_cv_prog_CC="$CC" # Let the user override the test.
3790else
Martin v. Löwis11437992002-04-12 09:54:03 +00003791as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3792for as_dir in $PATH
3793do
3794 IFS=$as_save_IFS
3795 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003796 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003797 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003798 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003799 $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 +00003800 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003801 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003802done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003803 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003804IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003805
3806fi
3807fi
3808CC=$ac_cv_prog_CC
3809if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003810 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3811$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003812else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3814$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003815fi
3816
Martin v. Löwiseba40652007-08-30 20:10:57 +00003817
Martin v. Löwis11437992002-04-12 09:54:03 +00003818 test -n "$CC" && break
3819 done
3820fi
3821if test -z "$CC"; then
3822 ac_ct_CC=$CC
Martin v. Löwiseba40652007-08-30 20:10:57 +00003823 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003824do
3825 # Extract the first word of "$ac_prog", so it can be a program name with args.
3826set dummy $ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3828$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003829if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003830 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003831else
3832 if test -n "$ac_ct_CC"; then
3833 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3834else
3835as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3836for as_dir in $PATH
3837do
3838 IFS=$as_save_IFS
3839 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003840 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003841 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003842 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003843 $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 +00003844 break 2
3845 fi
3846done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003847 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003848IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003849
Martin v. Löwis11437992002-04-12 09:54:03 +00003850fi
3851fi
3852ac_ct_CC=$ac_cv_prog_ac_ct_CC
3853if test -n "$ac_ct_CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3855$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003856else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3858$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003859fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003860
Martin v. Löwiseba40652007-08-30 20:10:57 +00003861
Martin v. Löwis11437992002-04-12 09:54:03 +00003862 test -n "$ac_ct_CC" && break
3863done
Michael W. Hudson54241132001-12-07 15:38:26 +00003864
Martin v. Löwiseba40652007-08-30 20:10:57 +00003865 if test "x$ac_ct_CC" = x; then
3866 CC=""
3867 else
3868 case $cross_compiling:$ac_tool_warned in
3869yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003870{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3871$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00003872ac_tool_warned=yes ;;
3873esac
3874 CC=$ac_ct_CC
3875 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003876fi
3877
3878fi
3879
3880
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003881test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3882$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003883as_fn_error $? "no acceptable C compiler found in \$PATH
Matthias Klose3cef2a92012-03-14 23:39:33 +01003884See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003885
3886# Provide some information about the compiler.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003887$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3888set X $ac_compile
3889ac_compiler=$2
3890for ac_option in --version -v -V -qversion; do
3891 { { ac_try="$ac_compiler $ac_option >&5"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003892case "(($ac_try" in
3893 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3894 *) ac_try_echo=$ac_try;;
3895esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003896eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3897$as_echo "$ac_try_echo"; } >&5
3898 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003899 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003900 if test -s conftest.err; then
3901 sed '10a\
3902... rest of stderr output deleted ...
3903 10q' conftest.err >conftest.er1
3904 cat conftest.er1 >&5
3905 fi
3906 rm -f conftest.er1 conftest.err
3907 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3908 test $ac_status = 0; }
3909done
Martin v. Löwis11437992002-04-12 09:54:03 +00003910
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003911cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003912/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003913
Martin v. Löwis11437992002-04-12 09:54:03 +00003914int
3915main ()
3916{
3917
3918 ;
3919 return 0;
3920}
3921_ACEOF
3922ac_clean_files_save=$ac_clean_files
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003923ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003924# Try to create an executable without -o first, disregard a.out.
3925# It will help us diagnose broken compilers, and finding out an intuition
3926# of exeext.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3928$as_echo_n "checking whether the C compiler works... " >&6; }
3929ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3930
3931# The possible output files:
3932ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3933
Martin v. Löwiseba40652007-08-30 20:10:57 +00003934ac_rmfiles=
3935for ac_file in $ac_files
3936do
3937 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003938 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00003939 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3940 esac
3941done
3942rm -f $ac_rmfiles
3943
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003944if { { ac_try="$ac_link_default"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003945case "(($ac_try" in
3946 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3947 *) ac_try_echo=$ac_try;;
3948esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003949eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3950$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003951 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003952 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003953 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3954 test $ac_status = 0; }; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003955 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3956# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3957# in a Makefile. We should not override ac_cv_exeext if it was cached,
3958# so that the user can short-circuit this test for compilers unknown to
3959# Autoconf.
3960for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003961do
3962 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003963 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003964 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Skip Montanarof0d5f792004-08-15 14:08:23 +00003965 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003966 [ab].out )
Skip Montanarof0d5f792004-08-15 14:08:23 +00003967 # We found the default executable, but exeext='' is most
3968 # certainly right.
3969 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003970 *.* )
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003971 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Martin v. Löwiseba40652007-08-30 20:10:57 +00003972 then :; else
3973 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3974 fi
3975 # We set ac_cv_exeext here because the later test for it is not
3976 # safe: cross compilers may not add the suffix if given an `-o'
3977 # argument, so we may need to know it at that point already.
3978 # Even if this section looks crufty: it has the advantage of
3979 # actually working.
Skip Montanarof0d5f792004-08-15 14:08:23 +00003980 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003981 * )
Skip Montanarof0d5f792004-08-15 14:08:23 +00003982 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003983 esac
3984done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003985test "$ac_cv_exeext" = no && ac_cv_exeext=
3986
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003987else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003988 ac_file=''
3989fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003990if test -z "$ac_file"; then :
3991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3992$as_echo "no" >&6; }
3993$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003994sed 's/^/| /' conftest.$ac_ext >&5
3995
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003996{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3997$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003998as_fn_error 77 "C compiler cannot create executables
Matthias Klose3cef2a92012-03-14 23:39:33 +01003999See \`config.log' for more details" "$LINENO" 5; }
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004000else
4001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4002$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004003fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4005$as_echo_n "checking for C compiler default output file name... " >&6; }
4006{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4007$as_echo "$ac_file" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004008ac_exeext=$ac_cv_exeext
Michael W. Hudson54241132001-12-07 15:38:26 +00004009
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004010rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00004011ac_clean_files=$ac_clean_files_save
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4013$as_echo_n "checking for suffix of executables... " >&6; }
4014if { { ac_try="$ac_link"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004015case "(($ac_try" in
4016 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4017 *) ac_try_echo=$ac_try;;
4018esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004019eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4020$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00004021 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004022 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004023 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4024 test $ac_status = 0; }; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004025 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4026# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4027# work properly (i.e., refer to `conftest.exe'), while it won't with
4028# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00004029for ac_file in conftest.exe conftest conftest.*; do
4030 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00004031 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004032 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004033 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
Skip Montanarof0d5f792004-08-15 14:08:23 +00004034 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004035 * ) break;;
4036 esac
4037done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004038else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004039 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4040$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004041as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Matthias Klose3cef2a92012-03-14 23:39:33 +01004042See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004043fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004044rm -f conftest conftest$ac_cv_exeext
4045{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4046$as_echo "$ac_cv_exeext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004047
4048rm -f conftest.$ac_ext
4049EXEEXT=$ac_cv_exeext
4050ac_exeext=$EXEEXT
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004051cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4052/* end confdefs.h. */
4053#include <stdio.h>
4054int
4055main ()
4056{
4057FILE *f = fopen ("conftest.out", "w");
4058 return ferror (f) || fclose (f) != 0;
4059
4060 ;
4061 return 0;
4062}
Skip Montanaro6dead952003-09-25 14:50:04 +00004063_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004064ac_clean_files="$ac_clean_files conftest.out"
4065# Check that the compiler produces executables we can run. If not, either
4066# the compiler is broken, or we cross compile.
4067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4068$as_echo_n "checking whether we are cross compiling... " >&6; }
4069if test "$cross_compiling" != yes; then
4070 { { ac_try="$ac_link"
4071case "(($ac_try" in
4072 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4073 *) ac_try_echo=$ac_try;;
4074esac
4075eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4076$as_echo "$ac_try_echo"; } >&5
4077 (eval "$ac_link") 2>&5
4078 ac_status=$?
4079 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4080 test $ac_status = 0; }
4081 if { ac_try='./conftest$ac_cv_exeext'
4082 { { case "(($ac_try" in
4083 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4084 *) ac_try_echo=$ac_try;;
4085esac
4086eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4087$as_echo "$ac_try_echo"; } >&5
4088 (eval "$ac_try") 2>&5
4089 ac_status=$?
4090 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4091 test $ac_status = 0; }; }; then
4092 cross_compiling=no
4093 else
4094 if test "$cross_compiling" = maybe; then
4095 cross_compiling=yes
4096 else
4097 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4098$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004099as_fn_error $? "cannot run C compiled programs.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004100If you meant to cross compile, use \`--host'.
Matthias Klose3cef2a92012-03-14 23:39:33 +01004101See \`config.log' for more details" "$LINENO" 5; }
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004102 fi
4103 fi
4104fi
4105{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4106$as_echo "$cross_compiling" >&6; }
4107
4108rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4109ac_clean_files=$ac_clean_files_save
4110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4111$as_echo_n "checking for suffix of object files... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004112if ${ac_cv_objext+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004113 $as_echo_n "(cached) " >&6
4114else
4115 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004116/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004117
Martin v. Löwis11437992002-04-12 09:54:03 +00004118int
4119main ()
4120{
4121
4122 ;
4123 return 0;
4124}
4125_ACEOF
4126rm -f conftest.o conftest.obj
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004127if { { ac_try="$ac_compile"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004128case "(($ac_try" in
4129 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4130 *) ac_try_echo=$ac_try;;
4131esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004132eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4133$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00004134 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004135 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004136 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4137 test $ac_status = 0; }; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004138 for ac_file in conftest.o conftest.obj conftest.*; do
4139 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004140 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004141 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004142 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4143 break;;
4144 esac
4145done
4146else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004147 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004148sed 's/^/| /' conftest.$ac_ext >&5
4149
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004150{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4151$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004152as_fn_error $? "cannot compute suffix of object files: cannot compile
Matthias Klose3cef2a92012-03-14 23:39:33 +01004153See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004154fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004155rm -f conftest.$ac_cv_objext conftest.$ac_ext
4156fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004157{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4158$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004159OBJEXT=$ac_cv_objext
4160ac_objext=$OBJEXT
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4162$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004163if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004164 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004165else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004166 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004167/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004168
Martin v. Löwis11437992002-04-12 09:54:03 +00004169int
4170main ()
4171{
4172#ifndef __GNUC__
4173 choke me
4174#endif
4175
4176 ;
4177 return 0;
4178}
4179_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004180if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004181 ac_compiler_gnu=yes
4182else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004183 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004184fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004185rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004186ac_cv_c_compiler_gnu=$ac_compiler_gnu
4187
4188fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004189{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4190$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4191if test $ac_compiler_gnu = yes; then
4192 GCC=yes
4193else
4194 GCC=
4195fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004196ac_test_CFLAGS=${CFLAGS+set}
4197ac_save_CFLAGS=$CFLAGS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4199$as_echo_n "checking whether $CC accepts -g... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004200if ${ac_cv_prog_cc_g+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004201 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004202else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004203 ac_save_c_werror_flag=$ac_c_werror_flag
4204 ac_c_werror_flag=yes
4205 ac_cv_prog_cc_g=no
4206 CFLAGS="-g"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004207 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004208/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004209
Martin v. Löwis11437992002-04-12 09:54:03 +00004210int
4211main ()
4212{
4213
4214 ;
4215 return 0;
4216}
4217_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004218if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004219 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004220else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004221 CFLAGS=""
4222 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004223/* end confdefs.h. */
4224
4225int
4226main ()
4227{
4228
4229 ;
4230 return 0;
4231}
4232_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004233if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004234
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004235else
4236 ac_c_werror_flag=$ac_save_c_werror_flag
Martin v. Löwiseba40652007-08-30 20:10:57 +00004237 CFLAGS="-g"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004238 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004239/* end confdefs.h. */
4240
4241int
4242main ()
4243{
4244
4245 ;
4246 return 0;
4247}
4248_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004249if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004250 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004251fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004252rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004253fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004254rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4255fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004256rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4257 ac_c_werror_flag=$ac_save_c_werror_flag
4258fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004259{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4260$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004261if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004262 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004263elif test $ac_cv_prog_cc_g = yes; then
4264 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004265 CFLAGS="-g -O2"
4266 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004267 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004268 fi
4269else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004270 if test "$GCC" = yes; then
4271 CFLAGS="-O2"
4272 else
4273 CFLAGS=
4274 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004275fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4277$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004278if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004279 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004280else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004281 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004282ac_save_CC=$CC
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004283cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004284/* end confdefs.h. */
4285#include <stdarg.h>
4286#include <stdio.h>
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004287struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004288/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4289struct buf { int x; };
4290FILE * (*rcsopen) (struct buf *, struct stat *, int);
4291static char *e (p, i)
4292 char **p;
4293 int i;
4294{
4295 return p[i];
4296}
4297static char *f (char * (*g) (char **, int), char **p, ...)
4298{
4299 char *s;
4300 va_list v;
4301 va_start (v,p);
4302 s = g (p, va_arg (v,int));
4303 va_end (v);
4304 return s;
4305}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004306
4307/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4308 function prototypes and stuff, but not '\xHH' hex character constants.
4309 These don't provoke an error unfortunately, instead are silently treated
Martin v. Löwiseba40652007-08-30 20:10:57 +00004310 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004311 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4312 array size at least. It's necessary to write '\x00'==0 to get something
Martin v. Löwiseba40652007-08-30 20:10:57 +00004313 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004314int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4315
Martin v. Löwiseba40652007-08-30 20:10:57 +00004316/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4317 inside strings and character constants. */
4318#define FOO(x) 'x'
4319int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4320
Skip Montanaro6dead952003-09-25 14:50:04 +00004321int test (int i, double x);
4322struct s1 {int (*f) (int a);};
4323struct s2 {int (*f) (double a);};
4324int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4325int argc;
4326char **argv;
4327int
4328main ()
4329{
4330return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4331 ;
4332 return 0;
4333}
4334_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00004335for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4336 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004337do
4338 CC="$ac_save_CC $ac_arg"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004339 if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004340 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004341fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004342rm -f core conftest.err conftest.$ac_objext
4343 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004344done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004345rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004346CC=$ac_save_CC
4347
4348fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004349# AC_CACHE_VAL
4350case "x$ac_cv_prog_cc_c89" in
4351 x)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4353$as_echo "none needed" >&6; } ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00004354 xno)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4356$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004357 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00004358 CC="$CC $ac_cv_prog_cc_c89"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4360$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004361esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004362if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004363
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004364fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004365
Martin v. Löwis11437992002-04-12 09:54:03 +00004366ac_ext=c
4367ac_cpp='$CPP $CPPFLAGS'
4368ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4369ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4370ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004371
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00004372if test ! -z "$preset_cflags"
4373then
4374 CFLAGS=$preset_cflags
4375fi
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004376
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004377
4378
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4380$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004381
Martin v. Löwiseba40652007-08-30 20:10:57 +00004382# Check whether --with-cxx_main was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004383if test "${with_cxx_main+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004384 withval=$with_cxx_main;
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004385
4386 case $withval in
4387 no) with_cxx_main=no
4388 MAINCC='$(CC)';;
4389 yes) with_cxx_main=yes
4390 MAINCC='$(CXX)';;
4391 *) with_cxx_main=yes
4392 MAINCC=$withval
4393 if test -z "$CXX"
4394 then
4395 CXX=$withval
4396 fi;;
4397 esac
4398else
4399
4400 with_cxx_main=no
4401 MAINCC='$(CC)'
4402
Martin v. Löwiseba40652007-08-30 20:10:57 +00004403fi
4404
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004405{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4406$as_echo "$with_cxx_main" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004407
4408preset_cxx="$CXX"
4409if test -z "$CXX"
4410then
4411 case "$CC" in
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004412 gcc) if test -n "$ac_tool_prefix"; then
4413 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4414set dummy ${ac_tool_prefix}g++; ac_word=$2
4415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4416$as_echo_n "checking for $ac_word... " >&6; }
4417if ${ac_cv_path_CXX+:} false; then :
4418 $as_echo_n "(cached) " >&6
4419else
4420 case $CXX in
4421 [\\/]* | ?:[\\/]*)
4422 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4423 ;;
4424 *)
4425 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4426for as_dir in notfound
4427do
4428 IFS=$as_save_IFS
4429 test -z "$as_dir" && as_dir=.
4430 for ac_exec_ext in '' $ac_executable_extensions; do
4431 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4432 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4433 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4434 break 2
4435 fi
4436done
4437 done
4438IFS=$as_save_IFS
4439
4440 ;;
4441esac
4442fi
4443CXX=$ac_cv_path_CXX
4444if test -n "$CXX"; then
4445 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4446$as_echo "$CXX" >&6; }
4447else
4448 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4449$as_echo "no" >&6; }
4450fi
4451
4452
4453fi
4454if test -z "$ac_cv_path_CXX"; then
4455 ac_pt_CXX=$CXX
4456 # Extract the first word of "g++", so it can be a program name with args.
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004457set dummy g++; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4459$as_echo_n "checking for $ac_word... " >&6; }
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004460if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004461 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004462else
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004463 case $ac_pt_CXX in
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004464 [\\/]* | ?:[\\/]*)
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004465 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 +00004466 ;;
4467 *)
4468 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4469for as_dir in notfound
4470do
4471 IFS=$as_save_IFS
4472 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004473 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004474 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004475 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004476 $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 +00004477 break 2
4478 fi
4479done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004480 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004481IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004482
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004483 ;;
4484esac
4485fi
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004486ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4487if test -n "$ac_pt_CXX"; then
4488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4489$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004490else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4492$as_echo "no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004493fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004494
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004495 if test "x$ac_pt_CXX" = x; then
4496 CXX="g++"
4497 else
4498 case $cross_compiling:$ac_tool_warned in
4499yes:)
4500{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4501$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4502ac_tool_warned=yes ;;
4503esac
4504 CXX=$ac_pt_CXX
4505 fi
4506else
4507 CXX="$ac_cv_path_CXX"
4508fi
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004509 ;;
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004510 cc) if test -n "$ac_tool_prefix"; then
4511 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4512set dummy ${ac_tool_prefix}c++; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4514$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004515if ${ac_cv_path_CXX+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004516 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004517else
4518 case $CXX in
4519 [\\/]* | ?:[\\/]*)
4520 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4521 ;;
4522 *)
4523 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4524for as_dir in notfound
4525do
4526 IFS=$as_save_IFS
4527 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004528 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004529 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004530 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004531 $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 +00004532 break 2
4533 fi
4534done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004535 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004536IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004537
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004538 ;;
4539esac
4540fi
4541CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00004542if test -n "$CXX"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004543 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4544$as_echo "$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004545else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4547$as_echo "no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004548fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004549
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004550
4551fi
4552if test -z "$ac_cv_path_CXX"; then
4553 ac_pt_CXX=$CXX
4554 # Extract the first word of "c++", so it can be a program name with args.
4555set dummy c++; ac_word=$2
4556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4557$as_echo_n "checking for $ac_word... " >&6; }
4558if ${ac_cv_path_ac_pt_CXX+:} false; then :
4559 $as_echo_n "(cached) " >&6
4560else
4561 case $ac_pt_CXX in
4562 [\\/]* | ?:[\\/]*)
4563 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4564 ;;
4565 *)
4566 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4567for as_dir in notfound
4568do
4569 IFS=$as_save_IFS
4570 test -z "$as_dir" && as_dir=.
4571 for ac_exec_ext in '' $ac_executable_extensions; do
4572 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4573 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4574 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4575 break 2
4576 fi
4577done
4578 done
4579IFS=$as_save_IFS
4580
4581 ;;
4582esac
4583fi
4584ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4585if test -n "$ac_pt_CXX"; then
4586 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4587$as_echo "$ac_pt_CXX" >&6; }
4588else
4589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4590$as_echo "no" >&6; }
4591fi
4592
4593 if test "x$ac_pt_CXX" = x; then
4594 CXX="c++"
4595 else
4596 case $cross_compiling:$ac_tool_warned in
4597yes:)
4598{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4599$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4600ac_tool_warned=yes ;;
4601esac
4602 CXX=$ac_pt_CXX
4603 fi
4604else
4605 CXX="$ac_cv_path_CXX"
4606fi
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004607 ;;
4608 esac
4609 if test "$CXX" = "notfound"
4610 then
4611 CXX=""
4612 fi
4613fi
4614if test -z "$CXX"
4615then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004616 if test -n "$ac_tool_prefix"; then
4617 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4618 do
4619 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4620set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4622$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004623if ${ac_cv_prog_CXX+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004624 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004625else
4626 if test -n "$CXX"; then
4627 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4628else
4629as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4630for as_dir in $PATH
4631do
4632 IFS=$as_save_IFS
4633 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004634 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004635 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004636 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004637 $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 +00004638 break 2
4639 fi
4640done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004641 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004642IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004643
4644fi
4645fi
4646CXX=$ac_cv_prog_CXX
4647if test -n "$CXX"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4649$as_echo "$CXX" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004650else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4652$as_echo "no" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004653fi
4654
Martin v. Löwiseba40652007-08-30 20:10:57 +00004655
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004656 test -n "$CXX" && break
4657 done
4658fi
4659if test -z "$CXX"; then
4660 ac_ct_CXX=$CXX
4661 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4662do
4663 # Extract the first word of "$ac_prog", so it can be a program name with args.
4664set dummy $ac_prog; ac_word=$2
4665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4666$as_echo_n "checking for $ac_word... " >&6; }
4667if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4668 $as_echo_n "(cached) " >&6
4669else
4670 if test -n "$ac_ct_CXX"; then
4671 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4672else
4673as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4674for as_dir in $PATH
4675do
4676 IFS=$as_save_IFS
4677 test -z "$as_dir" && as_dir=.
4678 for ac_exec_ext in '' $ac_executable_extensions; do
4679 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4680 ac_cv_prog_ac_ct_CXX="$ac_prog"
4681 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4682 break 2
4683 fi
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004684done
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004685 done
4686IFS=$as_save_IFS
4687
4688fi
4689fi
4690ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4691if test -n "$ac_ct_CXX"; then
4692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4693$as_echo "$ac_ct_CXX" >&6; }
4694else
4695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4696$as_echo "no" >&6; }
4697fi
4698
4699
4700 test -n "$ac_ct_CXX" && break
4701done
4702
4703 if test "x$ac_ct_CXX" = x; then
4704 CXX="notfound"
4705 else
4706 case $cross_compiling:$ac_tool_warned in
4707yes:)
4708{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4709$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4710ac_tool_warned=yes ;;
4711esac
4712 CXX=$ac_ct_CXX
4713 fi
4714fi
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004715
4716 if test "$CXX" = "notfound"
4717 then
4718 CXX=""
4719 fi
4720fi
4721if test "$preset_cxx" != "$CXX"
4722then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004723 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004724
4725 By default, distutils will build C++ extension modules with \"$CXX\".
4726 If this is not intended, then set CXX on the configure command line.
4727 " >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004728$as_echo "$as_me: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004729
4730 By default, distutils will build C++ extension modules with \"$CXX\".
4731 If this is not intended, then set CXX on the configure command line.
4732 " >&2;}
4733fi
4734
doko@python.org4e63fbe2013-01-25 13:08:27 +01004735MULTIARCH=$($CC --print-multiarch 2>/dev/null)
4736
4737
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004738
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004739# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004740
4741ac_ext=c
4742ac_cpp='$CPP $CPPFLAGS'
4743ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4744ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4745ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4747$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004748# On Suns, sometimes $CPP names a directory.
4749if test -n "$CPP" && test -d "$CPP"; then
4750 CPP=
4751fi
4752if test -z "$CPP"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +01004753 if ${ac_cv_prog_CPP+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004754 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004755else
Martin v. Löwis11437992002-04-12 09:54:03 +00004756 # Double quotes because CPP needs to be expanded
4757 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4758 do
4759 ac_preproc_ok=false
4760for ac_c_preproc_warn_flag in '' yes
4761do
4762 # Use a header file that comes with gcc, so configuring glibc
4763 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004764 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4765 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004766 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004767 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004768 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004769/* end confdefs.h. */
4770#ifdef __STDC__
4771# include <limits.h>
4772#else
4773# include <assert.h>
4774#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004775 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004776_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004777if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004778
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004779else
Martin v. Löwis11437992002-04-12 09:54:03 +00004780 # Broken: fails on valid input.
4781continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004782fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004783rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004784
Martin v. Löwiseba40652007-08-30 20:10:57 +00004785 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004786 # can be detected and how.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004787 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004788/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004789#include <ac_nonexistent.h>
4790_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004791if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004792 # Broken: success on invalid input.
4793continue
4794else
Martin v. Löwis11437992002-04-12 09:54:03 +00004795 # Passes both tests.
4796ac_preproc_ok=:
4797break
4798fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004799rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004800
4801done
4802# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004803rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004804if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004805 break
4806fi
4807
4808 done
4809 ac_cv_prog_CPP=$CPP
4810
4811fi
4812 CPP=$ac_cv_prog_CPP
4813else
4814 ac_cv_prog_CPP=$CPP
4815fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004816{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4817$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004818ac_preproc_ok=false
4819for ac_c_preproc_warn_flag in '' yes
4820do
4821 # Use a header file that comes with gcc, so configuring glibc
4822 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004823 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4824 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004825 # On the NeXT, cc -E runs the code through the compiler's parser,
4826 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004827 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004828/* end confdefs.h. */
4829#ifdef __STDC__
4830# include <limits.h>
4831#else
4832# include <assert.h>
4833#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004834 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004835_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004836if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004837
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004838else
Martin v. Löwis11437992002-04-12 09:54:03 +00004839 # Broken: fails on valid input.
4840continue
4841fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004842rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004843
Martin v. Löwiseba40652007-08-30 20:10:57 +00004844 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004845 # can be detected and how.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004846 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004847/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004848#include <ac_nonexistent.h>
4849_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004850if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004851 # Broken: success on invalid input.
4852continue
4853else
Martin v. Löwis11437992002-04-12 09:54:03 +00004854 # Passes both tests.
4855ac_preproc_ok=:
4856break
4857fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004858rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004859
4860done
4861# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004862rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004863if $ac_preproc_ok; then :
4864
Martin v. Löwis11437992002-04-12 09:54:03 +00004865else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004866 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4867$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004868as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
Matthias Klose3cef2a92012-03-14 23:39:33 +01004869See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004870fi
4871
4872ac_ext=c
4873ac_cpp='$CPP $CPPFLAGS'
4874ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4875ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4876ac_compiler_gnu=$ac_cv_c_compiler_gnu
4877
4878
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4880$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004881if ${ac_cv_path_GREP+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004882 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004883else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004884 if test -z "$GREP"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004885 ac_path_GREP_found=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004886 # Loop through the user's path and test for each of PROGNAME-LIST
4887 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00004888for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4889do
4890 IFS=$as_save_IFS
4891 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004892 for ac_prog in grep ggrep; do
4893 for ac_exec_ext in '' $ac_executable_extensions; do
4894 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004895 as_fn_executable_p "$ac_path_GREP" || continue
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004896# Check for GNU ac_path_GREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004897 # Check for GNU $ac_path_GREP
4898case `"$ac_path_GREP" --version 2>&1` in
4899*GNU*)
4900 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4901*)
4902 ac_count=0
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004903 $as_echo_n 0123456789 >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004904 while :
4905 do
4906 cat "conftest.in" "conftest.in" >"conftest.tmp"
4907 mv "conftest.tmp" "conftest.in"
4908 cp "conftest.in" "conftest.nl"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004909 $as_echo 'GREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004910 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4911 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004912 as_fn_arith $ac_count + 1 && ac_count=$as_val
Martin v. Löwiseba40652007-08-30 20:10:57 +00004913 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4914 # Best one so far, save it but keep looking for a better one
4915 ac_cv_path_GREP="$ac_path_GREP"
4916 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00004917 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004918 # 10*(2^10) chars as input seems more than enough
4919 test $ac_count -gt 10 && break
4920 done
4921 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4922esac
4923
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004924 $ac_path_GREP_found && break 3
4925 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004926 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004927 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004928IFS=$as_save_IFS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004929 if test -z "$ac_cv_path_GREP"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004930 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 +00004931 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004932else
4933 ac_cv_path_GREP=$GREP
4934fi
4935
Martin v. Löwiseba40652007-08-30 20:10:57 +00004936fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004937{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4938$as_echo "$ac_cv_path_GREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00004939 GREP="$ac_cv_path_GREP"
4940
4941
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4943$as_echo_n "checking for egrep... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004944if ${ac_cv_path_EGREP+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004945 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +00004946else
4947 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4948 then ac_cv_path_EGREP="$GREP -E"
4949 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004950 if test -z "$EGREP"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004951 ac_path_EGREP_found=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004952 # Loop through the user's path and test for each of PROGNAME-LIST
4953 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00004954for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4955do
4956 IFS=$as_save_IFS
4957 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004958 for ac_prog in egrep; do
4959 for ac_exec_ext in '' $ac_executable_extensions; do
4960 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004961 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004962# Check for GNU ac_path_EGREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004963 # Check for GNU $ac_path_EGREP
4964case `"$ac_path_EGREP" --version 2>&1` in
4965*GNU*)
4966 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4967*)
4968 ac_count=0
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004969 $as_echo_n 0123456789 >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004970 while :
4971 do
4972 cat "conftest.in" "conftest.in" >"conftest.tmp"
4973 mv "conftest.tmp" "conftest.in"
4974 cp "conftest.in" "conftest.nl"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004975 $as_echo 'EGREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004976 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4977 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004978 as_fn_arith $ac_count + 1 && ac_count=$as_val
Martin v. Löwiseba40652007-08-30 20:10:57 +00004979 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4980 # Best one so far, save it but keep looking for a better one
4981 ac_cv_path_EGREP="$ac_path_EGREP"
4982 ac_path_EGREP_max=$ac_count
4983 fi
4984 # 10*(2^10) chars as input seems more than enough
4985 test $ac_count -gt 10 && break
4986 done
4987 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4988esac
4989
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004990 $ac_path_EGREP_found && break 3
4991 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004992 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004993 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004994IFS=$as_save_IFS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004995 if test -z "$ac_cv_path_EGREP"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004996 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 +00004997 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004998else
4999 ac_cv_path_EGREP=$EGREP
5000fi
5001
Martin v. Löwiseba40652007-08-30 20:10:57 +00005002 fi
5003fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005004{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5005$as_echo "$ac_cv_path_EGREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00005006 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005007
5008
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5010$as_echo_n "checking for ANSI C header files... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005011if ${ac_cv_header_stdc+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005012 $as_echo_n "(cached) " >&6
5013else
5014 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00005015/* end confdefs.h. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005016#include <stdlib.h>
5017#include <stdarg.h>
5018#include <string.h>
5019#include <float.h>
5020
5021int
5022main ()
5023{
5024
5025 ;
5026 return 0;
5027}
5028_ACEOF
5029if ac_fn_c_try_compile "$LINENO"; then :
5030 ac_cv_header_stdc=yes
5031else
5032 ac_cv_header_stdc=no
5033fi
5034rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5035
5036if test $ac_cv_header_stdc = yes; then
5037 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5038 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5039/* end confdefs.h. */
5040#include <string.h>
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00005041
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00005042_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005043if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005044 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005045
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005046else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005047 ac_cv_header_stdc=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005048fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00005049rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005050
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005051fi
5052
5053if test $ac_cv_header_stdc = yes; then
5054 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5055 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5056/* end confdefs.h. */
5057#include <stdlib.h>
5058
5059_ACEOF
5060if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5061 $EGREP "free" >/dev/null 2>&1; then :
5062
5063else
5064 ac_cv_header_stdc=no
5065fi
5066rm -f conftest*
5067
5068fi
5069
5070if test $ac_cv_header_stdc = yes; then
5071 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5072 if test "$cross_compiling" = yes; then :
5073 :
5074else
5075 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5076/* end confdefs.h. */
5077#include <ctype.h>
5078#include <stdlib.h>
5079#if ((' ' & 0x0FF) == 0x020)
5080# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5081# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5082#else
5083# define ISLOWER(c) \
5084 (('a' <= (c) && (c) <= 'i') \
5085 || ('j' <= (c) && (c) <= 'r') \
5086 || ('s' <= (c) && (c) <= 'z'))
5087# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5088#endif
5089
5090#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5091int
5092main ()
5093{
5094 int i;
5095 for (i = 0; i < 256; i++)
5096 if (XOR (islower (i), ISLOWER (i))
5097 || toupper (i) != TOUPPER (i))
5098 return 2;
5099 return 0;
5100}
5101_ACEOF
5102if ac_fn_c_try_run "$LINENO"; then :
5103
5104else
5105 ac_cv_header_stdc=no
5106fi
5107rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5108 conftest.$ac_objext conftest.beam conftest.$ac_ext
5109fi
5110
5111fi
5112fi
5113{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5114$as_echo "$ac_cv_header_stdc" >&6; }
5115if test $ac_cv_header_stdc = yes; then
5116
5117$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5118
5119fi
5120
5121# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5122for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5123 inttypes.h stdint.h unistd.h
5124do :
5125 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5126ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5127"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00005128if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005129 cat >>confdefs.h <<_ACEOF
5130#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5131_ACEOF
5132
5133fi
5134
5135done
5136
5137
5138
5139 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 +01005140if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005141 MINIX=yes
5142else
5143 MINIX=
5144fi
5145
5146
5147 if test "$MINIX" = yes; then
5148
5149$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5150
5151
5152$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5153
5154
5155$as_echo "#define _MINIX 1" >>confdefs.h
5156
5157 fi
5158
5159
5160 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5161$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005162if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005163 $as_echo_n "(cached) " >&6
5164else
5165 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5166/* end confdefs.h. */
5167
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005168# define __EXTENSIONS__ 1
5169 $ac_includes_default
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005170int
5171main ()
5172{
5173
5174 ;
5175 return 0;
5176}
5177_ACEOF
5178if ac_fn_c_try_compile "$LINENO"; then :
5179 ac_cv_safe_to_define___extensions__=yes
5180else
5181 ac_cv_safe_to_define___extensions__=no
5182fi
5183rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5184fi
5185{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5186$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5187 test $ac_cv_safe_to_define___extensions__ = yes &&
5188 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5189
5190 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5191
5192 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5193
5194 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5195
5196 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5197
5198
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005199
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005200# Check for unsupported systems
5201case $ac_sys_system/$ac_sys_release in
5202atheos*|Linux*/1*)
5203 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5204 echo See README for details.
5205 exit 1;;
5206esac
5207
5208
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5210$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005211
5212# Check whether --with-suffix was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005213if test "${with_suffix+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005214 withval=$with_suffix;
5215 case $withval in
5216 no) EXEEXT=;;
5217 yes) EXEEXT=.exe;;
5218 *) EXEEXT=$withval;;
5219 esac
5220fi
5221
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005222{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5223$as_echo "$EXEEXT" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005224
5225# Test whether we're running on a non-case-sensitive system, in which
5226# case we give a warning if no ext is given
5227
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5229$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005230if test ! -d CaseSensitiveTestDir; then
5231mkdir CaseSensitiveTestDir
5232fi
5233
5234if test -d casesensitivetestdir
5235then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005236 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5237$as_echo "yes" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005238 BUILDEXEEXT=.exe
5239else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5241$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005242 BUILDEXEEXT=$EXEEXT
5243fi
5244rmdir CaseSensitiveTestDir
5245
5246case $MACHDEP in
5247bsdos*)
5248 case $CC in
5249 gcc) CC="$CC -D_HAVE_BSDI";;
5250 esac;;
5251esac
5252
5253case $ac_sys_system in
5254hp*|HP*)
5255 case $CC in
5256 cc|*/cc) CC="$CC -Ae";;
5257 esac;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005258SunOS*)
5259 # Some functions have a prototype only with that define, e.g. confstr
5260
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005261$as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005262
5263 ;;
5264esac
5265
5266
5267
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5269$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005270if test -z "$LIBRARY"
5271then
5272 LIBRARY='libpython$(VERSION).a'
5273fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005274{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5275$as_echo "$LIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005276
5277# LDLIBRARY is the name of the library to link against (as opposed to the
5278# name of the library into which to insert object files). BLDLIBRARY is also
5279# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5280# is blank as the main program is not linked directly against LDLIBRARY.
5281# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5282# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5283# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5284# DLLLIBRARY is the shared (i.e., DLL) library.
5285#
5286# RUNSHARED is used to run shared python without installed libraries
5287#
5288# INSTSONAME is the name of the shared library that will be use to install
5289# on the system - some systems like version suffix, others don't
5290
5291
5292
5293
5294
5295
5296LDLIBRARY="$LIBRARY"
5297BLDLIBRARY='$(LDLIBRARY)'
5298INSTSONAME='$(LDLIBRARY)'
5299DLLLIBRARY=''
5300LDLIBRARYDIR=''
5301RUNSHARED=''
5302
5303# LINKCC is the command that links the python executable -- default is $(CC).
5304# If CXX is set, and if it is needed to link a main function that was
5305# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5306# python might then depend on the C++ runtime
5307# This is altered for AIX in order to build the export list before
5308# linking.
5309
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5311$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005312if test -z "$LINKCC"
5313then
5314 LINKCC='$(PURIFY) $(MAINCC)'
5315 case $ac_sys_system in
5316 AIX*)
5317 exp_extra="\"\""
5318 if test $ac_sys_release -ge 5 -o \
5319 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5320 exp_extra="."
5321 fi
5322 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005323 QNX*)
5324 # qcc must be used because the other compilers do not
5325 # support -N.
5326 LINKCC=qcc;;
5327 esac
5328fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005329{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5330$as_echo "$LINKCC" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005331
5332# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5333# make sure we default having it set to "no": this is used by
5334# distutils.unixccompiler to know if it should add --enable-new-dtags
5335# to linker command lines, and failing to detect GNU ld simply results
5336# in the same bahaviour as before.
5337
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5339$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005340ac_prog=ld
5341if test "$GCC" = yes; then
5342 ac_prog=`$CC -print-prog-name=ld`
5343fi
5344case `"$ac_prog" -V 2>&1 < /dev/null` in
5345 *GNU*)
5346 GNULD=yes;;
5347 *)
5348 GNULD=no;;
5349esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005350{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5351$as_echo "$GNULD" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005352
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5354$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005355# Check whether --enable-shared was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005356if test "${enable_shared+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005357 enableval=$enable_shared;
5358fi
5359
5360
5361if test -z "$enable_shared"
5362then
5363 case $ac_sys_system in
5364 CYGWIN* | atheos*)
5365 enable_shared="yes";;
5366 *)
5367 enable_shared="no";;
5368 esac
5369fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005370{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5371$as_echo "$enable_shared" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005372
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5374$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005375# Check whether --enable-profiling was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005376if test "${enable_profiling+set}" = set; then :
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005377 enableval=$enable_profiling;
5378fi
5379
5380if test "x$enable_profiling" = xyes; then
5381 ac_save_cc="$CC"
Benjamin Petersonb9be7bb2013-03-26 08:55:37 -04005382 CC="$CC -pg"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005383 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005384/* end confdefs.h. */
5385int main() { return 0; }
5386_ACEOF
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005387if ac_fn_c_try_link "$LINENO"; then :
5388
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005389else
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005390 enable_profiling=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005391fi
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005392rm -f core conftest.err conftest.$ac_objext \
5393 conftest$ac_exeext conftest.$ac_ext
5394 CC="$ac_save_cc"
5395else
5396 enable_profiling=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005397fi
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005398{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5399$as_echo "$enable_profiling" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005400
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005401if test "x$enable_profiling" = xyes; then
5402 BASECFLAGS="-pg $BASECFLAGS"
5403 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005404fi
5405
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5407$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005408
5409# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5410# library that we build, but we do not want to link against it (we
5411# will find it with a -framework option). For this reason there is an
5412# extra variable BLDLIBRARY against which Python and the extension
5413# modules are linked, BLDLIBRARY. This is normally the same as
5414# LDLIBRARY, but empty for MacOSX framework builds.
5415if test "$enable_framework"
5416then
5417 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005418 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005419 BLDLIBRARY=''
5420else
5421 BLDLIBRARY='$(LDLIBRARY)'
5422fi
5423
5424# Other platforms follow
5425if test $enable_shared = "yes"; then
5426
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005427$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005428
5429 case $ac_sys_system in
5430 BeOS*)
5431 LDLIBRARY='libpython$(VERSION).so'
5432 ;;
5433 CYGWIN*)
5434 LDLIBRARY='libpython$(VERSION).dll.a'
5435 DLLLIBRARY='libpython$(VERSION).dll'
5436 ;;
5437 SunOS*)
5438 LDLIBRARY='libpython$(VERSION).so'
5439 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005440 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005441 INSTSONAME="$LDLIBRARY".$SOVERSION
5442 ;;
Charles-François Natali3de8c732011-07-24 22:33:35 +02005443 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005444 LDLIBRARY='libpython$(VERSION).so'
5445 BLDLIBRARY='-L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005446 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005447 case $ac_sys_system in
5448 FreeBSD*)
5449 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
5450 ;;
5451 esac
5452 INSTSONAME="$LDLIBRARY".$SOVERSION
5453 ;;
5454 hp*|HP*)
5455 case `uname -m` in
5456 ia64)
5457 LDLIBRARY='libpython$(VERSION).so'
5458 ;;
5459 *)
5460 LDLIBRARY='libpython$(VERSION).sl'
5461 ;;
5462 esac
5463 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005464 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005465 ;;
5466 OSF*)
5467 LDLIBRARY='libpython$(VERSION).so'
5468 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005469 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005470 ;;
5471 atheos*)
5472 LDLIBRARY='libpython$(VERSION).so'
5473 BLDLIBRARY='-L. -lpython$(VERSION)'
5474 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
5475 ;;
5476 Darwin*)
5477 LDLIBRARY='libpython$(VERSION).dylib'
5478 BLDLIBRARY='-L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005479 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005480 ;;
Antoine Pitrouaabdceb2010-09-10 20:03:17 +00005481 AIX*)
5482 LDLIBRARY='libpython$(VERSION).so'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005483 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrouaabdceb2010-09-10 20:03:17 +00005484 ;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005485
5486 esac
5487else # shared is disabled
5488 case $ac_sys_system in
5489 CYGWIN*)
5490 BLDLIBRARY='$(LIBRARY)'
5491 LDLIBRARY='libpython$(VERSION).dll.a'
5492 ;;
5493 esac
5494fi
5495
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005496if test "$cross_compiling" = yes; then
5497 RUNSHARED=
5498fi
5499
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005500{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5501$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005502
5503if test -n "$ac_tool_prefix"; then
5504 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5505set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5507$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005508if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005509 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005510else
5511 if test -n "$RANLIB"; then
5512 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5513else
5514as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5515for as_dir in $PATH
5516do
5517 IFS=$as_save_IFS
5518 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005519 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005520 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005521 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005522 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005523 break 2
5524 fi
5525done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005526 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005527IFS=$as_save_IFS
5528
5529fi
5530fi
5531RANLIB=$ac_cv_prog_RANLIB
5532if test -n "$RANLIB"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5534$as_echo "$RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005535else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5537$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005538fi
5539
5540
5541fi
5542if test -z "$ac_cv_prog_RANLIB"; then
5543 ac_ct_RANLIB=$RANLIB
5544 # Extract the first word of "ranlib", so it can be a program name with args.
5545set dummy ranlib; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005546{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5547$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005548if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005549 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005550else
5551 if test -n "$ac_ct_RANLIB"; then
5552 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5553else
5554as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5555for as_dir in $PATH
5556do
5557 IFS=$as_save_IFS
5558 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005559 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005560 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005561 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005562 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005563 break 2
5564 fi
5565done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005566 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005567IFS=$as_save_IFS
5568
5569fi
5570fi
5571ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5572if test -n "$ac_ct_RANLIB"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5574$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005575else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5577$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005578fi
5579
5580 if test "x$ac_ct_RANLIB" = x; then
5581 RANLIB=":"
5582 else
5583 case $cross_compiling:$ac_tool_warned in
5584yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005585{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5586$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005587ac_tool_warned=yes ;;
5588esac
5589 RANLIB=$ac_ct_RANLIB
5590 fi
5591else
5592 RANLIB="$ac_cv_prog_RANLIB"
5593fi
5594
5595
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005596if test -n "$ac_tool_prefix"; then
5597 for ac_prog in ar aal
5598 do
5599 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5600set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5602$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005603if ${ac_cv_prog_AR+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005604 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005605else
5606 if test -n "$AR"; then
5607 ac_cv_prog_AR="$AR" # Let the user override the test.
5608else
5609as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5610for as_dir in $PATH
5611do
5612 IFS=$as_save_IFS
5613 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005614 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005615 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005616 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005617 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005618 break 2
5619 fi
5620done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005621 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005622IFS=$as_save_IFS
5623
5624fi
5625fi
5626AR=$ac_cv_prog_AR
5627if test -n "$AR"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005628 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5629$as_echo "$AR" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005630else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005631 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5632$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005633fi
5634
5635
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005636 test -n "$AR" && break
5637 done
5638fi
5639if test -z "$AR"; then
5640 ac_ct_AR=$AR
5641 for ac_prog in ar aal
5642do
5643 # Extract the first word of "$ac_prog", so it can be a program name with args.
5644set dummy $ac_prog; ac_word=$2
5645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5646$as_echo_n "checking for $ac_word... " >&6; }
5647if ${ac_cv_prog_ac_ct_AR+:} false; then :
5648 $as_echo_n "(cached) " >&6
5649else
5650 if test -n "$ac_ct_AR"; then
5651 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5652else
5653as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5654for as_dir in $PATH
5655do
5656 IFS=$as_save_IFS
5657 test -z "$as_dir" && as_dir=.
5658 for ac_exec_ext in '' $ac_executable_extensions; do
5659 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5660 ac_cv_prog_ac_ct_AR="$ac_prog"
5661 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5662 break 2
5663 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005664done
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005665 done
5666IFS=$as_save_IFS
5667
5668fi
5669fi
5670ac_ct_AR=$ac_cv_prog_ac_ct_AR
5671if test -n "$ac_ct_AR"; then
5672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5673$as_echo "$ac_ct_AR" >&6; }
5674else
5675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5676$as_echo "no" >&6; }
5677fi
5678
5679
5680 test -n "$ac_ct_AR" && break
5681done
5682
5683 if test "x$ac_ct_AR" = x; then
5684 AR="ar"
5685 else
5686 case $cross_compiling:$ac_tool_warned in
5687yes:)
5688{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5689$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5690ac_tool_warned=yes ;;
5691esac
5692 AR=$ac_ct_AR
5693 fi
5694fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005695
5696
5697# tweak ARFLAGS only if the user didn't set it on the command line
5698
5699if test -z "$ARFLAGS"
5700then
5701 ARFLAGS="rc"
5702fi
5703
5704
5705# Extract the first word of "svnversion", so it can be a program name with args.
5706set dummy svnversion; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5708$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005709if ${ac_cv_prog_SVNVERSION+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005710 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005711else
5712 if test -n "$SVNVERSION"; then
5713 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
5714else
5715as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5716for as_dir in $PATH
5717do
5718 IFS=$as_save_IFS
5719 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005720 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005721 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005722 ac_cv_prog_SVNVERSION="found"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005723 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005724 break 2
5725 fi
5726done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005727 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005728IFS=$as_save_IFS
5729
5730 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
5731fi
5732fi
5733SVNVERSION=$ac_cv_prog_SVNVERSION
5734if test -n "$SVNVERSION"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SVNVERSION" >&5
5736$as_echo "$SVNVERSION" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005737else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5739$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005740fi
5741
5742
5743if test $SVNVERSION = found
5744then
5745 SVNVERSION="svnversion \$(srcdir)"
5746else
5747 SVNVERSION="echo Unversioned directory"
5748fi
5749
Trent Nelsond86ceec2012-10-16 09:42:45 -04005750
Trent Nelsonabf20512012-10-17 04:32:49 -04005751if test "$abs_srcdir" != "$abs_builddir"; then
Trent Nelsond86ceec2012-10-16 09:42:45 -04005752 # If we're building out-of-tree make sure Include (in the current dir)
5753 # gets picked up before its $srcdir counterpart in order for Python-ast.h
5754 # and graminit.h to get picked up from the correct directory.
5755 # (A side effect of this is that these resources will automatically be
5756 # regenerated when building out-of-tree, regardless of whether or not
5757 # the $srcdir counterpart is up-to-date. This is an acceptable trade
5758 # off.)
5759 BASECPPFLAGS="-IInclude"
5760else
5761 BASECPPFLAGS=""
5762fi
5763
Georg Brandl3a5508e2011-03-06 10:42:21 +01005764
5765
5766
5767# Extract the first word of "hg", so it can be a program name with args.
5768set dummy hg; ac_word=$2
5769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5770$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005771if ${ac_cv_prog_HAS_HG+:} false; then :
Georg Brandl3a5508e2011-03-06 10:42:21 +01005772 $as_echo_n "(cached) " >&6
5773else
5774 if test -n "$HAS_HG"; then
5775 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
5776else
5777as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5778for as_dir in $PATH
5779do
5780 IFS=$as_save_IFS
5781 test -z "$as_dir" && as_dir=.
5782 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005783 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Georg Brandl3a5508e2011-03-06 10:42:21 +01005784 ac_cv_prog_HAS_HG="found"
5785 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5786 break 2
5787 fi
5788done
5789 done
5790IFS=$as_save_IFS
5791
5792 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
5793fi
5794fi
5795HAS_HG=$ac_cv_prog_HAS_HG
5796if test -n "$HAS_HG"; then
5797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
5798$as_echo "$HAS_HG" >&6; }
5799else
5800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5801$as_echo "no" >&6; }
5802fi
5803
5804
5805if test $HAS_HG = found
5806then
5807 HGVERSION="hg id -i \$(srcdir)"
5808 HGTAG="hg id -t \$(srcdir)"
5809 HGBRANCH="hg id -b \$(srcdir)"
5810else
5811 HGVERSION=""
5812 HGTAG=""
5813 HGBRANCH=""
5814fi
5815
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005816case $MACHDEP in
5817bsdos*|hp*|HP*)
5818 # install -d does not work on BSDI or HP-UX
5819 if test -z "$INSTALL"
5820 then
5821 INSTALL="${srcdir}/install-sh -c"
5822 fi
5823esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005824# Find a good install program. We prefer a C program (faster),
5825# so one script is as good as another. But avoid the broken or
5826# incompatible versions:
5827# SysV /etc/install, /usr/sbin/install
5828# SunOS /usr/etc/install
5829# IRIX /sbin/install
5830# AIX /bin/install
5831# AmigaOS /C/install, which installs bootblocks on floppy discs
5832# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5833# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5834# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5835# OS/2's system install, which has a completely different semantic
5836# ./install, which can be erroneously created by make from ./install.sh.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005837# Reject install programs that cannot install multiple files.
5838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5839$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005840if test -z "$INSTALL"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +01005841if ${ac_cv_path_install+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005842 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005843else
5844 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5845for as_dir in $PATH
5846do
5847 IFS=$as_save_IFS
5848 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005849 # Account for people who put trailing slashes in PATH elements.
5850case $as_dir/ in #((
5851 ./ | .// | /[cC]/* | \
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005852 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005853 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005854 /usr/ucb/* ) ;;
5855 *)
5856 # OSF1 and SCO ODT 3.0 have their own names for install.
5857 # Don't use installbsd from OSF since it installs stuff as root
5858 # by default.
5859 for ac_prog in ginstall scoinst install; do
5860 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005861 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005862 if test $ac_prog = install &&
5863 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5864 # AIX install. It has an incompatible calling convention.
5865 :
5866 elif test $ac_prog = install &&
5867 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5868 # program-specific install script used by HP pwplus--don't use.
5869 :
5870 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005871 rm -rf conftest.one conftest.two conftest.dir
5872 echo one > conftest.one
5873 echo two > conftest.two
5874 mkdir conftest.dir
5875 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5876 test -s conftest.one && test -s conftest.two &&
5877 test -s conftest.dir/conftest.one &&
5878 test -s conftest.dir/conftest.two
5879 then
5880 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5881 break 3
5882 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005883 fi
5884 fi
5885 done
5886 done
5887 ;;
5888esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005889
5890 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005891IFS=$as_save_IFS
5892
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005893rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005894
5895fi
5896 if test "${ac_cv_path_install+set}" = set; then
5897 INSTALL=$ac_cv_path_install
5898 else
5899 # As a last resort, use the slow shell script. Don't cache a
5900 # value for INSTALL within a source directory, because that will
5901 # break other packages using the cache if that directory is
5902 # removed, or if the value is a relative name.
5903 INSTALL=$ac_install_sh
5904 fi
5905fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005906{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5907$as_echo "$INSTALL" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005908
5909# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5910# It thinks the first close brace ends the variable substitution.
5911test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5912
5913test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5914
5915test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5916
Trent Nelsonf6407a12012-08-30 14:56:13 +00005917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
5918$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
5919if test -z "$MKDIR_P"; then
5920 if ${ac_cv_path_mkdir+:} false; then :
5921 $as_echo_n "(cached) " >&6
5922else
5923 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5924for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
5925do
5926 IFS=$as_save_IFS
5927 test -z "$as_dir" && as_dir=.
5928 for ac_prog in mkdir gmkdir; do
5929 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005930 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Trent Nelsonf6407a12012-08-30 14:56:13 +00005931 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
5932 'mkdir (GNU coreutils) '* | \
5933 'mkdir (coreutils) '* | \
5934 'mkdir (fileutils) '4.1*)
5935 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
5936 break 3;;
5937 esac
5938 done
5939 done
5940 done
5941IFS=$as_save_IFS
5942
5943fi
5944
5945 test -d ./--version && rmdir ./--version
5946 if test "${ac_cv_path_mkdir+set}" = set; then
5947 MKDIR_P="$ac_cv_path_mkdir -p"
5948 else
5949 # As a last resort, use the slow shell script. Don't cache a
5950 # value for MKDIR_P within a source directory, because that will
5951 # break other packages using the cache if that directory is
5952 # removed, or if the value is a relative name.
5953 MKDIR_P="$ac_install_sh -d"
5954 fi
5955fi
5956{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
5957$as_echo "$MKDIR_P" >&6; }
5958
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005959
5960# Not every filesystem supports hard links
5961
5962if test -z "$LN" ; then
5963 case $ac_sys_system in
5964 BeOS*) LN="ln -s";;
5965 CYGWIN*) LN="ln -s";;
5966 atheos*) LN="ln -s";;
5967 *) LN=ln;;
5968 esac
5969fi
5970
5971# Check for --with-pydebug
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
5973$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005974
5975# Check whether --with-pydebug was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005976if test "${with_pydebug+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005977 withval=$with_pydebug;
5978if test "$withval" != no
5979then
5980
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005981$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005982
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5984$as_echo "yes" >&6; };
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005985 Py_DEBUG='true'
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005986else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5987$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005988fi
5989else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5991$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005992fi
5993
5994
5995# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5996# merged with this chunk of code?
5997
5998# Optimizer/debugger flags
5999# ------------------------
6000# (The following bit of code is complicated enough - please keep things
6001# indented properly. Just pretend you're editing Python code. ;-)
6002
6003# There are two parallel sets of case statements below, one that checks to
6004# see if OPT was set and one that does BASECFLAGS setting based upon
6005# compiler and platform. BASECFLAGS tweaks need to be made even if the
6006# user set OPT.
6007
6008# tweak OPT based on compiler and platform, only if the user didn't set
6009# it on the command line
6010
Benjamin Petersond4b721b2010-03-23 20:58:37 +00006011if test "${OPT-unset}" = "unset"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006012then
6013 case $GCC in
6014 yes)
6015 if test "$CC" != 'g++' ; then
6016 STRICT_PROTO="-Wstrict-prototypes"
6017 fi
6018 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6019 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6020 WRAP="-fwrapv"
6021 fi
Stefan Krah503e5e12011-09-14 15:19:42 +02006022
6023 # Clang also needs -fwrapv
Stefan Krah2bc1e8f2011-12-08 22:26:06 +01006024 case $CC in
6025 *clang*) WRAP="-fwrapv"
6026 ;;
6027 esac
Stefan Krah503e5e12011-09-14 15:19:42 +02006028
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006029 case $ac_cv_prog_cc_g in
6030 yes)
6031 if test "$Py_DEBUG" = 'true' ; then
6032 # Optimization messes up debuggers, so turn it off for
6033 # debug builds.
Mark Dickinsond2f3e3f2010-05-05 22:23:58 +00006034 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006035 else
6036 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
6037 fi
6038 ;;
6039 *)
6040 OPT="-O3 -Wall $STRICT_PROTO"
6041 ;;
6042 esac
6043 case $ac_sys_system in
6044 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6045 ;;
6046 esac
6047 ;;
6048
6049 *)
6050 OPT="-O"
6051 ;;
6052 esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006053fi
6054
6055
6056
6057# The -arch flags for universal builds on OSX
6058UNIVERSAL_ARCH_FLAGS=
6059
6060
6061# tweak BASECFLAGS based on compiler and platform
6062case $GCC in
6063yes)
6064 # Python violates C99 rules, by casting between incompatible
6065 # pointer types. GCC may generate bad code as a result of that,
6066 # so use -fno-strict-aliasing if supported.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006067 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -fno-strict-aliasing" >&5
6068$as_echo_n "checking whether $CC accepts -fno-strict-aliasing... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006069 ac_save_cc="$CC"
6070 CC="$CC -fno-strict-aliasing"
Matthias Klose3cef2a92012-03-14 23:39:33 +01006071 if ${ac_cv_no_strict_aliasing_ok+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006072 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00006073else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006074 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006075/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00006076
6077int
6078main ()
6079{
Mark Dickinson5e13e292010-05-11 08:55:06 +00006080
Gregory P. Smith373469a2009-11-01 21:03:38 +00006081 ;
6082 return 0;
6083}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006084_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006085if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006086 ac_cv_no_strict_aliasing_ok=yes
6087else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006088 ac_cv_no_strict_aliasing_ok=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006089fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00006090rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00006091fi
6092
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006093 CC="$ac_save_cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing_ok" >&5
6095$as_echo "$ac_cv_no_strict_aliasing_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006096 if test $ac_cv_no_strict_aliasing_ok = yes
6097 then
6098 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6099 fi
6100
6101 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
6102 # support. Without this, treatment of subnormals doesn't follow
6103 # the standard.
doko@python.orgd65e2ba2013-01-31 23:52:03 +01006104 case $host in
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006105 alpha*)
6106 BASECFLAGS="$BASECFLAGS -mieee"
6107 ;;
6108 esac
6109
6110 case $ac_sys_system in
6111 SCO_SV*)
6112 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
6113 ;;
6114 # is there any other compiler on Darwin besides gcc?
6115 Darwin*)
6116 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
6117 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006118 if test "${CC}" = gcc
6119 then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006120 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
6121$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006122 case "${UNIVERSALSDK}" in
6123 */MacOSX10.4u.sdk)
6124 # Build using 10.4 SDK, force usage of gcc when the
6125 # compiler is gcc, otherwise the user will get very
6126 # confusing error messages when building on OSX 10.6
6127 CC=gcc-4.0
6128 CPP=cpp-4.0
6129 ;;
6130 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
6132$as_echo "$CC" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006133 fi
6134
6135 # Calculate the right deployment target for this build.
6136 #
Ned Deilyc40b9032014-06-25 13:48:46 -07006137 cur_target_major=`sw_vers -productVersion | \
6138 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
6139 cur_target_minor=`sw_vers -productVersion | \
6140 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
6141 cur_target="${cur_target_major}.${cur_target_minor}"
6142 if test ${cur_target_major} -eq 10 && \
6143 test ${cur_target_minor} -ge 3
6144 then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006145 cur_target=10.3
Ronald Oussoren25967582009-09-06 10:00:26 +00006146 if test ${enable_universalsdk}; then
6147 if test "${UNIVERSAL_ARCHS}" = "all"; then
6148 # Ensure that the default platform for a
6149 # 4-way universal build is OSX 10.5,
6150 # that's the first OS release where
6151 # 4-way builds make sense.
6152 cur_target='10.5'
Ronald Oussoren23d92532009-09-07 06:12:00 +00006153
6154 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
6155 cur_target='10.5'
6156
6157 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
6158 cur_target='10.5'
6159
6160 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
6161 cur_target='10.5'
Ronald Oussoren25967582009-09-06 10:00:26 +00006162 fi
6163 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00006164 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren25967582009-09-06 10:00:26 +00006165 # On Intel macs default to a deployment
6166 # target of 10.4, that's the first OSX
6167 # release with Intel support.
6168 cur_target="10.4"
6169 fi
6170 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006171 fi
6172 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
6173
6174 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
6175 # environment with a value that is the same as what we'll use
6176 # in the Makefile to ensure that we'll get the same compiler
6177 # environment during configure and build time.
6178 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
6179 export MACOSX_DEPLOYMENT_TARGET
6180 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
6181
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006182 if test "${enable_universalsdk}"; then
6183 UNIVERSAL_ARCH_FLAGS=""
6184 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
6185 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
6186 ARCH_RUN_32BIT=""
Ronald Oussoren75912852010-04-08 08:13:31 +00006187 LIPO_32BIT_FLAGS=""
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006188
6189 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
6190 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
6191 LIPO_32BIT_FLAGS=""
6192 ARCH_RUN_32BIT="true"
6193
6194 elif test "$UNIVERSAL_ARCHS" = "all" ; then
6195 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
6196 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren92397ce2010-01-17 19:32:00 +00006197 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006198
6199 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
6200 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
6201 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren92397ce2010-01-17 19:32:00 +00006202 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006203
6204 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
6205 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
6206 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren9922f172010-02-11 13:19:34 +00006207 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006208
6209 else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006210 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 +00006211
6212 fi
6213
6214
Ronald Oussoren974eb5e2010-04-18 17:59:37 +00006215 CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
6216 if test "${UNIVERSALSDK}" != "/"
6217 then
6218 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
6219 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
6220 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006221 fi
6222
6223 fi
6224
6225
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006226 ;;
6227 OSF*)
6228 BASECFLAGS="$BASECFLAGS -mieee"
6229 ;;
6230 esac
6231 ;;
6232
6233*)
6234 case $ac_sys_system in
6235 OpenUNIX*|UnixWare*)
6236 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
6237 ;;
6238 OSF*)
6239 BASECFLAGS="$BASECFLAGS -ieee -std"
6240 ;;
6241 SCO_SV*)
6242 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
6243 ;;
6244 esac
6245 ;;
6246esac
6247
Zachary Ware6ed42ea2015-12-21 11:43:03 -06006248# ICC needs -fp-model strict or floats behave badly
6249case "$CC" in
6250*icc*)
6251 BASECFLAGS="$BASECFLAGS -fp-model strict"
6252 ;;
6253esac
6254
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006255if test "$Py_DEBUG" = 'true'; then
6256 :
6257else
6258 OPT="-DNDEBUG $OPT"
6259fi
6260
6261if test "$ac_arch_flags"
6262then
6263 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
6264fi
6265
6266# disable check for icc since it seems to pass, but generates a warning
6267if test "$CC" = icc
6268then
6269 ac_cv_opt_olimit_ok=no
6270fi
6271
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -OPT:Olimit=0" >&5
6273$as_echo_n "checking whether $CC accepts -OPT:Olimit=0... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006274if ${ac_cv_opt_olimit_ok+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006275 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006276else
6277 ac_save_cc="$CC"
6278CC="$CC -OPT:Olimit=0"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006279cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006280/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00006281
6282int
6283main ()
6284{
Mark Dickinson5e13e292010-05-11 08:55:06 +00006285
Gregory P. Smith373469a2009-11-01 21:03:38 +00006286 ;
6287 return 0;
6288}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006289_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006290if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006291 ac_cv_opt_olimit_ok=yes
6292else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006293 ac_cv_opt_olimit_ok=no
Matthias Klosec511b472010-05-08 11:01:39 +00006294
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006295fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00006296rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006297CC="$ac_save_cc"
6298fi
6299
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006300{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_opt_olimit_ok" >&5
6301$as_echo "$ac_cv_opt_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006302if test $ac_cv_opt_olimit_ok = yes; then
6303 case $ac_sys_system in
6304 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
6305 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
6306 # environment?
6307 Darwin*)
6308 ;;
Trent Nelson34562e12012-10-17 18:01:12 -04006309 # XXX thankfully this useless troublemaker of a flag has been
6310 # eradicated in the 3.x line. For now, make sure it isn't picked
6311 # up by any of our other platforms that use CC.
6312 AIX*|SunOS*|HP-UX*|IRIX*)
6313 ;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006314 *)
6315 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
6316 ;;
6317 esac
6318else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006319 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Olimit 1500" >&5
6320$as_echo_n "checking whether $CC accepts -Olimit 1500... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006321 if ${ac_cv_olimit_ok+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006322 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006323else
6324 ac_save_cc="$CC"
6325 CC="$CC -Olimit 1500"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006326 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006327/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00006328
6329int
6330main ()
6331{
Mark Dickinson5e13e292010-05-11 08:55:06 +00006332
Gregory P. Smith373469a2009-11-01 21:03:38 +00006333 ;
6334 return 0;
6335}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006336_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006337if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006338 ac_cv_olimit_ok=yes
6339else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006340 ac_cv_olimit_ok=no
Matthias Klosec511b472010-05-08 11:01:39 +00006341
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006342fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00006343rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006344 CC="$ac_save_cc"
6345fi
6346
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_olimit_ok" >&5
6348$as_echo "$ac_cv_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006349 if test $ac_cv_olimit_ok = yes; then
Stefan Krah67473262012-11-29 00:17:05 +01006350 case $ac_sys_system in
6351 # Issue #16534: On HP-UX ac_cv_olimit_ok=yes is a false positive.
6352 HP-UX*)
6353 ;;
6354 *)
6355 BASECFLAGS="$BASECFLAGS -Olimit 1500"
6356 ;;
6357 esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006358 fi
6359fi
6360
6361# Check whether GCC supports PyArg_ParseTuple format
6362if test "$GCC" = "yes"
6363then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006364 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
6365$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006366 save_CFLAGS=$CFLAGS
Benjamin Petersonc8759662013-05-11 13:00:05 -05006367 CFLAGS="$CFLAGS -Werror -Wformat"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006368 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006369/* end confdefs.h. */
6370
6371 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006372int
6373main ()
6374{
6375
6376 ;
6377 return 0;
6378}
Matthias Klosec511b472010-05-08 11:01:39 +00006379
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006380_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006381if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006382
Matthias Klosec511b472010-05-08 11:01:39 +00006383
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006384$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006385
Matthias Klosec511b472010-05-08 11:01:39 +00006386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006387$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00006388
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006389else
Matthias Klosec511b472010-05-08 11:01:39 +00006390
6391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006392$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006393
6394fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006395rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6396 CFLAGS=$save_CFLAGS
6397fi
6398
Brett Cannon4ff151a2015-09-18 15:09:42 -07006399
Gregory P. Smith6d8fdfc2016-09-07 23:28:23 -07006400# Enable optimization flags
6401
6402
6403Py_OPT='false'
6404{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-optimizations" >&5
6405$as_echo_n "checking for --with-optimizations... " >&6; }
6406
6407# Check whether --with-optimizations was given.
6408if test "${with_optimizations+set}" = set; then :
6409 withval=$with_optimizations;
6410if test "$withval" != no
6411then
6412 Py_OPT='true'
6413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6414$as_echo "yes" >&6; };
6415else
6416 Py_OPT='false'
6417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6418$as_echo "no" >&6; };
6419fi
6420else
6421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6422$as_echo "no" >&6; }
6423fi
6424
6425if test "$Py_OPT" = 'true' ; then
6426 case $ac_sys_system in
6427 Darwin*)
6428 # At least on macOS El Capitan, LTO does not work with PGO.
6429 Py_LTO='false'
6430 ;;
6431 esac
6432 Py_LTO='true'
6433 DEF_MAKE_ALL_RULE="profile-opt"
Gregory P. Smith794b2912016-09-08 00:07:40 -07006434 REQUIRE_PGO="yes"
Gregory P. Smith6d8fdfc2016-09-07 23:28:23 -07006435 DEF_MAKE_RULE="build_all"
6436else
6437 DEF_MAKE_ALL_RULE="build_all"
Gregory P. Smith794b2912016-09-08 00:07:40 -07006438 REQUIRE_PGO="no"
Gregory P. Smith6d8fdfc2016-09-07 23:28:23 -07006439 DEF_MAKE_RULE="all"
6440fi
6441
6442
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)c543a0f2016-06-02 23:44:40 +00006443# Enable LTO flags
6444
6445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6446$as_echo_n "checking for --with-lto... " >&6; }
6447
6448# Check whether --with-lto was given.
6449if test "${with_lto+set}" = set; then :
6450 withval=$with_lto;
6451if test "$withval" != no
6452then
6453 Py_LTO='true'
6454 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6455$as_echo "yes" >&6; };
6456else
6457 Py_LTO='false'
6458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6459$as_echo "no" >&6; };
6460fi
6461else
6462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6463$as_echo "no" >&6; }
6464fi
6465
6466if test "$Py_LTO" = 'true' ; then
6467 case $CC in
6468 *clang*)
6469 # Any changes made here should be reflected in the GCC+Darwin case below
6470 LTOFLAGS="-flto"
6471 ;;
6472 *gcc*)
6473 case $ac_sys_system in
6474 Darwin*)
6475 LTOFLAGS="-flto"
6476 ;;
6477 *)
6478 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6479 ;;
6480 esac
6481 ;;
6482 esac
6483fi
6484
6485
Brett Cannon4ff151a2015-09-18 15:09:42 -07006486# Enable PGO flags.
Zachary Ware6ed42ea2015-12-21 11:43:03 -06006487
6488
6489
6490
6491
Gregory P. Smith794b2912016-09-08 00:07:40 -07006492# Make this work on systems where llvm tools are not installed with their
6493# normal names in the default $PATH (ie: Ubuntu). They exist under the
6494# non-suffixed name in their versioned llvm directory.
6495llvm_bin_dir=''
6496llvm_path="${PATH}"
6497if test "${CC}" = "clang"
6498then
6499 clang_bin=`which clang`
6500 # Some systems install clang elsewhere as a symlink to the real path
6501 # which is where the related llvm tools are located.
6502 if test -L "${clang_bin}"
6503 then
6504 clang_dir=`dirname "${clang_bin}"`
6505 clang_bin=`readlink "${clang_bin}"`
6506 llvm_bin_dir="${clang_dir}/"`dirname "${clang_bin}"`
6507 llvm_path="${llvm_path}${PATH_SEPARATOR}${llvm_bin_dir}"
6508 fi
6509fi
Zachary Ware6ed42ea2015-12-21 11:43:03 -06006510
Gregory P. Smith794b2912016-09-08 00:07:40 -07006511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6512$as_echo_n "checking target system type... " >&6; }
6513if ${ac_cv_target+:} false; then :
Brett Cannon4ff151a2015-09-18 15:09:42 -07006514 $as_echo_n "(cached) " >&6
6515else
Gregory P. Smith794b2912016-09-08 00:07:40 -07006516 if test "x$target_alias" = x; then
6517 ac_cv_target=$ac_cv_host
Brett Cannon4ff151a2015-09-18 15:09:42 -07006518else
Gregory P. Smith794b2912016-09-08 00:07:40 -07006519 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6520 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6521fi
6522
6523fi
6524{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6525$as_echo "$ac_cv_target" >&6; }
6526case $ac_cv_target in
6527*-*-*) ;;
6528*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6529esac
6530target=$ac_cv_target
6531ac_save_IFS=$IFS; IFS='-'
6532set x $ac_cv_target
6533shift
6534target_cpu=$1
6535target_vendor=$2
6536shift; shift
6537# Remember, the first character of IFS is used to create $*,
6538# except with old shells:
6539target_os=$*
6540IFS=$ac_save_IFS
6541case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6542
6543
6544# The aliases save the names the user supplied, while $host etc.
6545# will get canonicalized.
6546test -n "$target_alias" &&
6547 test "$program_prefix$program_suffix$program_transform_name" = \
6548 NONENONEs,x,x, &&
6549 program_prefix=${target_alias}-
6550# Extract the first word of "$target_alias-llvm-profdata", so it can be a program name with args.
6551set dummy $target_alias-llvm-profdata; ac_word=$2
6552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6553$as_echo_n "checking for $ac_word... " >&6; }
6554if ${ac_cv_path_LLVM_PROFDATA+:} false; then :
6555 $as_echo_n "(cached) " >&6
6556else
6557 case $LLVM_PROFDATA in
6558 [\\/]* | ?:[\\/]*)
6559 ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path.
6560 ;;
6561 *)
6562 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6563for as_dir in ${llvm_path}
Brett Cannon4ff151a2015-09-18 15:09:42 -07006564do
6565 IFS=$as_save_IFS
6566 test -z "$as_dir" && as_dir=.
6567 for ac_exec_ext in '' $ac_executable_extensions; do
6568 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Gregory P. Smith794b2912016-09-08 00:07:40 -07006569 ac_cv_path_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
Brett Cannon4ff151a2015-09-18 15:09:42 -07006570 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6571 break 2
6572 fi
6573done
6574 done
6575IFS=$as_save_IFS
6576
Gregory P. Smith794b2912016-09-08 00:07:40 -07006577 ;;
6578esac
Brett Cannon4ff151a2015-09-18 15:09:42 -07006579fi
Gregory P. Smith794b2912016-09-08 00:07:40 -07006580LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA
6581if test -n "$LLVM_PROFDATA"; then
6582 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5
6583$as_echo "$LLVM_PROFDATA" >&6; }
Brett Cannon4ff151a2015-09-18 15:09:42 -07006584else
6585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6586$as_echo "no" >&6; }
6587fi
6588
6589
Gregory P. Smith794b2912016-09-08 00:07:40 -07006590if test -z "$ac_cv_path_LLVM_PROFDATA"; then
6591 if test "$build" = "$target"; then
6592 ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA
6593 # Extract the first word of "llvm-profdata", so it can be a program name with args.
6594set dummy llvm-profdata; ac_word=$2
6595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6596$as_echo_n "checking for $ac_word... " >&6; }
6597if ${ac_cv_path_ac_pt_LLVM_PROFDATA+:} false; then :
6598 $as_echo_n "(cached) " >&6
6599else
6600 case $ac_pt_LLVM_PROFDATA in
6601 [\\/]* | ?:[\\/]*)
6602 ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path.
6603 ;;
6604 *)
6605 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6606for as_dir in ${llvm_path}
6607do
6608 IFS=$as_save_IFS
6609 test -z "$as_dir" && as_dir=.
6610 for ac_exec_ext in '' $ac_executable_extensions; do
6611 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6612 ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
6613 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6614 break 2
6615 fi
6616done
6617 done
6618IFS=$as_save_IFS
6619
6620 test -z "$ac_cv_path_ac_pt_LLVM_PROFDATA" && ac_cv_path_ac_pt_LLVM_PROFDATA="''"
6621 ;;
6622esac
6623fi
6624ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA
6625if test -n "$ac_pt_LLVM_PROFDATA"; then
6626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5
6627$as_echo "$ac_pt_LLVM_PROFDATA" >&6; }
6628else
6629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6630$as_echo "no" >&6; }
6631fi
6632
6633 LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA
6634 else
6635 LLVM_PROFDATA="''"
6636 fi
6637else
6638 LLVM_PROFDATA="$ac_cv_path_LLVM_PROFDATA"
6639fi
6640
6641
6642if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
6643then
6644 LLVM_PROF_FOUND="found"
6645else
6646 LLVM_PROF_FOUND="not-found"
6647fi
6648if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
6649then
6650 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
6651 if test -n "${found_llvm_profdata}"
6652 then
6653 # llvm-profdata isn't directly in $PATH in some cases.
6654 # https://apple.stackexchange.com/questions/197053/
6655 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
6656 LLVM_PROF_FOUND=found
6657 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5
6658$as_echo "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;}
6659 fi
6660fi
Brett Cannon4ff151a2015-09-18 15:09:42 -07006661LLVM_PROF_ERR=no
6662case $CC in
6663 *clang*)
6664 # Any changes made here should be reflected in the GCC+Darwin case below
6665 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6666 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith794b2912016-09-08 00:07:40 -07006667 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon4ff151a2015-09-18 15:09:42 -07006668 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6669 if test $LLVM_PROF_FOUND = not-found
6670 then
6671 LLVM_PROF_ERR=yes
Gregory P. Smith794b2912016-09-08 00:07:40 -07006672 if test "${REQUIRE_PGO}" = "yes"
6673 then
6674 as_fn_error $? "llvm-profdata is required for a --with-optimizations build but could not be found." "$LINENO" 5
6675 fi
Brett Cannon4ff151a2015-09-18 15:09:42 -07006676 fi
6677 ;;
6678 *gcc*)
6679 case $ac_sys_system in
6680 Darwin*)
6681 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6682 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith794b2912016-09-08 00:07:40 -07006683 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon4ff151a2015-09-18 15:09:42 -07006684 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
Gregory P. Smith794b2912016-09-08 00:07:40 -07006685 if test "${LLVM_PROF_FOUND}" = "not-found"
Brett Cannon4ff151a2015-09-18 15:09:42 -07006686 then
6687 LLVM_PROF_ERR=yes
Gregory P. Smith794b2912016-09-08 00:07:40 -07006688 if test "${REQUIRE_PGO}" = "yes"
6689 then
6690 as_fn_error $? "llvm-profdata is required for a --with-optimizations build but could not be found." "$LINENO" 5
6691 fi
Brett Cannon4ff151a2015-09-18 15:09:42 -07006692 fi
6693 ;;
6694 *)
6695 PGO_PROF_GEN_FLAG="-fprofile-generate"
6696 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6697 LLVM_PROF_MERGER="true"
6698 LLVM_PROF_FILE=""
6699 ;;
6700 esac
6701 ;;
Zachary Ware6ed42ea2015-12-21 11:43:03 -06006702 *icc*)
6703 PGO_PROF_GEN_FLAG="-prof-gen"
6704 PGO_PROF_USE_FLAG="-prof-use"
6705 LLVM_PROF_MERGER="true"
6706 LLVM_PROF_FILE=""
6707 ;;
Brett Cannon4ff151a2015-09-18 15:09:42 -07006708esac
6709
6710
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006711# On some compilers, pthreads are available without further options
6712# (e.g. MacOS X). On some of these systems, the compiler will not
6713# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
6714# So we have to see first whether pthreads are available without
6715# options before we can check whether -Kpthread improves anything.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
6717$as_echo_n "checking whether pthreads are available without options... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006718if ${ac_cv_pthread_is_default+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006719 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006720else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006721 if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006722 ac_cv_pthread_is_default=no
6723else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006724 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006725/* end confdefs.h. */
6726
Stefan Krahae66ca62012-11-22 22:36:57 +01006727#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006728#include <pthread.h>
6729
6730void* routine(void* p){return NULL;}
6731
6732int main(){
6733 pthread_t p;
6734 if(pthread_create(&p,NULL,routine,NULL)!=0)
6735 return 1;
6736 (void)pthread_detach(p);
6737 return 0;
6738}
6739
6740_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006741if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006742
6743 ac_cv_pthread_is_default=yes
6744 ac_cv_kthread=no
6745 ac_cv_pthread=no
6746
6747else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006748 ac_cv_pthread_is_default=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006749fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006750rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6751 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006752fi
6753
6754
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006755fi
6756
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006757{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
6758$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006759
6760
6761if test $ac_cv_pthread_is_default = yes
6762then
6763 ac_cv_kpthread=no
6764else
6765# -Kpthread, if available, provides the right #defines
6766# and linker options to make pthread_create available
6767# Some compilers won't report that they do not support -Kpthread,
6768# so we need to run a program to see whether it really made the
6769# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
6771$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006772if ${ac_cv_kpthread+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006773 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006774else
6775 ac_save_cc="$CC"
6776CC="$CC -Kpthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006777if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006778 ac_cv_kpthread=no
6779else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006780 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006781/* end confdefs.h. */
6782
Stefan Krahae66ca62012-11-22 22:36:57 +01006783#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006784#include <pthread.h>
6785
6786void* routine(void* p){return NULL;}
6787
6788int main(){
6789 pthread_t p;
6790 if(pthread_create(&p,NULL,routine,NULL)!=0)
6791 return 1;
6792 (void)pthread_detach(p);
6793 return 0;
6794}
6795
6796_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006797if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006798 ac_cv_kpthread=yes
6799else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006800 ac_cv_kpthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006801fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006802rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6803 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006804fi
6805
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006806CC="$ac_save_cc"
6807fi
6808
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006809{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
6810$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006811fi
6812
6813if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
6814then
6815# -Kthread, if available, provides the right #defines
6816# and linker options to make pthread_create available
6817# Some compilers won't report that they do not support -Kthread,
6818# so we need to run a program to see whether it really made the
6819# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
6821$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006822if ${ac_cv_kthread+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006823 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006824else
6825 ac_save_cc="$CC"
6826CC="$CC -Kthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006827if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006828 ac_cv_kthread=no
6829else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006830 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006831/* end confdefs.h. */
6832
Stefan Krahae66ca62012-11-22 22:36:57 +01006833#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006834#include <pthread.h>
6835
6836void* routine(void* p){return NULL;}
6837
6838int main(){
6839 pthread_t p;
6840 if(pthread_create(&p,NULL,routine,NULL)!=0)
6841 return 1;
6842 (void)pthread_detach(p);
6843 return 0;
6844}
6845
6846_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006847if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006848 ac_cv_kthread=yes
6849else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006850 ac_cv_kthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006851fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006852rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6853 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006854fi
6855
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006856CC="$ac_save_cc"
6857fi
6858
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006859{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
6860$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006861fi
6862
6863if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
6864then
6865# -pthread, if available, provides the right #defines
6866# and linker options to make pthread_create available
6867# Some compilers won't report that they do not support -pthread,
6868# so we need to run a program to see whether it really made the
6869# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
6871$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.orgfa3f9a32013-01-25 15:32:31 +01006872if ${ac_cv_pthread+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006873 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006874else
6875 ac_save_cc="$CC"
6876CC="$CC -pthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006877if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006878 ac_cv_pthread=no
6879else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006881/* end confdefs.h. */
6882
Stefan Krahae66ca62012-11-22 22:36:57 +01006883#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006884#include <pthread.h>
6885
6886void* routine(void* p){return NULL;}
6887
6888int main(){
6889 pthread_t p;
6890 if(pthread_create(&p,NULL,routine,NULL)!=0)
6891 return 1;
6892 (void)pthread_detach(p);
6893 return 0;
6894}
6895
6896_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006897if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006898 ac_cv_pthread=yes
6899else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006900 ac_cv_pthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006901fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006902rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6903 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006904fi
6905
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006906CC="$ac_save_cc"
6907fi
6908
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006909{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
6910$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006911fi
6912
6913# If we have set a CC compiler flag for thread support then
6914# check if it works for CXX, too.
6915ac_cv_cxx_thread=no
6916if test ! -z "$CXX"
6917then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
6919$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006920ac_save_cxx="$CXX"
6921
6922if test "$ac_cv_kpthread" = "yes"
6923then
6924 CXX="$CXX -Kpthread"
6925 ac_cv_cxx_thread=yes
6926elif test "$ac_cv_kthread" = "yes"
6927then
6928 CXX="$CXX -Kthread"
6929 ac_cv_cxx_thread=yes
6930elif test "$ac_cv_pthread" = "yes"
6931then
6932 CXX="$CXX -pthread"
6933 ac_cv_cxx_thread=yes
6934fi
6935
6936if test $ac_cv_cxx_thread = yes
6937then
6938 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
6939 $CXX -c conftest.$ac_ext 2>&5
6940 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
6941 && test -s conftest$ac_exeext && ./conftest$ac_exeext
6942 then
6943 ac_cv_cxx_thread=yes
6944 else
6945 ac_cv_cxx_thread=no
6946 fi
6947 rm -fr conftest*
6948fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006949{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
6950$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006951fi
6952CXX="$ac_save_cxx"
6953
6954
6955# checks for header files
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6957$as_echo_n "checking for ANSI C header files... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006958if ${ac_cv_header_stdc+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006959 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006960else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006961 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006962/* end confdefs.h. */
6963#include <stdlib.h>
6964#include <stdarg.h>
6965#include <string.h>
6966#include <float.h>
6967
6968int
6969main ()
6970{
6971
6972 ;
6973 return 0;
6974}
6975_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006976if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006977 ac_cv_header_stdc=yes
6978else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006979 ac_cv_header_stdc=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006980fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006981rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6982
6983if test $ac_cv_header_stdc = yes; then
6984 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006985 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006986/* end confdefs.h. */
6987#include <string.h>
6988
6989_ACEOF
6990if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006991 $EGREP "memchr" >/dev/null 2>&1; then :
6992
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006993else
6994 ac_cv_header_stdc=no
6995fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006996rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006997
6998fi
6999
7000if test $ac_cv_header_stdc = yes; then
7001 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007002 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007003/* end confdefs.h. */
7004#include <stdlib.h>
7005
7006_ACEOF
7007if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007008 $EGREP "free" >/dev/null 2>&1; then :
7009
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007010else
7011 ac_cv_header_stdc=no
7012fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00007013rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007014
7015fi
7016
7017if test $ac_cv_header_stdc = yes; then
7018 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007019 if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007020 :
7021else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007022 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007023/* end confdefs.h. */
7024#include <ctype.h>
7025#include <stdlib.h>
7026#if ((' ' & 0x0FF) == 0x020)
7027# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7028# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7029#else
7030# define ISLOWER(c) \
7031 (('a' <= (c) && (c) <= 'i') \
7032 || ('j' <= (c) && (c) <= 'r') \
7033 || ('s' <= (c) && (c) <= 'z'))
7034# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7035#endif
7036
7037#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7038int
7039main ()
7040{
7041 int i;
7042 for (i = 0; i < 256; i++)
7043 if (XOR (islower (i), ISLOWER (i))
7044 || toupper (i) != TOUPPER (i))
7045 return 2;
7046 return 0;
7047}
7048_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007049if ac_fn_c_try_run "$LINENO"; then :
7050
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007051else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007052 ac_cv_header_stdc=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007053fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007054rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7055 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007056fi
7057
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007058fi
7059fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007060{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7061$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007062if test $ac_cv_header_stdc = yes; then
7063
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007064$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007065
7066fi
7067
doko@ubuntu.comf27ec3e2014-04-17 20:11:19 +02007068for ac_header in asm/types.h conio.h direct.h dlfcn.h errno.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00007069fcntl.h grp.h \
doko@ubuntu.comf27ec3e2014-04-17 20:11:19 +02007070ieeefp.h io.h langinfo.h libintl.h poll.h process.h pthread.h \
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00007071shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00007072unistd.h utime.h \
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00007073sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
7074sys/lock.h sys/mkdev.h sys/modem.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00007075sys/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 +00007076sys/termio.h sys/time.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00007077sys/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 +00007078sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimes3aa138f2013-06-18 13:25:24 +02007079bluetooth/bluetooth.h linux/tipc.h spawn.h util.h alloca.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007080do :
7081 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7082ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007083if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007084 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007085#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007086_ACEOF
7087
7088fi
7089
Guido van Rossum627b2d71993-12-24 10:39:16 +00007090done
7091
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007092ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007093for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007094 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7096$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007097if eval \${$as_ac_Header+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007098 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007099else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007100 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007101/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007102#include <sys/types.h>
7103#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007104
Martin v. Löwis11437992002-04-12 09:54:03 +00007105int
7106main ()
7107{
7108if ((DIR *) 0)
7109return 0;
7110 ;
7111 return 0;
7112}
7113_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007114if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007115 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007116else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007117 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007118fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007119rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007120fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007121eval ac_res=\$$as_ac_Header
7122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7123$as_echo "$ac_res" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007124if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007125 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007126#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007127_ACEOF
7128
7129ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007130fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007131
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007132done
7133# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7134if test $ac_header_dirent = dirent.h; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007135 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7136$as_echo_n "checking for library containing opendir... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007137if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007138 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007139else
Martin v. Löwis11437992002-04-12 09:54:03 +00007140 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007141cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007142/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007143
Martin v. Löwiseba40652007-08-30 20:10:57 +00007144/* Override any GCC internal prototype to avoid an error.
7145 Use char because int might match the return type of a GCC
7146 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007147#ifdef __cplusplus
7148extern "C"
7149#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007150char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007151int
7152main ()
7153{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007154return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007155 ;
7156 return 0;
7157}
7158_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007159for ac_lib in '' dir; do
7160 if test -z "$ac_lib"; then
7161 ac_res="none required"
7162 else
7163 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00007164 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00007165 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007166 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007167 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00007168fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007169rm -f core conftest.err conftest.$ac_objext \
7170 conftest$ac_exeext
Matthias Klose3cef2a92012-03-14 23:39:33 +01007171 if ${ac_cv_search_opendir+:} false; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007172 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00007173fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007174done
Matthias Klose3cef2a92012-03-14 23:39:33 +01007175if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007176
Martin v. Löwiseba40652007-08-30 20:10:57 +00007177else
7178 ac_cv_search_opendir=no
7179fi
7180rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007181LIBS=$ac_func_search_save_LIBS
7182fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007183{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7184$as_echo "$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007185ac_res=$ac_cv_search_opendir
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007186if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007187 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007188
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007189fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007190
Michael W. Hudson54241132001-12-07 15:38:26 +00007191else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007192 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7193$as_echo_n "checking for library containing opendir... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007194if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007195 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007196else
7197 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007198cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007199/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007200
Martin v. Löwiseba40652007-08-30 20:10:57 +00007201/* Override any GCC internal prototype to avoid an error.
7202 Use char because int might match the return type of a GCC
7203 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007204#ifdef __cplusplus
7205extern "C"
7206#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007207char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007208int
7209main ()
7210{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007211return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007212 ;
7213 return 0;
7214}
7215_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007216for ac_lib in '' x; do
7217 if test -z "$ac_lib"; then
7218 ac_res="none required"
7219 else
7220 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00007221 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00007222 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007223 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007224 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00007225fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007226rm -f core conftest.err conftest.$ac_objext \
7227 conftest$ac_exeext
Matthias Klose3cef2a92012-03-14 23:39:33 +01007228 if ${ac_cv_search_opendir+:} false; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007229 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00007230fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007231done
Matthias Klose3cef2a92012-03-14 23:39:33 +01007232if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007233
Martin v. Löwiseba40652007-08-30 20:10:57 +00007234else
7235 ac_cv_search_opendir=no
7236fi
7237rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007238LIBS=$ac_func_search_save_LIBS
7239fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007240{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7241$as_echo "$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007242ac_res=$ac_cv_search_opendir
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007243if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007244 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007245
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007246fi
7247
7248fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007249
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7251$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007252if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007253 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007254else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007255 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007256/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007257#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007258int
7259main ()
7260{
7261return makedev(0, 0);
7262 ;
7263 return 0;
7264}
7265_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007266if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007267 ac_cv_header_sys_types_h_makedev=yes
7268else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007269 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007270fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007271rm -f core conftest.err conftest.$ac_objext \
7272 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007273
7274fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007275{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7276$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007277
7278if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007279ac_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 +01007280if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007281
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007282$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007283
7284fi
7285
7286
7287
7288 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007289 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 +01007290if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007291
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007292$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007293
7294fi
7295
7296
7297 fi
7298fi
7299
Michael W. Hudson54241132001-12-07 15:38:26 +00007300
Martin v. Löwis11017b12006-01-14 18:12:57 +00007301# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00007302for ac_header in linux/netlink.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007303do :
7304 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 +00007305#ifdef HAVE_ASM_TYPES_H
7306#include <asm/types.h>
7307#endif
7308#ifdef HAVE_SYS_SOCKET_H
7309#include <sys/socket.h>
7310#endif
7311
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007312"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007313if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00007314 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007315#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007316_ACEOF
7317
7318fi
7319
7320done
7321
7322
Guido van Rossum627b2d71993-12-24 10:39:16 +00007323# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00007324was_it_defined=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
7326$as_echo_n "checking for clock_t in time.h... " >&6; }
7327cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007328/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007329#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007330
7331_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007332if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007333 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00007334 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007335else
Martin v. Löwis11437992002-04-12 09:54:03 +00007336
7337
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007338$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00007339
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007340
Guido van Rossum627b2d71993-12-24 10:39:16 +00007341fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00007342rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007343
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007344{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
7345$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00007346
Neal Norwitz11690112002-07-30 01:08:28 +00007347# Check whether using makedev requires defining _OSF_SOURCE
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
7349$as_echo_n "checking for makedev... " >&6; }
7350cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007351/* end confdefs.h. */
Jesus Cea616de772010-04-28 10:32:30 +00007352
7353#if defined(MAJOR_IN_MKDEV)
7354#include <sys/mkdev.h>
7355#elif defined(MAJOR_IN_SYSMACROS)
7356#include <sys/sysmacros.h>
7357#else
Neal Norwitz6eb37f02003-02-23 23:28:15 +00007358#include <sys/types.h>
Jesus Cea616de772010-04-28 10:32:30 +00007359#endif
Neal Norwitz11690112002-07-30 01:08:28 +00007360int
7361main ()
7362{
7363 makedev(0, 0)
7364 ;
7365 return 0;
7366}
7367_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007368if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007369 ac_cv_has_makedev=yes
7370else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007371 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007372fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007373rm -f core conftest.err conftest.$ac_objext \
7374 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00007375if test "$ac_cv_has_makedev" = "no"; then
7376 # we didn't link, try if _OSF_SOURCE will allow us to link
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007377 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007378/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00007379
Neal Norwitz6eb37f02003-02-23 23:28:15 +00007380#define _OSF_SOURCE 1
7381#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00007382
Neal Norwitz11690112002-07-30 01:08:28 +00007383int
7384main ()
7385{
7386 makedev(0, 0)
7387 ;
7388 return 0;
7389}
7390_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007391if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007392 ac_cv_has_makedev=yes
7393else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007394 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007395fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007396rm -f core conftest.err conftest.$ac_objext \
7397 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00007398 if test "$ac_cv_has_makedev" = "yes"; then
7399
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007400$as_echo "#define _OSF_SOURCE 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007401
7402 fi
7403fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007404{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
7405$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007406if test "$ac_cv_has_makedev" = "yes"; then
7407
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007408$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007409
7410fi
7411
Martin v. Löwis399a6892002-10-04 10:22:02 +00007412# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
7413# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
7414# defined, but the compiler does not support pragma redefine_extname,
7415# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
7416# structures (such as rlimit64) without declaring them. As a
7417# work-around, disable LFS on such configurations
7418
7419use_lfs=yes
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
7421$as_echo_n "checking Solaris LFS bug... " >&6; }
7422cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007423/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00007424
7425#define _LARGEFILE_SOURCE 1
7426#define _FILE_OFFSET_BITS 64
7427#include <sys/resource.h>
7428
Martin v. Löwis399a6892002-10-04 10:22:02 +00007429int
7430main ()
7431{
7432struct rlimit foo;
7433 ;
7434 return 0;
7435}
7436_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007437if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00007438 sol_lfs_bug=no
7439else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007440 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00007441fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007442rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007443{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
7444$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00007445if test "$sol_lfs_bug" = "yes"; then
7446 use_lfs=no
7447fi
7448
7449if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00007450# Two defines needed to enable largefile support on various platforms
7451# These may affect some typedefs
Georg Brandl94800df2011-02-25 11:09:02 +00007452case $ac_sys_system/$ac_sys_release in
7453AIX*)
7454
7455$as_echo "#define _LARGE_FILES 1" >>confdefs.h
7456
7457 ;;
7458esac
Guido van Rossum810cc512001-09-09 23:51:39 +00007459
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007460$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007461
7462
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007463$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00007464
Martin v. Löwis399a6892002-10-04 10:22:02 +00007465fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007466
Guido van Rossum84e7b241996-08-19 21:59:00 +00007467# Add some code to confdefs.h so that the test for off_t works on SCO
7468cat >> confdefs.h <<\EOF
7469#if defined(SCO_DS)
7470#undef _OFF_T
7471#endif
7472EOF
7473
Guido van Rossumef2255b2000-03-10 22:30:29 +00007474# Type availability checks
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007475ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007476if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007477
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007478else
Martin v. Löwis11437992002-04-12 09:54:03 +00007479
7480cat >>confdefs.h <<_ACEOF
7481#define mode_t int
7482_ACEOF
7483
7484fi
7485
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007486ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007487if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007488
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007489else
Martin v. Löwis11437992002-04-12 09:54:03 +00007490
7491cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007492#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00007493_ACEOF
7494
7495fi
7496
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007497ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007498if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007499
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007500else
Martin v. Löwis11437992002-04-12 09:54:03 +00007501
7502cat >>confdefs.h <<_ACEOF
7503#define pid_t int
7504_ACEOF
7505
7506fi
7507
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007508
Martin v. Löwis11437992002-04-12 09:54:03 +00007509cat >>confdefs.h <<_ACEOF
Matthias Klosecbf54b12010-05-08 11:04:18 +00007510#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00007511_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007512
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007513ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007514if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007515
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007516else
Martin v. Löwis11437992002-04-12 09:54:03 +00007517
7518cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007519#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007520_ACEOF
7521
7522fi
7523
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
7525$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007526if ${ac_cv_type_uid_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007527 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007528else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007529 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007530/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007531#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007532
7533_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007534if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007535 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007536 ac_cv_type_uid_t=yes
7537else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007538 ac_cv_type_uid_t=no
7539fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00007540rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007541
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007542fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007543{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
7544$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007545if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007546
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007547$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007548
7549
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007550$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007551
7552fi
7553
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007554
7555# There are two separate checks for each of the exact-width integer types we
7556# need. First we check whether the type is available using the usual
7557# AC_CHECK_TYPE macro with the default includes (which includes <inttypes.h>
7558# and <stdint.h> where available). We then also use the special type checks of
7559# the form AC_TYPE_UINT32_T, which in the case that uint32_t is not available
7560# directly, #define's uint32_t to be a suitable type.
7561
7562ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
7563if test "x$ac_cv_type_uint32_t" = xyes; then :
7564
7565$as_echo "#define HAVE_UINT32_T 1" >>confdefs.h
7566
7567fi
7568
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007569ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
7570case $ac_cv_c_uint32_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007571 no|yes) ;; #(
7572 *)
7573
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007574$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007575
7576
7577cat >>confdefs.h <<_ACEOF
7578#define uint32_t $ac_cv_c_uint32_t
7579_ACEOF
7580;;
7581 esac
7582
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007583
7584ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
7585if test "x$ac_cv_type_uint64_t" = xyes; then :
7586
7587$as_echo "#define HAVE_UINT64_T 1" >>confdefs.h
7588
7589fi
7590
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007591ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
7592case $ac_cv_c_uint64_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007593 no|yes) ;; #(
7594 *)
7595
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007596$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007597
7598
7599cat >>confdefs.h <<_ACEOF
7600#define uint64_t $ac_cv_c_uint64_t
7601_ACEOF
7602;;
7603 esac
7604
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007605
7606ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
7607if test "x$ac_cv_type_int32_t" = xyes; then :
7608
7609$as_echo "#define HAVE_INT32_T 1" >>confdefs.h
7610
7611fi
7612
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007613ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
7614case $ac_cv_c_int32_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007615 no|yes) ;; #(
7616 *)
7617
7618cat >>confdefs.h <<_ACEOF
7619#define int32_t $ac_cv_c_int32_t
7620_ACEOF
7621;;
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007622esac
7623
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007624
7625ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
7626if test "x$ac_cv_type_int64_t" = xyes; then :
7627
7628$as_echo "#define HAVE_INT64_T 1" >>confdefs.h
7629
7630fi
7631
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007632ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
7633case $ac_cv_c_int64_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007634 no|yes) ;; #(
7635 *)
7636
7637cat >>confdefs.h <<_ACEOF
7638#define int64_t $ac_cv_c_int64_t
7639_ACEOF
7640;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007641esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00007642
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007643
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007644ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007645if test "x$ac_cv_type_ssize_t" = xyes; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007646
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007647$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00007648
7649fi
7650
Jack Jansendd19cf82001-12-06 22:36:17 +00007651
Michael W. Hudson54241132001-12-07 15:38:26 +00007652# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007653# ANSI C requires sizeof(char) == 1, so no need to check it
Martin v. Löwiseba40652007-08-30 20:10:57 +00007654# The cast to long int works around a bug in the HP C Compiler
7655# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7656# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7657# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
7659$as_echo_n "checking size of int... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007660if ${ac_cv_sizeof_int+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007661 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007662else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007663 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 +00007664
Martin v. Löwis11437992002-04-12 09:54:03 +00007665else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007666 if test "$ac_cv_type_int" = yes; then
7667 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7668$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007669as_fn_error 77 "cannot compute sizeof (int)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007670See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007671 else
7672 ac_cv_sizeof_int=0
7673 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007674fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007675
Martin v. Löwis11437992002-04-12 09:54:03 +00007676fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007677{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
7678$as_echo "$ac_cv_sizeof_int" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007679
7680
7681
Martin v. Löwis11437992002-04-12 09:54:03 +00007682cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007683#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007684_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007685
7686
Martin v. Löwiseba40652007-08-30 20:10:57 +00007687# The cast to long int works around a bug in the HP C Compiler
7688# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7689# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7690# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
7692$as_echo_n "checking size of long... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007693if ${ac_cv_sizeof_long+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007694 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007695else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007696 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 +00007697
Martin v. Löwis11437992002-04-12 09:54:03 +00007698else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007699 if test "$ac_cv_type_long" = yes; then
7700 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7701$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007702as_fn_error 77 "cannot compute sizeof (long)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007703See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007704 else
7705 ac_cv_sizeof_long=0
7706 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007707fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007708
Martin v. Löwis11437992002-04-12 09:54:03 +00007709fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007710{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
7711$as_echo "$ac_cv_sizeof_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007712
7713
7714
Martin v. Löwis11437992002-04-12 09:54:03 +00007715cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007716#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007717_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007718
7719
Martin v. Löwiseba40652007-08-30 20:10:57 +00007720# The cast to long int works around a bug in the HP C Compiler
7721# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7722# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7723# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
7725$as_echo_n "checking size of void *... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007726if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007727 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007728else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007729 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 +00007730
Martin v. Löwis11437992002-04-12 09:54:03 +00007731else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007732 if test "$ac_cv_type_void_p" = yes; then
7733 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7734$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007735as_fn_error 77 "cannot compute sizeof (void *)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007736See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007737 else
7738 ac_cv_sizeof_void_p=0
7739 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007740fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007741
Martin v. Löwis11437992002-04-12 09:54:03 +00007742fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007743{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
7744$as_echo "$ac_cv_sizeof_void_p" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007745
7746
7747
Martin v. Löwis11437992002-04-12 09:54:03 +00007748cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007749#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00007750_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007751
7752
Martin v. Löwiseba40652007-08-30 20:10:57 +00007753# The cast to long int works around a bug in the HP C Compiler
7754# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7755# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7756# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
7758$as_echo_n "checking size of short... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007759if ${ac_cv_sizeof_short+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007760 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007761else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007762 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 +00007763
Martin v. Löwis11437992002-04-12 09:54:03 +00007764else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007765 if test "$ac_cv_type_short" = yes; then
7766 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7767$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007768as_fn_error 77 "cannot compute sizeof (short)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007769See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007770 else
7771 ac_cv_sizeof_short=0
7772 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007773fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007774
Martin v. Löwis11437992002-04-12 09:54:03 +00007775fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007776{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
7777$as_echo "$ac_cv_sizeof_short" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007778
7779
7780
Martin v. Löwis11437992002-04-12 09:54:03 +00007781cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007782#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007783_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007784
7785
Martin v. Löwiseba40652007-08-30 20:10:57 +00007786# The cast to long int works around a bug in the HP C Compiler
7787# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7788# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7789# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
7791$as_echo_n "checking size of float... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007792if ${ac_cv_sizeof_float+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007793 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007794else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007795 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 +00007796
Martin v. Löwis11437992002-04-12 09:54:03 +00007797else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007798 if test "$ac_cv_type_float" = yes; then
7799 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7800$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007801as_fn_error 77 "cannot compute sizeof (float)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007802See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007803 else
7804 ac_cv_sizeof_float=0
7805 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007806fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007807
Martin v. Löwis11437992002-04-12 09:54:03 +00007808fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007809{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
7810$as_echo "$ac_cv_sizeof_float" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007811
7812
7813
Martin v. Löwis11437992002-04-12 09:54:03 +00007814cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007815#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007816_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007817
7818
Martin v. Löwiseba40652007-08-30 20:10:57 +00007819# The cast to long int works around a bug in the HP C Compiler
7820# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7821# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7822# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
7824$as_echo_n "checking size of double... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007825if ${ac_cv_sizeof_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007826 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007827else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007828 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 +00007829
Martin v. Löwis11437992002-04-12 09:54:03 +00007830else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007831 if test "$ac_cv_type_double" = yes; then
7832 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7833$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007834as_fn_error 77 "cannot compute sizeof (double)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007835See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007836 else
7837 ac_cv_sizeof_double=0
7838 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007839fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007840
Martin v. Löwis11437992002-04-12 09:54:03 +00007841fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007842{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
7843$as_echo "$ac_cv_sizeof_double" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007844
7845
7846
Martin v. Löwis11437992002-04-12 09:54:03 +00007847cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007848#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007849_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007850
7851
Martin v. Löwiseba40652007-08-30 20:10:57 +00007852# The cast to long int works around a bug in the HP C Compiler
7853# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7854# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7855# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
7857$as_echo_n "checking size of fpos_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007858if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007859 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007860else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007861 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 +00007862
Martin v. Löwis11437992002-04-12 09:54:03 +00007863else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007864 if test "$ac_cv_type_fpos_t" = yes; then
7865 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7866$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007867as_fn_error 77 "cannot compute sizeof (fpos_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007868See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007869 else
7870 ac_cv_sizeof_fpos_t=0
7871 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007872fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007873
Martin v. Löwis11437992002-04-12 09:54:03 +00007874fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007875{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
7876$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007877
7878
7879
Martin v. Löwis11437992002-04-12 09:54:03 +00007880cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007881#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007882_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007883
Michael W. Hudson54241132001-12-07 15:38:26 +00007884
Martin v. Löwiseba40652007-08-30 20:10:57 +00007885# The cast to long int works around a bug in the HP C Compiler
7886# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7887# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7888# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
7890$as_echo_n "checking size of size_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007891if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007892 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007893else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007894 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 +00007895
Martin v. Löwis18e16552006-02-15 17:27:45 +00007896else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007897 if test "$ac_cv_type_size_t" = yes; then
7898 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7899$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007900as_fn_error 77 "cannot compute sizeof (size_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007901See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007902 else
7903 ac_cv_sizeof_size_t=0
7904 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00007905fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007906
Martin v. Löwis18e16552006-02-15 17:27:45 +00007907fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007908{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
7909$as_echo "$ac_cv_sizeof_size_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007910
7911
7912
Martin v. Löwis18e16552006-02-15 17:27:45 +00007913cat >>confdefs.h <<_ACEOF
7914#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
7915_ACEOF
7916
7917
Christian Heimes951cc0f2008-01-31 23:08:23 +00007918# The cast to long int works around a bug in the HP C Compiler
7919# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7920# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7921# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007922{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
7923$as_echo_n "checking size of pid_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007924if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007925 $as_echo_n "(cached) " >&6
Christian Heimes951cc0f2008-01-31 23:08:23 +00007926else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007927 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 +00007928
Christian Heimes951cc0f2008-01-31 23:08:23 +00007929else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007930 if test "$ac_cv_type_pid_t" = yes; then
7931 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7932$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007933as_fn_error 77 "cannot compute sizeof (pid_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007934See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes951cc0f2008-01-31 23:08:23 +00007935 else
7936 ac_cv_sizeof_pid_t=0
7937 fi
7938fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007939
Christian Heimes951cc0f2008-01-31 23:08:23 +00007940fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007941{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
7942$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes951cc0f2008-01-31 23:08:23 +00007943
7944
7945
7946cat >>confdefs.h <<_ACEOF
7947#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
7948_ACEOF
7949
7950
Michael W. Hudson54241132001-12-07 15:38:26 +00007951
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
7953$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007954have_long_long=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007955cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007956/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007957
Martin v. Löwis11437992002-04-12 09:54:03 +00007958int
7959main ()
7960{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007961long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007962 ;
7963 return 0;
7964}
7965_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007966if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007967
7968
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007969$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007970
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007971 have_long_long=yes
7972
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007973fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007974rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007975{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
7976$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007977if test "$have_long_long" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00007978# The cast to long int works around a bug in the HP C Compiler
7979# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7980# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7981# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
7983$as_echo_n "checking size of long long... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007984if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007985 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007986else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007987 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 +00007988
Martin v. Löwis11437992002-04-12 09:54:03 +00007989else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007990 if test "$ac_cv_type_long_long" = yes; then
7991 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7992$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007993as_fn_error 77 "cannot compute sizeof (long long)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007994See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007995 else
7996 ac_cv_sizeof_long_long=0
7997 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007998fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007999
Martin v. Löwis11437992002-04-12 09:54:03 +00008000fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008001{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8002$as_echo "$ac_cv_sizeof_long_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008003
8004
8005
Martin v. Löwis11437992002-04-12 09:54:03 +00008006cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008007#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008008_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008009
Michael W. Hudson54241132001-12-07 15:38:26 +00008010
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008011fi
8012
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
8014$as_echo_n "checking for long double support... " >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008015have_long_double=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008016cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008017/* end confdefs.h. */
8018
8019int
8020main ()
8021{
Matthias Klosec511b472010-05-08 11:01:39 +00008022long double x; x = (long double)0;
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008023 ;
8024 return 0;
8025}
8026_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008027if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008028
8029
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008030$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008031
8032 have_long_double=yes
8033
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008034fi
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008035rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008036{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
8037$as_echo "$have_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008038if test "$have_long_double" = yes ; then
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008039# The cast to long int works around a bug in the HP C Compiler
8040# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8041# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8042# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8044$as_echo_n "checking size of long double... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008045if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008046 $as_echo_n "(cached) " >&6
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008047else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008048 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 +00008049
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008050else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008051 if test "$ac_cv_type_long_double" = yes; then
8052 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8053$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008054as_fn_error 77 "cannot compute sizeof (long double)
Matthias Klose3cef2a92012-03-14 23:39:33 +01008055See \`config.log' for more details" "$LINENO" 5; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008056 else
8057 ac_cv_sizeof_long_double=0
8058 fi
8059fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008060
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008061fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008062{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8063$as_echo "$ac_cv_sizeof_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008064
8065
8066
8067cat >>confdefs.h <<_ACEOF
8068#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8069_ACEOF
8070
8071
8072fi
8073
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
8075$as_echo_n "checking for _Bool support... " >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00008076have_c99_bool=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008077cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00008078/* end confdefs.h. */
8079
8080int
8081main ()
8082{
8083_Bool x; x = (_Bool)0;
8084 ;
8085 return 0;
8086}
8087_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008088if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00008089
8090
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008091$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00008092
8093 have_c99_bool=yes
8094
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00008095fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008096rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008097{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
8098$as_echo "$have_c99_bool" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00008099if test "$have_c99_bool" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00008100# The cast to long int works around a bug in the HP C Compiler
8101# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8102# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8103# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8105$as_echo_n "checking size of _Bool... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008106if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008107 $as_echo_n "(cached) " >&6
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00008108else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008109 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 +00008110
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00008111else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008112 if test "$ac_cv_type__Bool" = yes; then
8113 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8114$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008115as_fn_error 77 "cannot compute sizeof (_Bool)
Matthias Klose3cef2a92012-03-14 23:39:33 +01008116See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008117 else
8118 ac_cv_sizeof__Bool=0
8119 fi
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00008120fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008121
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00008122fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008123{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8124$as_echo "$ac_cv_sizeof__Bool" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008125
8126
8127
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00008128cat >>confdefs.h <<_ACEOF
8129#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8130_ACEOF
8131
8132
8133fi
8134
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008135ac_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 +00008136 #include <stdint.h>
8137 #endif
Antoine Pitrou7be5a652010-10-10 08:14:41 +00008138 #ifdef HAVE_INTTYPES_H
8139 #include <inttypes.h>
8140 #endif
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008141"
Matthias Klose3cef2a92012-03-14 23:39:33 +01008142if test "x$ac_cv_type_uintptr_t" = xyes; then :
Martin v. Löwisebe26702006-10-02 14:55:51 +00008143
8144cat >>confdefs.h <<_ACEOF
8145#define HAVE_UINTPTR_T 1
8146_ACEOF
8147
Martin v. Löwiseba40652007-08-30 20:10:57 +00008148# The cast to long int works around a bug in the HP C Compiler
8149# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8150# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8151# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8153$as_echo_n "checking size of uintptr_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008154if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008155 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008156else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008157 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 +00008158
Martin v. Löwis11437992002-04-12 09:54:03 +00008159else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008160 if test "$ac_cv_type_uintptr_t" = yes; then
8161 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8162$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008163as_fn_error 77 "cannot compute sizeof (uintptr_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01008164See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008165 else
8166 ac_cv_sizeof_uintptr_t=0
8167 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008168fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008169
Martin v. Löwis11437992002-04-12 09:54:03 +00008170fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008171{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8172$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008173
8174
8175
Martin v. Löwis11437992002-04-12 09:54:03 +00008176cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008177#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008178_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008179
Michael W. Hudson54241132001-12-07 15:38:26 +00008180
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008181fi
8182
Martin v. Löwisebe26702006-10-02 14:55:51 +00008183
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008184# The cast to long int works around a bug in the HP C Compiler
8185# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8186# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8187# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8189$as_echo_n "checking size of off_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008190if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008191 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008192else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008193 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008194#ifdef HAVE_SYS_TYPES_H
8195#include <sys/types.h>
8196#endif
8197
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008198"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008199
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008200else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008201 if test "$ac_cv_type_off_t" = yes; then
8202 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8203$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008204as_fn_error 77 "cannot compute sizeof (off_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01008205See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008206 else
8207 ac_cv_sizeof_off_t=0
8208 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008209fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008210
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008211fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008212{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8213$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008214
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008215
8216
Martin v. Löwis11437992002-04-12 09:54:03 +00008217cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008218#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008219_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008220
Michael W. Hudson54241132001-12-07 15:38:26 +00008221
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008222
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8224$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson0ef0b912009-12-31 21:11:48 +00008225if test "$have_long_long" = yes
8226then
8227if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008228 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008229
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008230$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008231
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8233$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008234else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8236$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008237fi
Mark Dickinson0ef0b912009-12-31 21:11:48 +00008238else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008239 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8240$as_echo "no" >&6; }
Mark Dickinson0ef0b912009-12-31 21:11:48 +00008241fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008242
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008243# The cast to long int works around a bug in the HP C Compiler
8244# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8245# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8246# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8248$as_echo_n "checking size of time_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008249if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008250 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008251else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008252 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008253#ifdef HAVE_SYS_TYPES_H
8254#include <sys/types.h>
8255#endif
8256#ifdef HAVE_TIME_H
8257#include <time.h>
8258#endif
8259
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008260"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008261
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008262else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008263 if test "$ac_cv_type_time_t" = yes; then
8264 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8265$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008266as_fn_error 77 "cannot compute sizeof (time_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01008267See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008268 else
8269 ac_cv_sizeof_time_t=0
8270 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008271fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008272
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008273fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008274{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8275$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008276
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008277
8278
Martin v. Löwis11437992002-04-12 09:54:03 +00008279cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008280#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008281_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008282
Michael W. Hudson54241132001-12-07 15:38:26 +00008283
8284
Trent Mick635f6fb2000-08-23 21:33:05 +00008285# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008286ac_save_cc="$CC"
8287if test "$ac_cv_kpthread" = "yes"
8288then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008289elif test "$ac_cv_kthread" = "yes"
8290then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008291elif test "$ac_cv_pthread" = "yes"
8292then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008293fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8295$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008296have_pthread_t=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008297cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008298/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00008299
8300 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008301int
8302main ()
8303{
Guido van Rossum12580492000-09-24 16:47:19 +00008304pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008305 ;
8306 return 0;
8307}
Matthias Klosec511b472010-05-08 11:01:39 +00008308
Martin v. Löwis11437992002-04-12 09:54:03 +00008309_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008310if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008311 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008312fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008313rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008314{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8315$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008316if test "$have_pthread_t" = yes ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008317 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008318# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8319# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8320# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8322$as_echo_n "checking size of pthread_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008323if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008324 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008325else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008326 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008327#ifdef HAVE_PTHREAD_H
8328#include <pthread.h>
8329#endif
8330
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008331"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008332
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008333else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008334 if test "$ac_cv_type_pthread_t" = yes; then
8335 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8336$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008337as_fn_error 77 "cannot compute sizeof (pthread_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01008338See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008339 else
8340 ac_cv_sizeof_pthread_t=0
8341 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008342fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008343
Trent Mick635f6fb2000-08-23 21:33:05 +00008344fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008345{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8346$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008347
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008348
8349
Martin v. Löwis11437992002-04-12 09:54:03 +00008350cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008351#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008352_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008353
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008354
Trent Mick635f6fb2000-08-23 21:33:05 +00008355fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008356CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008357
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-toolbox-glue" >&5
8359$as_echo_n "checking for --enable-toolbox-glue... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008360# Check whether --enable-toolbox-glue was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008361if test "${enable_toolbox_glue+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008362 enableval=$enable_toolbox_glue;
8363fi
Jack Jansene578a632001-08-15 01:27:14 +00008364
8365
8366if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +00008367then
Jack Jansene578a632001-08-15 01:27:14 +00008368 case $ac_sys_system/$ac_sys_release in
8369 Darwin/*)
8370 enable_toolbox_glue="yes";;
8371 *)
8372 enable_toolbox_glue="no";;
8373 esac
8374fi
8375case "$enable_toolbox_glue" in
8376yes)
Jack Jansene578a632001-08-15 01:27:14 +00008377 extra_machdep_objs="Python/mactoolboxglue.o"
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008378 extra_undefs="-u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +00008379
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008380$as_echo "#define USE_TOOLBOX_OBJECT_GLUE 1" >>confdefs.h
Jack Jansene578a632001-08-15 01:27:14 +00008381
8382 ;;
8383*)
Jack Jansene578a632001-08-15 01:27:14 +00008384 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00008385 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00008386 ;;
8387esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008388{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_toolbox_glue" >&5
8389$as_echo "$enable_toolbox_glue" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008390
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008391
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00008392
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008393case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +00008394 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008395 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8396 ;;
8397 Darwin/*)
8398 OTHER_LIBTOOL_OPT=""
8399 ;;
8400esac
8401
8402
Ronald Oussoren25967582009-09-06 10:00:26 +00008403
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008404case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +00008405 Darwin/[01567]\..*)
Ronald Oussoren988117f2006-04-29 11:31:35 +00008406 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8407 if test "${enable_universalsdk}"; then
8408 :
8409 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00008410 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Ronald Oussoren988117f2006-04-29 11:31:35 +00008411 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008412 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008413 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008414 Darwin/*)
Ronald Oussorena55af9a2010-01-17 16:25:57 +00008415 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008416 if test ${gcc_version} '<' 4.0
8417 then
8418 LIBTOOL_CRUFT="-lcc_dynamic"
8419 else
8420 LIBTOOL_CRUFT=""
8421 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008422 if test "$cross_compiling" = yes; then :
Ronald Oussoren23d92532009-09-07 06:12:00 +00008423 ac_osx_32bit=yes
Ronald Oussoren25967582009-09-06 10:00:26 +00008424else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008425 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren25967582009-09-06 10:00:26 +00008426/* end confdefs.h. */
Ronald Oussoren23d92532009-09-07 06:12:00 +00008427
Ronald Oussoren25967582009-09-06 10:00:26 +00008428 #include <unistd.h>
8429 int main(int argc, char*argv[])
8430 {
8431 if (sizeof(long) == 4) {
8432 return 0;
8433 } else {
8434 return 1;
8435 }
Ronald Oussoren84ddd722009-09-08 07:17:10 +00008436 }
Ronald Oussoren23d92532009-09-07 06:12:00 +00008437
Ronald Oussoren25967582009-09-06 10:00:26 +00008438_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008439if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren25967582009-09-06 10:00:26 +00008440 ac_osx_32bit=yes
8441else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008442 ac_osx_32bit=no
Ronald Oussoren25967582009-09-06 10:00:26 +00008443fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008444rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8445 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren25967582009-09-06 10:00:26 +00008446fi
8447
8448
Ronald Oussoren25967582009-09-06 10:00:26 +00008449 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00008450 case `/usr/bin/arch` in
Ronald Oussoren25967582009-09-06 10:00:26 +00008451 i386)
8452 MACOSX_DEFAULT_ARCH="i386"
8453 ;;
8454 ppc)
8455 MACOSX_DEFAULT_ARCH="ppc"
8456 ;;
8457 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008458 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren25967582009-09-06 10:00:26 +00008459 ;;
8460 esac
8461 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00008462 case `/usr/bin/arch` in
Ronald Oussoren25967582009-09-06 10:00:26 +00008463 i386)
8464 MACOSX_DEFAULT_ARCH="x86_64"
8465 ;;
8466 ppc)
8467 MACOSX_DEFAULT_ARCH="ppc64"
8468 ;;
8469 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008470 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren25967582009-09-06 10:00:26 +00008471 ;;
8472 esac
8473
8474 #ARCH_RUN_32BIT="true"
8475 fi
8476
8477 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00008478 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008479 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008480esac
8481
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
8483$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008484if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008485then
Skip Montanarodecc6a42003-01-01 20:07:49 +00008486 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00008487 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008488 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008489
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008490$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008491
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008492 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8493$as_echo "yes" >&6; }
Ronald Oussoren450d5612009-06-08 21:12:41 +00008494 if test $enable_shared = "yes"
8495 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008496 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 +00008497 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008498else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8500$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008501fi
8502
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
8504$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008505case $ac_sys_system/$ac_sys_release in
8506 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008507
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008508$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008509
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008510 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
8511$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008512 ;;
8513 *)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8515$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008516 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008517esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008518
Guido van Rossum0a516c91994-09-12 10:58:40 +00008519# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008520
Michael W. Hudson54241132001-12-07 15:38:26 +00008521
8522
8523
8524
Ronald Oussoren75912852010-04-08 08:13:31 +00008525
Guido van Rossum0a516c91994-09-12 10:58:40 +00008526# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00008527# -- usually .so, .sl on HP-UX, .dll on Cygwin
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
8529$as_echo_n "checking SO... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008530if test -z "$SO"
8531then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008532 case $ac_sys_system in
Neal Norwitz58e28882006-05-19 07:00:58 +00008533 hp*|HP*)
8534 case `uname -m` in
8535 ia64) SO=.so;;
8536 *) SO=.sl;;
8537 esac
8538 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00008539 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00008540 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008541 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +00008542else
8543 # this might also be a termcap variable, see #610332
8544 echo
8545 echo '====================================================================='
8546 echo '+ +'
8547 echo '+ WARNING: You have set SO in your environment. +'
8548 echo '+ Do you really mean to change the extension for shared libraries? +'
8549 echo '+ Continuing in 10 seconds to let you to ponder. +'
8550 echo '+ +'
8551 echo '====================================================================='
8552 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +00008553fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008554{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
8555$as_echo "$SO" >&6; }
Neal Norwitz58e28882006-05-19 07:00:58 +00008556
Ronald Oussoren79f90492009-01-02 10:44:46 +00008557
Neal Norwitz58e28882006-05-19 07:00:58 +00008558cat >>confdefs.h <<_ACEOF
8559#define SHLIB_EXT "$SO"
8560_ACEOF
8561
Guido van Rossum0a516c91994-09-12 10:58:40 +00008562# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00008563# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008564# (Shared libraries in this instance are shared modules to be loaded into
8565# Python, as opposed to building Python itself as a shared library.)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
8567$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008568if test -z "$LDSHARED"
8569then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008570 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008571 AIX*)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008572 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00008573 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008574 ;;
8575 BeOS*)
8576 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +00008577 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008578 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00008579 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00008580 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008581 SunOS/5*)
Ronald Oussoren75912852010-04-08 08:13:31 +00008582 if test "$GCC" = "yes" ; then
8583 LDSHARED='$(CC) -shared'
8584 LDCXXSHARED='$(CXX) -shared'
8585 else
8586 LDSHARED='$(CC) -G'
8587 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a662000-05-26 12:22:54 +00008588 fi ;;
Thomas Hellerdc96a772008-04-04 10:07:55 +00008589 hp*|HP*)
Ronald Oussoren75912852010-04-08 08:13:31 +00008590 if test "$GCC" = "yes" ; then
8591 LDSHARED='$(CC) -shared'
8592 LDCXXSHARED='$(CXX) -shared'
8593 else
8594 LDSHARED='ld -b'
Thomas Hellerdc96a772008-04-04 10:07:55 +00008595 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +00008596 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +00008597 Darwin/1.3*)
Stefan Krah3a3e2032010-11-28 15:30:05 +00008598 LDSHARED='$(CC) -bundle'
8599 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00008600 if test "$enable_framework" ; then
8601 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008602 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8603 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008604 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008605 else
8606 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00008607 LDSHARED="$LDSHARED -undefined suppress"
Ronald Oussoren75912852010-04-08 08:13:31 +00008608 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00008609 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008610 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Stefan Krah3a3e2032010-11-28 15:30:05 +00008611 LDSHARED='$(CC) -bundle'
8612 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00008613 if test "$enable_framework" ; then
8614 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008615 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8616 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008617 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008618 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00008619 # No framework, use the Python app as bundle-loader
8620 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00008621 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008622 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008623 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008624 Darwin/*)
8625 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
8626 # This allows an extension to be used in any Python
Ronald Oussoren38f1b982007-09-02 09:46:07 +00008627
Ned Deilyc40b9032014-06-25 13:48:46 -07008628 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
8629 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
8630 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
8631 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
8632 if test ${dep_target_major} -eq 10 && \
8633 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00008634 then
Ned Deilyc40b9032014-06-25 13:48:46 -07008635 # building for OS X 10.0 through 10.2
Stefan Krah3a3e2032010-11-28 15:30:05 +00008636 LDSHARED='$(CC) -bundle'
8637 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00008638 if test "$enable_framework" ; then
8639 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008640 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8641 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008642 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008643 else
8644 # No framework, use the Python app as bundle-loader
8645 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
8646 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008647 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008648 fi
Ned Deilyc40b9032014-06-25 13:48:46 -07008649 else
8650 # building for OS X 10.3 and later
8651 if test "${enable_universalsdk}"; then
8652 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
8653 fi
8654 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
8655 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
8656 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00008657 fi
8658 ;;
Ronald Oussoren75912852010-04-08 08:13:31 +00008659 Linux*|GNU*|QNX*)
8660 LDSHARED='$(CC) -shared'
8661 LDCXXSHARED='$(CXX) -shared';;
8662 BSD/OS*/4*)
8663 LDSHARED="gcc -shared"
8664 LDCXXSHARED="g++ -shared";;
Martin v. Löwis222c5152006-06-03 07:37:13 +00008665 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00008666 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00008667 then
Stefan Krah3a3e2032010-11-28 15:30:05 +00008668 LDSHARED='$(CC) -shared'
8669 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00008670 else
Stefan Krah3a3e2032010-11-28 15:30:05 +00008671 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00008672 fi;;
Martin v. Löwis222c5152006-06-03 07:37:13 +00008673 OpenBSD*)
8674 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8675 then
Stefan Krah3a3e2032010-11-28 15:30:05 +00008676 LDSHARED='$(CC) -shared $(CCSHARED)'
8677 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Martin v. Löwis222c5152006-06-03 07:37:13 +00008678 else
8679 case `uname -r` in
8680 [01].* | 2.[0-7] | 2.[0-7].*)
8681 LDSHARED="ld -Bshareable ${LDFLAGS}"
8682 ;;
8683 *)
Stefan Krah3a3e2032010-11-28 15:30:05 +00008684 LDSHARED='$(CC) -shared $(CCSHARED)'
8685 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Martin v. Löwis222c5152006-06-03 07:37:13 +00008686 ;;
8687 esac
8688 fi;;
Ronald Oussoren75912852010-04-08 08:13:31 +00008689 NetBSD*|DragonFly*)
Antoine Pitroucb402772011-01-02 20:51:34 +00008690 LDSHARED='$(CC) -shared'
8691 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008692 OpenUNIX*|UnixWare*)
Ronald Oussoren75912852010-04-08 08:13:31 +00008693 if test "$GCC" = "yes" ; then
8694 LDSHARED='$(CC) -shared'
8695 LDCXXSHARED='$(CXX) -shared'
8696 else
8697 LDSHARED='$(CC) -G'
8698 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00008699 fi;;
Ronald Oussoren75912852010-04-08 08:13:31 +00008700 SCO_SV*)
8701 LDSHARED='$(CC) -Wl,-G,-Bexport'
8702 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
8703 CYGWIN*)
8704 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
8705 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
8706 atheos*)
8707 LDSHARED="gcc -shared"
8708 LDCXXSHARED="g++ -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008709 *) LDSHARED="ld";;
8710 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008711fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008712{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
8713$as_echo "$LDSHARED" >&6; }
Ronald Oussoren75912852010-04-08 08:13:31 +00008714LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008715BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00008716# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008717# library (module) -- this is only needed for a few systems
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
8719$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008720if test -z "$CCSHARED"
8721then
Guido van Rossum07397971997-04-29 21:49:50 +00008722 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008723 SunOS*) if test "$GCC" = yes;
Martin v. Löwiseb623572007-03-12 10:50:39 +00008724 then CCSHARED="-fPIC";
8725 elif test `uname -p` = sparc;
8726 then CCSHARED="-xcode=pic32";
8727 else CCSHARED="-Kpic";
8728 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00008729 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00008730 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00008731 else CCSHARED="+z";
8732 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008733 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008734 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008735 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008736 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008737 if test "$GCC" = "yes"
8738 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008739 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008740 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008741 SCO_SV*)
8742 if test "$GCC" = "yes"
8743 then CCSHARED="-fPIC"
8744 else CCSHARED="-Kpic -belf"
8745 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008746 IRIX*/6*) case $CC in
8747 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00008748 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008749 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008750 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008751 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008752fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008753{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
8754$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008755# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008756# the python executable -- this is only needed for a few systems
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
8758$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008759if test -z "$LINKFORSHARED"
8760then
Guido van Rossum07397971997-04-29 21:49:50 +00008761 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008762 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008763 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00008764 LINKFORSHARED="-Wl,-E -Wl,+s";;
8765# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008766 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008767 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008768 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00008769 Darwin/*)
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008770 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
8771 # which is
Jack Jansene578a632001-08-15 01:27:14 +00008772 # not used by the core itself but which needs to be in the core so
8773 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +00008774 # -prebind is no longer used, because it actually seems to give a
8775 # slowdown in stead of a speedup, maybe due to the large number of
8776 # dynamic loads Python does.
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008777
8778 LINKFORSHARED="$extra_undefs"
Jack Jansene578a632001-08-15 01:27:14 +00008779 if test "$enable_framework"
8780 then
Jack Jansenda49e192005-01-07 13:08:22 +00008781 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008782 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008783 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008784 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008785 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00008786 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008787 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00008788 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8789 then
8790 LINKFORSHARED="-Wl,--export-dynamic"
8791 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008792 SunOS/5*) case $CC in
8793 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00008794 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00008795 then
8796 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008797 fi;;
8798 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00008799 CYGWIN*)
8800 if test $enable_shared = "no"
8801 then
8802 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
8803 fi;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00008804 QNX*)
8805 # -Wl,-E causes the symbols to be added to the dynamic
8806 # symbol table so that they can be found when a module
8807 # is loaded. -N 2048K causes the stack size to be set
8808 # to 2048 kilobytes so that the stack doesn't overflow
8809 # when running test_compile.py.
8810 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008811 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008812fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008813{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
8814$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008815
Michael W. Hudson54241132001-12-07 15:38:26 +00008816
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00008817
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
8819$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008820if test ! "$LIBRARY" = "$LDLIBRARY"
8821then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00008822 case $ac_sys_system in
8823 CYGWIN*)
8824 # Cygwin needs CCSHARED when building extension DLLs
8825 # but not when building the interpreter DLL.
8826 CFLAGSFORSHARED='';;
8827 *)
8828 CFLAGSFORSHARED='$(CCSHARED)'
8829 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008830fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008831{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
8832$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008833
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008834# SHLIBS are libraries (except -lc and -lm) to link to the python shared
8835# library (with --enable-shared).
8836# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008837# symbols, this must be set to $(LIBS) (expanded by make). We do this even
8838# if it is not required, since it creates a dependency of the shared library
8839# to LIBS. This, in turn, means that applications linking the shared libpython
8840# don't need to link LIBS explicitly. The default should be only changed
8841# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008842
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
8844$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008845case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008846 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008847 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008848esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008849{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
8850$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008851
8852
Guido van Rossum627b2d71993-12-24 10:39:16 +00008853# checks for libraries
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
8855$as_echo_n "checking for dlopen in -ldl... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008856if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008857 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008858else
Martin v. Löwis11437992002-04-12 09:54:03 +00008859 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008860LIBS="-ldl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008861cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008862/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008863
Martin v. Löwiseba40652007-08-30 20:10:57 +00008864/* Override any GCC internal prototype to avoid an error.
8865 Use char because int might match the return type of a GCC
8866 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008867#ifdef __cplusplus
8868extern "C"
8869#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008870char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008871int
8872main ()
8873{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008874return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008875 ;
8876 return 0;
8877}
8878_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008879if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008880 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008881else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008882 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008883fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008884rm -f core conftest.err conftest.$ac_objext \
8885 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008886LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008887fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008888{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
8889$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008890if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008891 cat >>confdefs.h <<_ACEOF
8892#define HAVE_LIBDL 1
8893_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008894
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008895 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00008896
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008897fi
8898 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
8900$as_echo_n "checking for shl_load in -ldld... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008901if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008902 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008903else
Martin v. Löwis11437992002-04-12 09:54:03 +00008904 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008905LIBS="-ldld $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008906cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008907/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008908
Martin v. Löwiseba40652007-08-30 20:10:57 +00008909/* Override any GCC internal prototype to avoid an error.
8910 Use char because int might match the return type of a GCC
8911 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008912#ifdef __cplusplus
8913extern "C"
8914#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008915char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008916int
8917main ()
8918{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008919return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008920 ;
8921 return 0;
8922}
8923_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008924if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008925 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008926else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008927 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008928fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008929rm -f core conftest.err conftest.$ac_objext \
8930 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008931LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008932fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008933{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
8934$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008935if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008936 cat >>confdefs.h <<_ACEOF
8937#define HAVE_LIBDLD 1
8938_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008939
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008940 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008941
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008942fi
8943 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00008944
Ronald Oussoren79f90492009-01-02 10:44:46 +00008945# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00008946if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008947 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
8948$as_echo_n "checking for library containing sem_init... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008949if ${ac_cv_search_sem_init+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008950 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008951else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008952 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008953cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008954/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008955
Martin v. Löwiseba40652007-08-30 20:10:57 +00008956/* Override any GCC internal prototype to avoid an error.
8957 Use char because int might match the return type of a GCC
8958 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008959#ifdef __cplusplus
8960extern "C"
8961#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008962char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008963int
8964main ()
8965{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008966return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008967 ;
8968 return 0;
8969}
8970_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00008971for ac_lib in '' pthread rt posix4; do
8972 if test -z "$ac_lib"; then
8973 ac_res="none required"
8974 else
8975 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00008976 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00008977 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008978 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008979 ac_cv_search_sem_init=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00008980fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008981rm -f core conftest.err conftest.$ac_objext \
8982 conftest$ac_exeext
Matthias Klose3cef2a92012-03-14 23:39:33 +01008983 if ${ac_cv_search_sem_init+:} false; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008984 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00008985fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008986done
Matthias Klose3cef2a92012-03-14 23:39:33 +01008987if ${ac_cv_search_sem_init+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008988
Martin v. Löwiseba40652007-08-30 20:10:57 +00008989else
8990 ac_cv_search_sem_init=no
8991fi
8992rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008993LIBS=$ac_func_search_save_LIBS
8994fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008995{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
8996$as_echo "$ac_cv_search_sem_init" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008997ac_res=$ac_cv_search_sem_init
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008998if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008999 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009000
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009001fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009002 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00009003 # posix4 on Solaris 2.6
9004 # pthread (first!) on Linux
9005fi
9006
Martin v. Löwis19d17342003-06-14 21:03:05 +00009007# check if we need libintl for locale functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9009$as_echo_n "checking for textdomain in -lintl... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009010if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009011 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009012else
9013 ac_check_lib_save_LIBS=$LIBS
9014LIBS="-lintl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009015cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009016/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009017
Martin v. Löwiseba40652007-08-30 20:10:57 +00009018/* Override any GCC internal prototype to avoid an error.
9019 Use char because int might match the return type of a GCC
9020 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009021#ifdef __cplusplus
9022extern "C"
9023#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009024char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009025int
9026main ()
9027{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009028return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009029 ;
9030 return 0;
9031}
9032_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009033if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009034 ac_cv_lib_intl_textdomain=yes
9035else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009036 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009037fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009038rm -f core conftest.err conftest.$ac_objext \
9039 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009040LIBS=$ac_check_lib_save_LIBS
9041fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009042{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9043$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009044if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009045
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009046$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009047
9048fi
9049
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009050
9051# checks for system dependent C++ extensions support
9052case "$ac_sys_system" in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009053 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9054$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9055 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009056/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00009057
Georg Brandl94800df2011-02-25 11:09:02 +00009058 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009059int
9060main ()
9061{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009062loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009063 ;
9064 return 0;
9065}
Matthias Klosec511b472010-05-08 11:01:39 +00009066
Martin v. Löwis11437992002-04-12 09:54:03 +00009067_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009068if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009069
Matthias Klosec511b472010-05-08 11:01:39 +00009070
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009071$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009072
Matthias Klosec511b472010-05-08 11:01:39 +00009073 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009074$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00009075
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009076else
Matthias Klosec511b472010-05-08 11:01:39 +00009077
9078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009079$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00009080
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009081fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009082rm -f core conftest.err conftest.$ac_objext \
9083 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009084 *) ;;
9085esac
9086
Guido van Rossum70c7f481998-03-26 18:44:10 +00009087# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009088# BeOS' sockets are stashed in libnet.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9090$as_echo_n "checking for t_open in -lnsl... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009091if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009092 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009093else
Martin v. Löwis11437992002-04-12 09:54:03 +00009094 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009095LIBS="-lnsl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009096cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009097/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009098
Martin v. Löwiseba40652007-08-30 20:10:57 +00009099/* Override any GCC internal prototype to avoid an error.
9100 Use char because int might match the return type of a GCC
9101 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009102#ifdef __cplusplus
9103extern "C"
9104#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009105char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009106int
9107main ()
9108{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009109return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009110 ;
9111 return 0;
9112}
9113_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009114if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009115 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009116else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009117 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009118fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009119rm -f core conftest.err conftest.$ac_objext \
9120 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009121LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009122fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009123{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9124$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009125if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009126 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009127fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009128 # SVR4
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9130$as_echo_n "checking for socket in -lsocket... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009131if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009132 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009133else
Martin v. Löwis11437992002-04-12 09:54:03 +00009134 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009135LIBS="-lsocket $LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009136cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009137/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009138
Martin v. Löwiseba40652007-08-30 20:10:57 +00009139/* Override any GCC internal prototype to avoid an error.
9140 Use char because int might match the return type of a GCC
9141 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009142#ifdef __cplusplus
9143extern "C"
9144#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009145char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009146int
9147main ()
9148{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009149return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009150 ;
9151 return 0;
9152}
9153_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009154if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009155 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009156else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009157 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009158fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009159rm -f core conftest.err conftest.$ac_objext \
9160 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009161LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009162fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009163{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9164$as_echo "$ac_cv_lib_socket_socket" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009165if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009166 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009167fi
9168 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009169
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +00009170case "$ac_sys_system" in
9171BeOS*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lnet" >&5
9173$as_echo_n "checking for socket in -lnet... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009174if ${ac_cv_lib_net_socket+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009175 $as_echo_n "(cached) " >&6
Guido van Rossumad678af1998-10-02 14:42:15 +00009176else
Martin v. Löwis11437992002-04-12 09:54:03 +00009177 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00009178LIBS="-lnet $LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009179cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009180/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009181
Martin v. Löwiseba40652007-08-30 20:10:57 +00009182/* Override any GCC internal prototype to avoid an error.
9183 Use char because int might match the return type of a GCC
9184 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009185#ifdef __cplusplus
9186extern "C"
9187#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009188char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009189int
9190main ()
9191{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009192return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009193 ;
9194 return 0;
9195}
9196_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009197if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009198 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +00009199else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009200 ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +00009201fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009202rm -f core conftest.err conftest.$ac_objext \
9203 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009204LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00009205fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009206{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_net_socket" >&5
9207$as_echo "$ac_cv_lib_net_socket" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009208if test "x$ac_cv_lib_net_socket" = xyes; then :
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009209 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009210fi
9211 # BeOS
9212;;
9213esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00009214
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9216$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009217
Martin v. Löwiseba40652007-08-30 20:10:57 +00009218# Check whether --with-libs was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009219if test "${with_libs+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009220 withval=$with_libs;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009221{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9222$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009223LIBS="$withval $LIBS"
9224
9225else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9227$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009228fi
9229
Guido van Rossum7f43da71994-08-01 12:15:30 +00009230
Benjamin Peterson64e8f6e2014-12-15 00:00:23 -05009231
9232
9233
9234
9235
9236
9237
9238if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9239 if test -n "$ac_tool_prefix"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009240 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9241set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9243$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009244if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009245 $as_echo_n "(cached) " >&6
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009246else
9247 case $PKG_CONFIG in
9248 [\\/]* | ?:[\\/]*)
9249 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9250 ;;
9251 *)
9252 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9253for as_dir in $PATH
9254do
9255 IFS=$as_save_IFS
9256 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009257 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009258 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009259 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009260 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009261 break 2
9262 fi
9263done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009264 done
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009265IFS=$as_save_IFS
9266
9267 ;;
9268esac
9269fi
9270PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9271if test -n "$PKG_CONFIG"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9273$as_echo "$PKG_CONFIG" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009274else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009275 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9276$as_echo "no" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009277fi
9278
9279
9280fi
9281if test -z "$ac_cv_path_PKG_CONFIG"; then
9282 ac_pt_PKG_CONFIG=$PKG_CONFIG
9283 # Extract the first word of "pkg-config", so it can be a program name with args.
9284set dummy pkg-config; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009285{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9286$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009287if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009288 $as_echo_n "(cached) " >&6
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009289else
9290 case $ac_pt_PKG_CONFIG in
9291 [\\/]* | ?:[\\/]*)
9292 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9293 ;;
9294 *)
9295 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9296for as_dir in $PATH
9297do
9298 IFS=$as_save_IFS
9299 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009300 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009301 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009302 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009303 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009304 break 2
9305 fi
9306done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009307 done
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009308IFS=$as_save_IFS
9309
9310 ;;
9311esac
9312fi
9313ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9314if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9316$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009317else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9319$as_echo "no" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009320fi
9321
9322 if test "x$ac_pt_PKG_CONFIG" = x; then
9323 PKG_CONFIG=""
9324 else
9325 case $cross_compiling:$ac_tool_warned in
9326yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009327{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9328$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009329ac_tool_warned=yes ;;
9330esac
9331 PKG_CONFIG=$ac_pt_PKG_CONFIG
9332 fi
9333else
9334 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9335fi
9336
Benjamin Peterson64e8f6e2014-12-15 00:00:23 -05009337fi
9338if test -n "$PKG_CONFIG"; then
9339 _pkg_min_version=0.9.0
9340 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
9341$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
9342 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9344$as_echo "yes" >&6; }
9345 else
9346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9347$as_echo "no" >&6; }
9348 PKG_CONFIG=""
9349 fi
9350fi
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009351
9352# Check for use of the system expat library
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
9354$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009355
9356# Check whether --with-system_expat was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009357if test "${with_system_expat+set}" = set; then :
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009358 withval=$with_system_expat;
Benjamin Petersonf2d1b2a2010-10-31 16:53:53 +00009359else
9360 with_system_expat="no"
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009361fi
9362
9363
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009364{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
9365$as_echo "$with_system_expat" >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009366
9367# Check for use of the system libffi library
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
9369$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009370
9371# Check whether --with-system_ffi was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009372if test "${with_system_ffi+set}" = set; then :
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009373 withval=$with_system_ffi;
Benjamin Petersonf2d1b2a2010-10-31 16:53:53 +00009374else
9375 with_system_ffi="no"
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009376fi
9377
9378
9379if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009380 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
9381else
9382 LIBFFI_INCLUDEDIR=""
9383fi
9384
9385
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009386{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
9387$as_echo "$with_system_ffi" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +00009388
Ned Deilya2a9f572013-10-25 00:30:10 -07009389# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
9390
9391
9392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
9393$as_echo_n "checking for --with-tcltk-includes... " >&6; }
9394
9395# Check whether --with-tcltk-includes was given.
9396if test "${with_tcltk_includes+set}" = set; then :
9397 withval=$with_tcltk_includes;
9398else
9399 with_tcltk_includes="default"
9400fi
9401
9402{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
9403$as_echo "$with_tcltk_includes" >&6; }
9404{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
9405$as_echo_n "checking for --with-tcltk-libs... " >&6; }
9406
9407# Check whether --with-tcltk-libs was given.
9408if test "${with_tcltk_libs+set}" = set; then :
9409 withval=$with_tcltk_libs;
9410else
9411 with_tcltk_libs="default"
9412fi
9413
9414{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
9415$as_echo "$with_tcltk_libs" >&6; }
9416if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
9417then
9418 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
9419 then
9420 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
9421 fi
9422 TCLTK_INCLUDES=""
9423 TCLTK_LIBS=""
9424else
9425 TCLTK_INCLUDES="$with_tcltk_includes"
9426 TCLTK_LIBS="$with_tcltk_libs"
9427fi
9428
Benjamin Peterson867475c2009-04-29 20:36:25 +00009429# Check for --with-dbmliborder
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
9431$as_echo_n "checking for --with-dbmliborder... " >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +00009432
9433# Check whether --with-dbmliborder was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009434if test "${with_dbmliborder+set}" = set; then :
Benjamin Peterson867475c2009-04-29 20:36:25 +00009435 withval=$with_dbmliborder;
9436if test x$with_dbmliborder = xyes
9437then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009438as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Benjamin Peterson867475c2009-04-29 20:36:25 +00009439else
9440 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
9441 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
9442 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009443 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Benjamin Peterson867475c2009-04-29 20:36:25 +00009444 fi
9445 done
9446fi
9447fi
9448
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009449{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
9450$as_echo "$with_dbmliborder" >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +00009451
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009452# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009453
9454
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
9456$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009457
Martin v. Löwiseba40652007-08-30 20:10:57 +00009458# Check whether --with-signal-module was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009459if test "${with_signal_module+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009460 withval=$with_signal_module;
9461fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009462
9463
9464if test -z "$with_signal_module"
9465then with_signal_module="yes"
9466fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009467{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
9468$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009469
9470if test "${with_signal_module}" = "yes"; then
9471 USE_SIGNAL_MODULE=""
9472 SIGNAL_OBJS=""
9473else
9474 USE_SIGNAL_MODULE="#"
9475 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9476fi
9477
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009478# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009479
Barry Warsawc0d24d82000-06-29 16:12:00 +00009480USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009481
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dec-threads" >&5
9483$as_echo_n "checking for --with-dec-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009484
Guido van Rossumec2f0731997-01-22 20:54:01 +00009485
Martin v. Löwiseba40652007-08-30 20:10:57 +00009486# Check whether --with-dec-threads was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009487if test "${with_dec_threads+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009488 withval=$with_dec_threads;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009489{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9490$as_echo "$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +00009491LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00009492if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00009493 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00009494fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009495else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9497$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009498fi
9499
Martin v. Löwis11437992002-04-12 09:54:03 +00009500
9501# Templates for things AC_DEFINEd more than once.
9502# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009503
9504
Martin v. Löwis11437992002-04-12 09:54:03 +00009505
9506
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
9508$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009509
Martin v. Löwiseba40652007-08-30 20:10:57 +00009510# Check whether --with-threads was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009511if test "${with_threads+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009512 withval=$with_threads;
9513fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009514
9515
Barry Warsawc0d24d82000-06-29 16:12:00 +00009516# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009517
Martin v. Löwiseba40652007-08-30 20:10:57 +00009518# Check whether --with-thread was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009519if test "${with_thread+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009520 withval=$with_thread; with_threads=$with_thread
9521fi
9522
Barry Warsawc0d24d82000-06-29 16:12:00 +00009523
9524if test -z "$with_threads"
9525then with_threads="yes"
9526fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009527{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
9528$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d82000-06-29 16:12:00 +00009529
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009530
Barry Warsawc0d24d82000-06-29 16:12:00 +00009531if test "$with_threads" = "no"
9532then
9533 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009534elif test "$ac_cv_pthread_is_default" = yes
9535then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009536 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009537
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009538 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009539 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009540
9541 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009542 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009543elif test "$ac_cv_kpthread" = "yes"
9544then
9545 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009546 if test "$ac_cv_cxx_thread" = "yes"; then
9547 CXX="$CXX -Kpthread"
9548 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009549 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009550
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009551 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009552 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009553elif test "$ac_cv_kthread" = "yes"
9554then
9555 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009556 if test "$ac_cv_cxx_thread" = "yes"; then
9557 CXX="$CXX -Kthread"
9558 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009559 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009560
9561 posix_threads=yes
9562 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009563elif test "$ac_cv_pthread" = "yes"
9564then
9565 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009566 if test "$ac_cv_cxx_thread" = "yes"; then
9567 CXX="$CXX -pthread"
9568 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009569 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009570
9571 posix_threads=yes
9572 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009573else
9574 if test ! -z "$with_threads" -a -d "$with_threads"
9575 then LDFLAGS="$LDFLAGS -L$with_threads"
9576 fi
9577 if test ! -z "$withval" -a -d "$withval"
9578 then LDFLAGS="$LDFLAGS -L$withval"
9579 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009580
9581 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00009582 # define _POSIX_THREADS in unistd.h. Some apparently don't
9583 # (e.g. gnu pth with pthread emulation)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009584 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
9585$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
9586 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009587/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009588
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009589#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009590#ifdef _POSIX_THREADS
9591yes
9592#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009593
9594_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009595if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009596 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009597 unistd_defines_pthreads=yes
9598else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009599 unistd_defines_pthreads=no
9600fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009601rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009602
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
9604$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009605
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009606 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009607
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009608 ac_fn_c_check_header_mongrel "$LINENO" "cthreads.h" "ac_cv_header_cthreads_h" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01009609if test "x$ac_cv_header_cthreads_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009610 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00009611
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009612 $as_echo "#define C_THREADS 1" >>confdefs.h
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009613
Martin v. Löwis11437992002-04-12 09:54:03 +00009614
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009615$as_echo "#define HURD_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009616
9617 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009618 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009619else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009620
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009621 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 +01009622if test "x$ac_cv_header_mach_cthreads_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009623 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00009624
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009625 $as_echo "#define C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009626
Martin v. Löwis11437992002-04-12 09:54:03 +00009627
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009628$as_echo "#define MACH_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009629
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009630 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009631else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009632
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009633 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pth" >&5
9634$as_echo_n "checking for --with-pth... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009635
Martin v. Löwiseba40652007-08-30 20:10:57 +00009636# Check whether --with-pth was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009637if test "${with_pth+set}" = set; then :
9638 withval=$with_pth; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9639$as_echo "$withval" >&6; }
9640 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009641
9642
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009643$as_echo "#define HAVE_PTH 1" >>confdefs.h
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009644
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009645 LIBS="-lpth $LIBS"
9646 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009647else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9649$as_echo "no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009650
9651 # Just looking for pthread_create in libpthread is not enough:
9652 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
9653 # So we really have to include pthread.h, and then link.
9654 _libs=$LIBS
9655 LIBS="$LIBS -lpthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009656 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
9657$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
9658 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009659/* end confdefs.h. */
Stefan Krahae66ca62012-11-22 22:36:57 +01009660
9661#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009662#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00009663
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009664void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00009665int
9666main ()
9667{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009668
9669pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00009670 ;
9671 return 0;
9672}
9673_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009674if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009675
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9677$as_echo "yes" >&6; }
9678 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00009679
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009680 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009681 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009682else
Martin v. Löwis11437992002-04-12 09:54:03 +00009683
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009684 LIBS=$_libs
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009685 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Matthias Klose3cef2a92012-03-14 23:39:33 +01009686if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009687 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00009688
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009689 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009690 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00009691else
Guido van Rossumad678af1998-10-02 14:42:15 +00009692
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009693 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 +01009694if test "x$ac_cv_header_atheos_threads_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009695 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009696
9697
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009698$as_echo "#define ATHEOS_THREADS 1" >>confdefs.h
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009699
9700 THREADOBJ="Python/thread.o"
9701else
9702
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009703 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 +01009704if test "x$ac_cv_header_kernel_OS_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009705 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009706
9707
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009708$as_echo "#define BEOS_THREADS 1" >>confdefs.h
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009709
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009710 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009711else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009712
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009713 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
9714$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009715if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009716 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009717else
Martin v. Löwis11437992002-04-12 09:54:03 +00009718 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009719LIBS="-lpthreads $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009720cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009721/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009722
Martin v. Löwiseba40652007-08-30 20:10:57 +00009723/* Override any GCC internal prototype to avoid an error.
9724 Use char because int might match the return type of a GCC
9725 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009726#ifdef __cplusplus
9727extern "C"
9728#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009729char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009730int
9731main ()
9732{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009733return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009734 ;
9735 return 0;
9736}
9737_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009738if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009739 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00009740else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009741 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00009742fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009743rm -f core conftest.err conftest.$ac_objext \
9744 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009745LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009746fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009747{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
9748$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009749if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009750 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00009751
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009752 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009753 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009754 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00009755else
Greg Steinadf63d62000-07-05 10:38:09 +00009756
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009757 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
9758$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009759if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009760 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00009761else
Martin v. Löwis11437992002-04-12 09:54:03 +00009762 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009763LIBS="-lc_r $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009764cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009765/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009766
Martin v. Löwiseba40652007-08-30 20:10:57 +00009767/* Override any GCC internal prototype to avoid an error.
9768 Use char because int might match the return type of a GCC
9769 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009770#ifdef __cplusplus
9771extern "C"
9772#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009773char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009774int
9775main ()
9776{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009777return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009778 ;
9779 return 0;
9780}
9781_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009782if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009783 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00009784else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009785 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00009786fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009787rm -f core conftest.err conftest.$ac_objext \
9788 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009789LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00009790fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009791{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
9792$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009793if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009794 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00009795
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009796 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009797 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009798 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009799else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009800
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009801 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
9802$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009803if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009804 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009805else
Martin v. Löwis11437992002-04-12 09:54:03 +00009806 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009807LIBS="-lpthread $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009808cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009809/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009810
Martin v. Löwiseba40652007-08-30 20:10:57 +00009811/* Override any GCC internal prototype to avoid an error.
9812 Use char because int might match the return type of a GCC
9813 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009814#ifdef __cplusplus
9815extern "C"
9816#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009817char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009818int
9819main ()
9820{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009821return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009822 ;
9823 return 0;
9824}
9825_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009826if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009827 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009828else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009829 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009830fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009831rm -f core conftest.err conftest.$ac_objext \
9832 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009833LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009834fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009835{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
9836$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009837if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009838 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009839
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009840 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009841 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009842 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009843else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009844
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009845 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
9846$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009847if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009848 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00009849else
Martin v. Löwis11437992002-04-12 09:54:03 +00009850 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009851LIBS="-lcma $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009852cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009853/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009854
Martin v. Löwiseba40652007-08-30 20:10:57 +00009855/* Override any GCC internal prototype to avoid an error.
9856 Use char because int might match the return type of a GCC
9857 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009858#ifdef __cplusplus
9859extern "C"
9860#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009861char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009862int
9863main ()
9864{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009865return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009866 ;
9867 return 0;
9868}
9869_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009870if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009871 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00009872else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009873 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00009874fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009875rm -f core conftest.err conftest.$ac_objext \
9876 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009877LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009878fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009879{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
9880$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009881if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009882 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00009883
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009884 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009885 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009886 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00009887else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00009888
Martin v. Löwis130fb172001-07-19 11:00:41 +00009889 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00009890fi
9891
Guido van Rossum627b2d71993-12-24 10:39:16 +00009892
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009893fi
9894
Guido van Rossum0be3e491997-05-22 20:33:33 +00009895fi
9896
Guido van Rossum49545951997-12-02 19:28:29 +00009897fi
9898
Guido van Rossumb93a8621998-05-07 13:27:32 +00009899fi
9900
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009901
Michael W. Hudson54241132001-12-07 15:38:26 +00009902fi
9903
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009904
9905fi
9906
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009907fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009908rm -f core conftest.err conftest.$ac_objext \
9909 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009910fi
9911
Martin v. Löwis11437992002-04-12 09:54:03 +00009912fi
9913
9914
9915fi
9916
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009917
Michael W. Hudson54241132001-12-07 15:38:26 +00009918
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009919 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
9920$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009921if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009922 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009923else
Martin v. Löwis11437992002-04-12 09:54:03 +00009924 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009925LIBS="-lmpc $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009926cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009927/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009928
Martin v. Löwiseba40652007-08-30 20:10:57 +00009929/* Override any GCC internal prototype to avoid an error.
9930 Use char because int might match the return type of a GCC
9931 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009932#ifdef __cplusplus
9933extern "C"
9934#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009935char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009936int
9937main ()
9938{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009939return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009940 ;
9941 return 0;
9942}
9943_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009944if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009945 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009946else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009947 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009948fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009949rm -f core conftest.err conftest.$ac_objext \
9950 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009951LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009952fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009953{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
9954$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009955if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009956 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009957
Martin v. Löwis130fb172001-07-19 11:00:41 +00009958 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009959 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009960 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009961fi
9962
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009963
Neal Norwitza978ab02002-11-02 16:58:05 +00009964 if test "$posix_threads" != "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009965 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
9966$as_echo_n "checking for thr_create in -lthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009967if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009968 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009969else
Martin v. Löwis11437992002-04-12 09:54:03 +00009970 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009971LIBS="-lthread $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009972cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009973/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009974
Martin v. Löwiseba40652007-08-30 20:10:57 +00009975/* Override any GCC internal prototype to avoid an error.
9976 Use char because int might match the return type of a GCC
9977 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009978#ifdef __cplusplus
9979extern "C"
9980#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009981char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009982int
9983main ()
9984{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009985return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009986 ;
9987 return 0;
9988}
9989_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009990if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009991 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009992else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009993 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009994fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009995rm -f core conftest.err conftest.$ac_objext \
9996 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009997LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009998fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009999{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
10000$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010001if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010002 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010003
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010004 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010005 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010006 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010007fi
10008
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010009 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010010
Martin v. Löwis130fb172001-07-19 11:00:41 +000010011 if test "$USE_THREAD_MODULE" != "#"
10012 then
10013 # If the above checks didn't disable threads, (at least) OSF1
10014 # needs this '-threads' argument during linking.
10015 case $ac_sys_system in
10016 OSF1) LDLAST=-threads;;
10017 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000010018 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010019fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010020
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010021if test "$posix_threads" = "yes"; then
10022 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010023
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010024$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010025
10026 fi
10027
10028 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10029 case $ac_sys_system/$ac_sys_release in
Charles-François Natali4929eb92011-07-21 19:41:04 +020010030 SunOS/5.6)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010031$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010032
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010033 ;;
10034 SunOS/5.8)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010035$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010036
10037 ;;
Charles-François Natali4929eb92011-07-21 19:41:04 +020010038 AIX/*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010039$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimescba36bb2008-01-30 22:54:18 +000010040
10041 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010042 esac
10043
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010044 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10045$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010046 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010047 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010048else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010049 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010050 ac_cv_pthread_system_supported=no
10051else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010052 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010053/* end confdefs.h. */
Stefan Krahae66ca62012-11-22 22:36:57 +010010054
10055 #include <stdio.h>
10056 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010057 void *foo(void *parm) {
10058 return NULL;
10059 }
10060 main() {
10061 pthread_attr_t attr;
10062 pthread_t id;
10063 if (pthread_attr_init(&attr)) exit(-1);
10064 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10065 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10066 exit(0);
10067 }
10068_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010069if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010070 ac_cv_pthread_system_supported=yes
10071else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010072 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010073fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010074rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10075 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010076fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010077
Martin v. Löwiseba40652007-08-30 20:10:57 +000010078
Guido van Rossum627b2d71993-12-24 10:39:16 +000010079fi
10080
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10082$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010083 if test "$ac_cv_pthread_system_supported" = "yes"; then
10084
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010085$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010086
10087 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010088 for ac_func in pthread_sigmask
10089do :
10090 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010091if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010092 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010093#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010094_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010095 case $ac_sys_system in
10096 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010097
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010098$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010099
10100 ;;
10101 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010102fi
10103done
10104
Christian Heimes0d604cf2013-08-21 13:26:05 +020010105 for ac_func in pthread_atfork
10106do :
10107 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
10108if test "x$ac_cv_func_pthread_atfork" = xyes; then :
10109 cat >>confdefs.h <<_ACEOF
10110#define HAVE_PTHREAD_ATFORK 1
10111_ACEOF
10112
10113fi
10114done
10115
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010116fi
10117
10118
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010119# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010120
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10122$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010123# Check whether --enable-ipv6 was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010124if test "${enable_ipv6+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000010125 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010126 no)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10128$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010129 ipv6=no
10130 ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010131 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10132$as_echo "yes" >&6; }
10133 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010134
10135 ipv6=yes
10136 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010137 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010138else
Martin v. Löwis11437992002-04-12 09:54:03 +000010139
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010140 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010141/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010142 /* AF_INET6 available check */
10143#include <sys/types.h>
10144#include <sys/socket.h>
Charles-François Natalibe2b9072013-01-08 19:47:00 +010010145int
10146main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010147{
Charles-François Natalibe2b9072013-01-08 19:47:00 +010010148int domain = AF_INET6;
10149 ;
10150 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010151}
Martin v. Löwis11437992002-04-12 09:54:03 +000010152_ACEOF
Charles-François Natalibe2b9072013-01-08 19:47:00 +010010153if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +000010154
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10156$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010157 ipv6=yes
Matthias Klosec511b472010-05-08 11:01:39 +000010158
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010159else
Matthias Klosec511b472010-05-08 11:01:39 +000010160
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10162$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010163 ipv6=no
Matthias Klosec511b472010-05-08 11:01:39 +000010164
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010165fi
Charles-François Natalibe2b9072013-01-08 19:47:00 +010010166rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010167
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010168if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010169 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10170$as_echo_n "checking if RFC2553 API is available... " >&6; }
10171 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010172/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +000010173
10174 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010175#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010176int
10177main ()
10178{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010179struct sockaddr_in6 x;
Matthias Klosec511b472010-05-08 11:01:39 +000010180 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010181 ;
10182 return 0;
10183}
Matthias Klosec511b472010-05-08 11:01:39 +000010184
Martin v. Löwis11437992002-04-12 09:54:03 +000010185_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010186if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +000010187
10188 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010189$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000010190 ipv6=yes
10191
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010192else
Matthias Klosec511b472010-05-08 11:01:39 +000010193
10194 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010195$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000010196 ipv6=no
10197
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010198fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010199rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010200fi
10201
10202if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010203 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010204
10205fi
10206
Martin v. Löwiseba40652007-08-30 20:10:57 +000010207fi
10208
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010209
10210ipv6type=unknown
10211ipv6lib=none
10212ipv6trylibc=no
10213
10214if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010215 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10216$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010217 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10218 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010219 case $i in
10220 inria)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010221 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010222/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010223
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010224#include <netinet/in.h>
10225#ifdef IPV6_INRIA_VERSION
10226yes
10227#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010228_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010229if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010230 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010231 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010232fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000010233rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010234
10235 ;;
10236 kame)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010237 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010238/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010239
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010240#include <netinet/in.h>
10241#ifdef __KAME__
10242yes
10243#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010244_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010245if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010246 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010247 ipv6type=$i;
10248 ipv6lib=inet6
10249 ipv6libdir=/usr/local/v6/lib
10250 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010251fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000010252rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010253
10254 ;;
10255 linux-glibc)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010256 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010257/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010258
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010259#include <features.h>
10260#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10261yes
10262#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010263_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010264if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010265 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010266 ipv6type=$i;
10267 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010268fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000010269rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010270
10271 ;;
10272 linux-inet6)
10273 if test -d /usr/inet6; then
10274 ipv6type=$i
10275 ipv6lib=inet6
10276 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010277 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010278 fi
10279 ;;
10280 solaris)
10281 if test -f /etc/netconfig; then
Antoine Pitrou31e85952011-01-03 18:57:14 +000010282 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010283 ipv6type=$i
10284 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010285 fi
10286 fi
10287 ;;
10288 toshiba)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010289 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010290/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010291
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010292#include <sys/param.h>
10293#ifdef _TOSHIBA_INET6
10294yes
10295#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010296_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010297if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010298 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010299 ipv6type=$i;
10300 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010301 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010302fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000010303rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010304
10305 ;;
10306 v6d)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010307 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010308/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010309
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010310#include </usr/local/v6/include/sys/v6config.h>
10311#ifdef __V6D__
10312yes
10313#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010314_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010315if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010316 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010317 ipv6type=$i;
10318 ipv6lib=v6;
10319 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010320 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010321fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000010322rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010323
10324 ;;
10325 zeta)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010326 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010327/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010328
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010329#include <sys/param.h>
10330#ifdef _ZETA_MINAMI_INET6
10331yes
10332#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010333_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010334if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010335 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010336 ipv6type=$i;
10337 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010338 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010339fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000010340rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010341
10342 ;;
10343 esac
10344 if test "$ipv6type" != "unknown"; then
10345 break
10346 fi
10347 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10349$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010350fi
10351
10352if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10353 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10354 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10355 echo "using lib$ipv6lib"
10356 else
10357 if test $ipv6trylibc = "yes"; then
10358 echo "using libc"
10359 else
10360 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10361 echo "You need to fetch lib$ipv6lib.a from appropriate"
10362 echo 'ipv6 kit and compile beforehand.'
10363 exit 1
10364 fi
10365 fi
10366fi
10367
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
10369$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
10370cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010371/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +000010372
10373 #include <Carbon/Carbon.h>
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010374int
10375main ()
10376{
10377FSIORefNum fRef = 0
10378 ;
10379 return 0;
10380}
Mark Dickinson0712b562010-05-08 19:13:21 +000010381
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010382_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010383if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +000010384
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010385
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010386$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010387
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10389$as_echo "yes" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010390
Mark Dickinson0712b562010-05-08 19:13:21 +000010391else
10392
10393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10394$as_echo "no" >&6; }
10395
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010396fi
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010397rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10398
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010399# Check for --with-doc-strings
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10401$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010402
Martin v. Löwiseba40652007-08-30 20:10:57 +000010403# Check whether --with-doc-strings was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010404if test "${with_doc_strings+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000010405 withval=$with_doc_strings;
10406fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010407
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010408
10409if test -z "$with_doc_strings"
10410then with_doc_strings="yes"
10411fi
10412if test "$with_doc_strings" != "no"
10413then
10414
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010415$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010416
10417fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010418{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10419$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010420
Neil Schemenauera35c6882001-02-27 04:45:05 +000010421# Check for Python-specific malloc support
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
10423$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010424
Martin v. Löwiseba40652007-08-30 20:10:57 +000010425# Check whether --with-tsc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010426if test "${with_tsc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000010427 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010428if test "$withval" != no
10429then
10430
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010431$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010432
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10434$as_echo "yes" >&6; }
10435else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10436$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010437fi
10438else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010439 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10440$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010441fi
10442
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010443
10444# Check for Python-specific malloc support
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10446$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010447
Martin v. Löwiseba40652007-08-30 20:10:57 +000010448# Check whether --with-pymalloc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010449if test "${with_pymalloc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000010450 withval=$with_pymalloc;
10451fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010452
Neil Schemenauera35c6882001-02-27 04:45:05 +000010453
Neil Schemenauer16c22972002-03-22 15:34:49 +000010454if test -z "$with_pymalloc"
10455then with_pymalloc="yes"
10456fi
10457if test "$with_pymalloc" != "no"
10458then
Martin v. Löwis11437992002-04-12 09:54:03 +000010459
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010460$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000010461
10462fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010463{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
10464$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000010465
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010466# Check for Valgrind support
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010467{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
10468$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010469
10470# Check whether --with-valgrind was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010471if test "${with_valgrind+set}" = set; then :
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010472 withval=$with_valgrind;
10473else
10474 with_valgrind=no
10475fi
10476
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010477{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
10478$as_echo "$with_valgrind" >&6; }
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010479if test "$with_valgrind" != no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010480 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 +010010481if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010482
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010483$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010484
10485else
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010486 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010487
10488fi
10489
10490
10491fi
10492
Barry Warsawef82cd72000-06-30 16:21:01 +000010493# Check for --with-wctype-functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-wctype-functions" >&5
10495$as_echo_n "checking for --with-wctype-functions... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010496
Martin v. Löwiseba40652007-08-30 20:10:57 +000010497# Check whether --with-wctype-functions was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010498if test "${with_wctype_functions+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000010499 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000010500if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000010501then
10502
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010503$as_echo "#define WANT_WCTYPE_FUNCTIONS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010504
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010505 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10506$as_echo "yes" >&6; }
10507else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10508$as_echo "no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000010509fi
10510else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10512$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010513fi
10514
Barry Warsawef82cd72000-06-30 16:21:01 +000010515
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010516# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000010517
Guido van Rossum98935bf2001-09-05 19:13:16 +000010518DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000010519
Guido van Rossume97ee181999-12-20 21:27:22 +000010520# the dlopen() function means we might want to use dynload_shlib.o. some
10521# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000010522for ac_func in dlopen
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010523do :
10524 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010525if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010526 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010527#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010528_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000010529
Guido van Rossume97ee181999-12-20 21:27:22 +000010530fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010531done
Guido van Rossume97ee181999-12-20 21:27:22 +000010532
Michael W. Hudson54241132001-12-07 15:38:26 +000010533
Guido van Rossume97ee181999-12-20 21:27:22 +000010534# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
10535# loading of modules.
10536
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
10538$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010539if test -z "$DYNLOADFILE"
10540then
10541 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000010542 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
10543 if test "$ac_cv_func_dlopen" = yes
10544 then DYNLOADFILE="dynload_shlib.o"
10545 else DYNLOADFILE="dynload_aix.o"
10546 fi
10547 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000010548 BeOS*) DYNLOADFILE="dynload_beos.o";;
10549 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Anthony Baxter82201742006-04-09 15:07:40 +000010550 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
10551 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010552 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000010553 *)
10554 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
10555 # out any dynamic loading
10556 if test "$ac_cv_func_dlopen" = yes
10557 then DYNLOADFILE="dynload_shlib.o"
10558 else DYNLOADFILE="dynload_stub.o"
10559 fi
10560 ;;
10561 esac
10562fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010563{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
10564$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010565if test "$DYNLOADFILE" != "dynload_stub.o"
10566then
Martin v. Löwis11437992002-04-12 09:54:03 +000010567
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010568$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000010569
10570fi
10571
Neil Schemenauer4e425612001-06-19 15:44:15 +000010572# MACHDEP_OBJS can be set to platform-specific object files needed by Python
10573
Michael W. Hudson54241132001-12-07 15:38:26 +000010574
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
10576$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010577if test -z "$MACHDEP_OBJS"
10578then
Jack Jansene578a632001-08-15 01:27:14 +000010579 MACHDEP_OBJS=$extra_machdep_objs
10580else
10581 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000010582fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010583{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
10584$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010585
Guido van Rossum627b2d71993-12-24 10:39:16 +000010586# checks for library functions
Martin v. Löwisaef18b12008-03-24 13:31:16 +000010587for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
10588 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
doko@ubuntu.coma50b0de2015-04-13 21:55:59 +020010589 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
10590 getentropy \
Martin v. Löwis50ea4562009-11-27 13:56:01 +000010591 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Benjamin Petersond16e01c2014-02-04 10:20:26 -050010592 initgroups kill killpg lchmod lchown lstat mkfifo mknod mktime mmap \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000010593 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000010594 putenv readlink realpath \
Jesse Noller355b1262009-04-02 00:03:28 +000010595 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
10596 setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000010597 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Martin v. Löwis50ea4562009-11-27 13:56:01 +000010598 setlocale setregid setreuid setresuid setresgid \
10599 setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +000010600 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000010601 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Neal Norwitz05a45592006-03-20 06:30:08 +000010602 truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010603do :
10604 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10605ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010606if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010607 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010608#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010609_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010610
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010611fi
10612done
10613
Michael W. Hudson54241132001-12-07 15:38:26 +000010614
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010615# For some functions, having a definition is not sufficient, since
10616# we want to take their address.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
10618$as_echo_n "checking for chroot... " >&6; }
10619cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010620/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010621#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010622int
10623main ()
10624{
10625void *x=chroot
10626 ;
10627 return 0;
10628}
10629_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010630if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010631
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010632$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010633
Matthias Klosec511b472010-05-08 11:01:39 +000010634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010635$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010636else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10638$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010639
10640fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010641rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
10643$as_echo_n "checking for link... " >&6; }
10644cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010645/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010646#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010647int
10648main ()
10649{
10650void *x=link
10651 ;
10652 return 0;
10653}
10654_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010655if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010656
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010657$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010658
Matthias Klosec511b472010-05-08 11:01:39 +000010659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010660$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010661else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10663$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010664
10665fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010666rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
10668$as_echo_n "checking for symlink... " >&6; }
10669cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010670/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010671#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010672int
10673main ()
10674{
10675void *x=symlink
10676 ;
10677 return 0;
10678}
10679_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010680if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010681
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010682$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010683
Matthias Klosec511b472010-05-08 11:01:39 +000010684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010685$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010686else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10688$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010689
10690fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010691rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
10693$as_echo_n "checking for fchdir... " >&6; }
10694cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010695/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010696#include <unistd.h>
10697int
10698main ()
10699{
10700void *x=fchdir
10701 ;
10702 return 0;
10703}
10704_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010705if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010706
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010707$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010708
Matthias Klosec511b472010-05-08 11:01:39 +000010709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010710$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010711else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10713$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010714
10715fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010716rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
10718$as_echo_n "checking for fsync... " >&6; }
10719cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010720/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010721#include <unistd.h>
10722int
10723main ()
10724{
10725void *x=fsync
10726 ;
10727 return 0;
10728}
10729_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010730if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010731
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010732$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010733
Matthias Klosec511b472010-05-08 11:01:39 +000010734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010735$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010736else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10738$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010739
10740fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010741rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
10743$as_echo_n "checking for fdatasync... " >&6; }
10744cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010745/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010746#include <unistd.h>
10747int
10748main ()
10749{
10750void *x=fdatasync
10751 ;
10752 return 0;
10753}
10754_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010755if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010756
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010757$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010758
Matthias Klosec511b472010-05-08 11:01:39 +000010759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010760$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010761else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10763$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010764
10765fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010766rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
10768$as_echo_n "checking for epoll... " >&6; }
10769cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010770/* end confdefs.h. */
10771#include <sys/epoll.h>
10772int
10773main ()
10774{
10775void *x=epoll_create
10776 ;
10777 return 0;
10778}
10779_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010780if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010781
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010782$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010783
Matthias Klosec511b472010-05-08 11:01:39 +000010784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010785$as_echo "yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010786else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10788$as_echo "no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010789
10790fi
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010791rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
10793$as_echo_n "checking for kqueue... " >&6; }
10794cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010795/* end confdefs.h. */
10796
10797#include <sys/types.h>
10798#include <sys/event.h>
10799
10800int
10801main ()
10802{
10803int x=kqueue()
10804 ;
10805 return 0;
10806}
10807_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010808if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010809
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010810$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010811
Matthias Klosec511b472010-05-08 11:01:39 +000010812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010813$as_echo "yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010814else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010815 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10816$as_echo "no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010817
10818fi
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010819rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010820# On some systems (eg. FreeBSD 5), we would find a definition of the
10821# functions ctermid_r, setgroups in the library, but no prototype
10822# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
10823# address to avoid compiler warnings and potential miscompilations
10824# because of the missing prototypes.
10825
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
10827$as_echo_n "checking for ctermid_r... " >&6; }
10828cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010829/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010830
Martin v. Löwisd5843682002-11-21 20:41:28 +000010831#include <stdio.h>
10832
Martin v. Löwisd5843682002-11-21 20:41:28 +000010833int
10834main ()
10835{
10836void* p = ctermid_r
10837 ;
10838 return 0;
10839}
10840_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010841if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010842
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010843$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010844
Matthias Klosec511b472010-05-08 11:01:39 +000010845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010846$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010847else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10849$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010850
10851fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010852rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10853
Antoine Pitroub170f172010-09-10 18:47:36 +000010854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
10855$as_echo_n "checking for flock declaration... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010856if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010857 $as_echo_n "(cached) " >&6
10858else
10859 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010860/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010861#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010862int
10863main ()
10864{
10865void* p = flock
Antoine Pitroub170f172010-09-10 18:47:36 +000010866
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010867 ;
10868 return 0;
10869}
10870_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010871if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010872 ac_cv_flock_decl=yes
10873else
10874 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010875
10876fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010877rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitrou85729812010-09-07 14:55:24 +000010878
Antoine Pitroub170f172010-09-10 18:47:36 +000010879fi
10880{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
10881$as_echo "$ac_cv_flock_decl" >&6; }
10882if test "x${ac_cv_flock_decl}" = xyes; then
10883 for ac_func in flock
10884do :
10885 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010886if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010887 cat >>confdefs.h <<_ACEOF
10888#define HAVE_FLOCK 1
Antoine Pitrou85729812010-09-07 14:55:24 +000010889_ACEOF
Antoine Pitroub170f172010-09-10 18:47:36 +000010890
Antoine Pitrou85729812010-09-07 14:55:24 +000010891else
Antoine Pitroub170f172010-09-10 18:47:36 +000010892 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitrou85729812010-09-07 14:55:24 +000010893$as_echo_n "checking for flock in -lbsd... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010894if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitrou85729812010-09-07 14:55:24 +000010895 $as_echo_n "(cached) " >&6
10896else
10897 ac_check_lib_save_LIBS=$LIBS
10898LIBS="-lbsd $LIBS"
10899cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10900/* end confdefs.h. */
10901
10902/* Override any GCC internal prototype to avoid an error.
10903 Use char because int might match the return type of a GCC
10904 builtin and then its argument prototype would still apply. */
10905#ifdef __cplusplus
10906extern "C"
10907#endif
10908char flock ();
10909int
10910main ()
10911{
10912return flock ();
10913 ;
10914 return 0;
10915}
10916_ACEOF
10917if ac_fn_c_try_link "$LINENO"; then :
10918 ac_cv_lib_bsd_flock=yes
10919else
10920 ac_cv_lib_bsd_flock=no
10921fi
10922rm -f core conftest.err conftest.$ac_objext \
10923 conftest$ac_exeext conftest.$ac_ext
10924LIBS=$ac_check_lib_save_LIBS
10925fi
10926{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
10927$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010928if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010929 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitrou85729812010-09-07 14:55:24 +000010930
10931
10932$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
10933
10934
10935fi
10936
10937
10938fi
Antoine Pitroub170f172010-09-10 18:47:36 +000010939done
10940
Antoine Pitrou85729812010-09-07 14:55:24 +000010941fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010942
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
10944$as_echo_n "checking for getpagesize... " >&6; }
10945cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010946/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010947
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010948#include <unistd.h>
10949
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010950int
10951main ()
10952{
10953void* p = getpagesize
10954 ;
10955 return 0;
10956}
10957_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010958if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010959
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010960$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010961
Matthias Klosec511b472010-05-08 11:01:39 +000010962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010963$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010964else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10966$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010967
10968fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010969rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010970
Charles-François Natali93a11752011-11-27 13:01:35 +010010971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
10972$as_echo_n "checking for broken unsetenv... " >&6; }
10973cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10974/* end confdefs.h. */
10975
10976#include <stdlib.h>
10977
10978int
10979main ()
10980{
10981int res = unsetenv("DUMMY")
10982 ;
10983 return 0;
10984}
10985_ACEOF
10986if ac_fn_c_try_compile "$LINENO"; then :
10987 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10988$as_echo "no" >&6; }
10989else
10990
10991$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
10992
10993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10994$as_echo "yes" >&6; }
10995
10996fi
10997rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10998
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010999for ac_prog in true
11000do
11001 # Extract the first word of "$ac_prog", so it can be a program name with args.
11002set dummy $ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11004$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011005if ${ac_cv_prog_TRUE+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011006 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011007else
11008 if test -n "$TRUE"; then
11009 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
11010else
11011as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11012for as_dir in $PATH
11013do
11014 IFS=$as_save_IFS
11015 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011016 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +010011017 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011018 ac_cv_prog_TRUE="$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011019 $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 +000011020 break 2
11021 fi
11022done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011023 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000011024IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011025
11026fi
11027fi
11028TRUE=$ac_cv_prog_TRUE
11029if test -n "$TRUE"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011030 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11031$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011032else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11034$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011035fi
11036
Martin v. Löwiseba40652007-08-30 20:10:57 +000011037
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011038 test -n "$TRUE" && break
11039done
11040test -n "$TRUE" || TRUE="/bin/true"
11041
11042
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11044$as_echo_n "checking for inet_aton in -lc... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011045if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011046 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011047else
11048 ac_check_lib_save_LIBS=$LIBS
11049LIBS="-lc $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011050cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011051/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011052
Martin v. Löwiseba40652007-08-30 20:10:57 +000011053/* Override any GCC internal prototype to avoid an error.
11054 Use char because int might match the return type of a GCC
11055 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011056#ifdef __cplusplus
11057extern "C"
11058#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011059char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011060int
11061main ()
11062{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011063return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011064 ;
11065 return 0;
11066}
11067_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011068if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011069 ac_cv_lib_c_inet_aton=yes
11070else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011071 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011072fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011073rm -f core conftest.err conftest.$ac_objext \
11074 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011075LIBS=$ac_check_lib_save_LIBS
11076fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011077{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11078$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011079if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011080 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011081else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011082 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11083$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011084if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011085 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011086else
11087 ac_check_lib_save_LIBS=$LIBS
11088LIBS="-lresolv $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011089cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011090/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011091
Martin v. Löwiseba40652007-08-30 20:10:57 +000011092/* Override any GCC internal prototype to avoid an error.
11093 Use char because int might match the return type of a GCC
11094 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011095#ifdef __cplusplus
11096extern "C"
11097#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011098char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011099int
11100main ()
11101{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011102return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011103 ;
11104 return 0;
11105}
11106_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011107if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011108 ac_cv_lib_resolv_inet_aton=yes
11109else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011110 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011111fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011112rm -f core conftest.err conftest.$ac_objext \
11113 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011114LIBS=$ac_check_lib_save_LIBS
11115fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011116{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11117$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011118if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011119 cat >>confdefs.h <<_ACEOF
11120#define HAVE_LIBRESOLV 1
11121_ACEOF
11122
11123 LIBS="-lresolv $LIBS"
11124
11125fi
11126
11127
11128fi
11129
11130
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011131# On Tru64, chflags seems to be present, but calling it will
11132# exit Python
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11134$as_echo_n "checking for chflags... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011135if ${ac_cv_have_chflags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011136 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011137else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011138 if test "$cross_compiling" = yes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000011139 ac_cv_have_chflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011140else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011141 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011142/* end confdefs.h. */
Ned Deily43e10542011-06-27 23:41:53 -070011143
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011144#include <sys/stat.h>
11145#include <unistd.h>
11146int main(int argc, char*argv[])
11147{
11148 if(chflags(argv[0], 0) != 0)
11149 return 1;
11150 return 0;
11151}
Ned Deily43e10542011-06-27 23:41:53 -070011152
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011153_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011154if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011155 ac_cv_have_chflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011156else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011157 ac_cv_have_chflags=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011158fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011159rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11160 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000011161fi
11162
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011163
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011164fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011165{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11166$as_echo "$ac_cv_have_chflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000011167if test "$ac_cv_have_chflags" = cross ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011168 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011169if test "x$ac_cv_func_chflags" = xyes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000011170 ac_cv_have_chflags="yes"
11171else
11172 ac_cv_have_chflags="no"
11173fi
11174
11175fi
11176if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011177
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011178$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011179
11180fi
11181
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11183$as_echo_n "checking for lchflags... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011184if ${ac_cv_have_lchflags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011185 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011186else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011187 if test "$cross_compiling" = yes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000011188 ac_cv_have_lchflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011189else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011190 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011191/* end confdefs.h. */
Ned Deily43e10542011-06-27 23:41:53 -070011192
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011193#include <sys/stat.h>
11194#include <unistd.h>
11195int main(int argc, char*argv[])
11196{
11197 if(lchflags(argv[0], 0) != 0)
11198 return 1;
11199 return 0;
11200}
Ned Deily43e10542011-06-27 23:41:53 -070011201
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011202_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011203if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011204 ac_cv_have_lchflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011205else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011206 ac_cv_have_lchflags=no
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011207fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011208rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11209 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011210fi
11211
11212
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011213fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011214{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11215$as_echo "$ac_cv_have_lchflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000011216if test "$ac_cv_have_lchflags" = cross ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011217 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011218if test "x$ac_cv_func_lchflags" = xyes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000011219 ac_cv_have_lchflags="yes"
11220else
11221 ac_cv_have_lchflags="no"
11222fi
11223
11224fi
11225if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011226
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011227$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011228
11229fi
11230
Ronald Oussorenf8752642006-07-06 10:13:35 +000011231case $ac_sys_system/$ac_sys_release in
11232Darwin/*)
11233 _CUR_CFLAGS="${CFLAGS}"
11234 _CUR_LDFLAGS="${LDFLAGS}"
11235 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11236 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11237 ;;
11238esac
11239
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11241$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011242if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011243 $as_echo_n "(cached) " >&6
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011244else
11245 ac_check_lib_save_LIBS=$LIBS
11246LIBS="-lz $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011247cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011248/* end confdefs.h. */
11249
Martin v. Löwiseba40652007-08-30 20:10:57 +000011250/* Override any GCC internal prototype to avoid an error.
11251 Use char because int might match the return type of a GCC
11252 builtin and then its argument prototype would still apply. */
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011253#ifdef __cplusplus
11254extern "C"
11255#endif
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011256char inflateCopy ();
11257int
11258main ()
11259{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011260return inflateCopy ();
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011261 ;
11262 return 0;
11263}
11264_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011265if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011266 ac_cv_lib_z_inflateCopy=yes
11267else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011268 ac_cv_lib_z_inflateCopy=no
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011269fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011270rm -f core conftest.err conftest.$ac_objext \
11271 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011272LIBS=$ac_check_lib_save_LIBS
11273fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011274{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
11275$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011276if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011277
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011278$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011279
11280fi
11281
11282
Ronald Oussorenf8752642006-07-06 10:13:35 +000011283case $ac_sys_system/$ac_sys_release in
11284Darwin/*)
11285 CFLAGS="${_CUR_CFLAGS}"
11286 LDFLAGS="${_CUR_LDFLAGS}"
11287 ;;
11288esac
11289
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
11291$as_echo_n "checking for hstrerror... " >&6; }
11292cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011293/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011294
Martin v. Löwise9416172003-05-03 10:12:45 +000011295#include <netdb.h>
11296
Martin v. Löwise9416172003-05-03 10:12:45 +000011297int
11298main ()
11299{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011300void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011301 ;
11302 return 0;
11303}
11304_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011305if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011306
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011307$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011308
Matthias Klosec511b472010-05-08 11:01:39 +000011309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011310$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011311else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11313$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011314
11315fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011316rm -f core conftest.err conftest.$ac_objext \
11317 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011318
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
11320$as_echo_n "checking for inet_aton... " >&6; }
11321cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011322/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011323
Martin v. Löwis86d66262006-02-17 08:40:11 +000011324#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011325#include <sys/socket.h>
11326#include <netinet/in.h>
11327#include <arpa/inet.h>
11328
Martin v. Löwise9416172003-05-03 10:12:45 +000011329int
11330main ()
11331{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011332void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011333 ;
11334 return 0;
11335}
11336_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011337if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011338
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011339$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011340
Matthias Klosec511b472010-05-08 11:01:39 +000011341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011342$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011343else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11345$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011346
11347fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011348rm -f core conftest.err conftest.$ac_objext \
11349 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011350
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
11352$as_echo_n "checking for inet_pton... " >&6; }
11353cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011354/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011355
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011356#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011357#include <sys/socket.h>
11358#include <netinet/in.h>
11359#include <arpa/inet.h>
11360
Martin v. Löwise9416172003-05-03 10:12:45 +000011361int
11362main ()
11363{
11364void* p = inet_pton
11365 ;
11366 return 0;
11367}
11368_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011369if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011370
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011371$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011372
Matthias Klosec511b472010-05-08 11:01:39 +000011373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011374$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011375else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11377$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011378
11379fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011380rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000011381
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011382# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
11384$as_echo_n "checking for setgroups... " >&6; }
11385cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011386/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011387
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011388#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011389#ifdef HAVE_GRP_H
11390#include <grp.h>
11391#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000011392
Martin v. Löwisd5843682002-11-21 20:41:28 +000011393int
11394main ()
11395{
11396void* p = setgroups
11397 ;
11398 return 0;
11399}
11400_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011401if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011402
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011403$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011404
Matthias Klosec511b472010-05-08 11:01:39 +000011405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011406$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011407else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11409$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011410
11411fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011412rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000011413
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011414# check for openpty and forkpty
11415
11416for ac_func in openpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011417do :
11418 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011419if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011420 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011421#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011422_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011423
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011424else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011425 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
11426$as_echo_n "checking for openpty in -lutil... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011427if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011428 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011429else
Martin v. Löwis11437992002-04-12 09:54:03 +000011430 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011431LIBS="-lutil $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011432cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011433/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011434
Martin v. Löwiseba40652007-08-30 20:10:57 +000011435/* Override any GCC internal prototype to avoid an error.
11436 Use char because int might match the return type of a GCC
11437 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011438#ifdef __cplusplus
11439extern "C"
11440#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011441char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011442int
11443main ()
11444{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011445return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011446 ;
11447 return 0;
11448}
11449_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011450if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011451 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011452else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011453 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011454fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011455rm -f core conftest.err conftest.$ac_objext \
11456 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011457LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011458fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011459{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
11460$as_echo "$ac_cv_lib_util_openpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011461if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011462 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011463 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011464else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011465 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
11466$as_echo_n "checking for openpty in -lbsd... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011467if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011468 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011469else
11470 ac_check_lib_save_LIBS=$LIBS
11471LIBS="-lbsd $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011472cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011473/* end confdefs.h. */
11474
Martin v. Löwiseba40652007-08-30 20:10:57 +000011475/* Override any GCC internal prototype to avoid an error.
11476 Use char because int might match the return type of a GCC
11477 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011478#ifdef __cplusplus
11479extern "C"
11480#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011481char openpty ();
11482int
11483main ()
11484{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011485return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011486 ;
11487 return 0;
11488}
11489_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011490if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011491 ac_cv_lib_bsd_openpty=yes
11492else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011493 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011494fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011495rm -f core conftest.err conftest.$ac_objext \
11496 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011497LIBS=$ac_check_lib_save_LIBS
11498fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011499{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
11500$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011501if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011502 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011503 LIBS="$LIBS -lbsd"
11504fi
11505
11506
11507fi
11508
Fred Drake8cef4cf2000-06-28 16:40:38 +000011509
11510fi
11511done
11512
11513for ac_func in forkpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011514do :
11515 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011516if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011517 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011518#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011519_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011520
Fred Drake8cef4cf2000-06-28 16:40:38 +000011521else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011522 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
11523$as_echo_n "checking for forkpty in -lutil... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011524if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011525 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011526else
Martin v. Löwis11437992002-04-12 09:54:03 +000011527 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011528LIBS="-lutil $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011529cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011530/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011531
Martin v. Löwiseba40652007-08-30 20:10:57 +000011532/* Override any GCC internal prototype to avoid an error.
11533 Use char because int might match the return type of a GCC
11534 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011535#ifdef __cplusplus
11536extern "C"
11537#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011538char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011539int
11540main ()
11541{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011542return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011543 ;
11544 return 0;
11545}
11546_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011547if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011548 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011549else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011550 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011551fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011552rm -f core conftest.err conftest.$ac_objext \
11553 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011554LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011555fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011556{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
11557$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011558if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011559 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011560 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011561else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011562 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
11563$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011564if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011565 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011566else
11567 ac_check_lib_save_LIBS=$LIBS
11568LIBS="-lbsd $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011569cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011570/* end confdefs.h. */
11571
Martin v. Löwiseba40652007-08-30 20:10:57 +000011572/* Override any GCC internal prototype to avoid an error.
11573 Use char because int might match the return type of a GCC
11574 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011575#ifdef __cplusplus
11576extern "C"
11577#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011578char forkpty ();
11579int
11580main ()
11581{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011582return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011583 ;
11584 return 0;
11585}
11586_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011587if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011588 ac_cv_lib_bsd_forkpty=yes
11589else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011590 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011591fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011592rm -f core conftest.err conftest.$ac_objext \
11593 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011594LIBS=$ac_check_lib_save_LIBS
11595fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011596{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
11597$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011598if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011599 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011600 LIBS="$LIBS -lbsd"
11601fi
11602
11603
11604fi
11605
Fred Drake8cef4cf2000-06-28 16:40:38 +000011606
11607fi
11608done
11609
Jack Jansendd19cf82001-12-06 22:36:17 +000011610
Brett Cannonaa5778d2008-03-18 04:09:00 +000011611# Stuff for expat.
Brett Cannonaa5778d2008-03-18 04:09:00 +000011612for ac_func in memmove
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011613do :
11614 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011615if test "x$ac_cv_func_memmove" = xyes; then :
Brett Cannonaa5778d2008-03-18 04:09:00 +000011616 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011617#define HAVE_MEMMOVE 1
Brett Cannonaa5778d2008-03-18 04:09:00 +000011618_ACEOF
11619
11620fi
11621done
11622
11623
Michael W. Hudson54241132001-12-07 15:38:26 +000011624# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000011625for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011626do :
11627 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11628ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011629if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011630 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011631#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011632_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000011633
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011634fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000011635done
11636
Michael W. Hudson54241132001-12-07 15:38:26 +000011637
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011638ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011639if test "x$ac_cv_func_dup2" = xyes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011640 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000011641
Martin v. Löwis1142de32002-03-29 16:28:31 +000011642else
Martin v. Löwiseba40652007-08-30 20:10:57 +000011643 case " $LIBOBJS " in
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011644 *" dup2.$ac_objext "* ) ;;
11645 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Martin v. Löwiseba40652007-08-30 20:10:57 +000011646 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011647esac
11648
Martin v. Löwis1142de32002-03-29 16:28:31 +000011649fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011650
11651ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011652if test "x$ac_cv_func_getcwd" = xyes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011653 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
11654
11655else
11656 case " $LIBOBJS " in
11657 *" getcwd.$ac_objext "* ) ;;
11658 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
11659 ;;
11660esac
11661
11662fi
11663
11664ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011665if test "x$ac_cv_func_strdup" = xyes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011666 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
11667
11668else
11669 case " $LIBOBJS " in
11670 *" strdup.$ac_objext "* ) ;;
11671 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
11672 ;;
11673esac
11674
11675fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000011676
11677
11678for ac_func in getpgrp
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011679do :
11680 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011681if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011682 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011683#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011684_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011685 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011686/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011687#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011688int
11689main ()
11690{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011691getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011692 ;
11693 return 0;
11694}
11695_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011696if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011697
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011698$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011699
Guido van Rossum627b2d71993-12-24 10:39:16 +000011700fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011701rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011702
Guido van Rossum627b2d71993-12-24 10:39:16 +000011703fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011704done
Guido van Rossum627b2d71993-12-24 10:39:16 +000011705
Jack Jansen150753c2003-03-29 22:07:47 +000011706for ac_func in setpgrp
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011707do :
11708 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011709if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000011710 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011711#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000011712_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011713 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011714/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000011715#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000011716int
11717main ()
11718{
11719setpgrp(0,0);
11720 ;
11721 return 0;
11722}
11723_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011724if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011725
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011726$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011727
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011728fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011729rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000011730
11731fi
11732done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011733
Thomas Wouters3a584202000-08-05 23:28:51 +000011734for ac_func in gettimeofday
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011735do :
11736 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011737if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011738 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011739#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011740_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011741 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011742/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011743#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011744int
11745main ()
11746{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011747gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011748 ;
11749 return 0;
11750}
11751_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011752if ac_fn_c_try_compile "$LINENO"; then :
11753
Guido van Rossum627b2d71993-12-24 10:39:16 +000011754else
Skip Montanaro6dead952003-09-25 14:50:04 +000011755
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011756$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011757
Martin v. Löwis11437992002-04-12 09:54:03 +000011758
Guido van Rossum627b2d71993-12-24 10:39:16 +000011759fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011760rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011761
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011762fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011763done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011764
Michael W. Hudson54241132001-12-07 15:38:26 +000011765
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
11767$as_echo_n "checking for major... " >&6; }
11768cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011769/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011770
Neal Norwitz6eb37f02003-02-23 23:28:15 +000011771#if defined(MAJOR_IN_MKDEV)
11772#include <sys/mkdev.h>
11773#elif defined(MAJOR_IN_SYSMACROS)
11774#include <sys/sysmacros.h>
11775#else
11776#include <sys/types.h>
11777#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011778
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011779int
11780main ()
11781{
11782
11783 makedev(major(0),minor(0));
11784
11785 ;
11786 return 0;
11787}
11788_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011789if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011790
11791
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011792$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011793
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11795$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011796
11797else
Skip Montanaro6dead952003-09-25 14:50:04 +000011798
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11800$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011801
11802fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011803rm -f core conftest.err conftest.$ac_objext \
11804 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011805
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011806# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000011807# for [no]getaddrinfo in netdb.h.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
11809$as_echo_n "checking for getaddrinfo... " >&6; }
11810cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011811/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011812
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011813#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011814#include <sys/socket.h>
11815#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011816#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011817
Martin v. Löwis11437992002-04-12 09:54:03 +000011818int
11819main ()
11820{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011821getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000011822 ;
11823 return 0;
11824}
11825_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011826if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011827 have_getaddrinfo=yes
11828else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011829 have_getaddrinfo=no
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011830fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011831rm -f core conftest.err conftest.$ac_objext \
11832 conftest$ac_exeext conftest.$ac_ext
11833{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
11834$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011835if test $have_getaddrinfo = yes
11836then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011837 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
11838$as_echo_n "checking getaddrinfo bug... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011839 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011840 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011841else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011842 if test "$cross_compiling" = yes; then :
doko@python.orgd65e2ba2013-01-31 23:52:03 +010011843
11844if test "${enable_ipv6+set}" = set; then
11845 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
11846else
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011847 ac_cv_buggy_getaddrinfo=yes
doko@python.orgd65e2ba2013-01-31 23:52:03 +010011848fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011849else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011850 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011851/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011852
Stefan Krah0afe4e42012-11-22 23:56:51 +010011853#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011854#include <sys/types.h>
11855#include <netdb.h>
11856#include <string.h>
11857#include <sys/socket.h>
11858#include <netinet/in.h>
11859
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011860int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011861{
11862 int passive, gaierr, inet4 = 0, inet6 = 0;
11863 struct addrinfo hints, *ai, *aitop;
11864 char straddr[INET6_ADDRSTRLEN], strport[16];
11865
11866 for (passive = 0; passive <= 1; passive++) {
11867 memset(&hints, 0, sizeof(hints));
11868 hints.ai_family = AF_UNSPEC;
11869 hints.ai_flags = passive ? AI_PASSIVE : 0;
11870 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000011871 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011872 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
11873 (void)gai_strerror(gaierr);
11874 goto bad;
11875 }
11876 for (ai = aitop; ai; ai = ai->ai_next) {
11877 if (ai->ai_addr == NULL ||
11878 ai->ai_addrlen == 0 ||
11879 getnameinfo(ai->ai_addr, ai->ai_addrlen,
11880 straddr, sizeof(straddr), strport, sizeof(strport),
11881 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
11882 goto bad;
11883 }
11884 switch (ai->ai_family) {
11885 case AF_INET:
11886 if (strcmp(strport, "54321") != 0) {
11887 goto bad;
11888 }
11889 if (passive) {
11890 if (strcmp(straddr, "0.0.0.0") != 0) {
11891 goto bad;
11892 }
11893 } else {
11894 if (strcmp(straddr, "127.0.0.1") != 0) {
11895 goto bad;
11896 }
11897 }
11898 inet4++;
11899 break;
11900 case AF_INET6:
11901 if (strcmp(strport, "54321") != 0) {
11902 goto bad;
11903 }
11904 if (passive) {
11905 if (strcmp(straddr, "::") != 0) {
11906 goto bad;
11907 }
11908 } else {
11909 if (strcmp(straddr, "::1") != 0) {
11910 goto bad;
11911 }
11912 }
11913 inet6++;
11914 break;
11915 case AF_UNSPEC:
11916 goto bad;
11917 break;
11918 default:
11919 /* another family support? */
11920 break;
11921 }
11922 }
Benjamin Petersond34677c2016-09-06 15:54:24 -070011923 freeaddrinfo(aitop);
11924 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011925 }
11926
11927 if (!(inet4 == 0 || inet4 == 2))
11928 goto bad;
11929 if (!(inet6 == 0 || inet6 == 2))
11930 goto bad;
11931
11932 if (aitop)
11933 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011934 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011935
11936 bad:
11937 if (aitop)
11938 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011939 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011940}
11941
Martin v. Löwis11437992002-04-12 09:54:03 +000011942_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011943if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011944 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011945else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011946 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011947fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011948rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11949 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011950fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011951
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011952fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011953
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011954fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011955
Benjamin Peterson75fed812010-11-01 01:47:19 +000011956{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
11957$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
11958
Mark Dickinson0ef0b912009-12-31 21:11:48 +000011959if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011960then
11961 if test $ipv6 = yes
11962 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011963 echo 'Fatal: You must get working getaddrinfo() function.'
11964 echo ' or you can specify "--disable-ipv6"'.
11965 exit 1
11966 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011967else
Martin v. Löwis11437992002-04-12 09:54:03 +000011968
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011969$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011970
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011971fi
Benjamin Peterson75fed812010-11-01 01:47:19 +000011972
Jack Jansen9a66b6d2001-08-08 13:56:14 +000011973for ac_func in getnameinfo
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011974do :
11975 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011976if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011977 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011978#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011979_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011980
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011981fi
11982done
11983
Michael W. Hudson54241132001-12-07 15:38:26 +000011984
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011985# checks for structures
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
11987$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011988if ${ac_cv_header_time+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011989 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011990else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011991 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011992/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011993#include <sys/types.h>
11994#include <sys/time.h>
11995#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011996
Martin v. Löwis11437992002-04-12 09:54:03 +000011997int
11998main ()
11999{
12000if ((struct tm *) 0)
12001return 0;
12002 ;
12003 return 0;
12004}
12005_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012006if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012007 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012008else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012009 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012010fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012011rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012012fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012013{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
12014$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012015if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012016
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012017$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012018
12019fi
12020
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
12022$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012023if ${ac_cv_struct_tm+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012024 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012025else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012026 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012027/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012028#include <sys/types.h>
12029#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012030
Martin v. Löwis11437992002-04-12 09:54:03 +000012031int
12032main ()
12033{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012034struct tm tm;
12035 int *p = &tm.tm_sec;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012036 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000012037 ;
12038 return 0;
12039}
12040_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012041if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012042 ac_cv_struct_tm=time.h
12043else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012044 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012045fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012046rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012047fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012048{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
12049$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012050if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012051
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012052$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012053
12054fi
12055
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012056ac_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 +000012057#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012058
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012059"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012060if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012061
12062cat >>confdefs.h <<_ACEOF
12063#define HAVE_STRUCT_TM_TM_ZONE 1
12064_ACEOF
12065
12066
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012067fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012068
Martin v. Löwis11437992002-04-12 09:54:03 +000012069if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12070
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012071$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012072
12073else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012074 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
12075"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012076if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012077 ac_have_decl=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000012078else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012079 ac_have_decl=0
Martin v. Löwiseba40652007-08-30 20:10:57 +000012080fi
12081
Martin v. Löwiseba40652007-08-30 20:10:57 +000012082cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012083#define HAVE_DECL_TZNAME $ac_have_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +000012084_ACEOF
12085
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012086 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
12087$as_echo_n "checking for tzname... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012088if ${ac_cv_var_tzname+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012089 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000012090else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012091 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012092/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012093#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000012094#if !HAVE_DECL_TZNAME
12095extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000012096#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012097
Martin v. Löwis11437992002-04-12 09:54:03 +000012098int
12099main ()
12100{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012101return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012102 ;
12103 return 0;
12104}
12105_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012106if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012107 ac_cv_var_tzname=yes
12108else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012109 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012110fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012111rm -f core conftest.err conftest.$ac_objext \
12112 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000012113fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012114{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
12115$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012116 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012117
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012118$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012119
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012120 fi
12121fi
12122
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012123ac_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 +010012124if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012125
12126cat >>confdefs.h <<_ACEOF
12127#define HAVE_STRUCT_STAT_ST_RDEV 1
12128_ACEOF
12129
12130
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012131fi
12132
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012133ac_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 +010012134if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012135
Martin v. Löwis11437992002-04-12 09:54:03 +000012136cat >>confdefs.h <<_ACEOF
12137#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
12138_ACEOF
12139
12140
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012141fi
12142
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012143ac_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 +010012144if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000012145
12146cat >>confdefs.h <<_ACEOF
12147#define HAVE_STRUCT_STAT_ST_FLAGS 1
12148_ACEOF
12149
12150
12151fi
12152
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012153ac_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 +010012154if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012155
12156cat >>confdefs.h <<_ACEOF
12157#define HAVE_STRUCT_STAT_ST_GEN 1
12158_ACEOF
12159
12160
12161fi
12162
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012163ac_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 +010012164if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012165
12166cat >>confdefs.h <<_ACEOF
12167#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
12168_ACEOF
12169
12170
12171fi
12172
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012173ac_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 +010012174if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012175
Martin v. Löwis11437992002-04-12 09:54:03 +000012176cat >>confdefs.h <<_ACEOF
12177#define HAVE_STRUCT_STAT_ST_BLOCKS 1
12178_ACEOF
12179
12180
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012181fi
12182
Michael W. Hudson54241132001-12-07 15:38:26 +000012183
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
12185$as_echo_n "checking for time.h that defines altzone... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012186if ${ac_cv_header_time_altzone+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012187 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012188else
Matthias Klosec511b472010-05-08 11:01:39 +000012189
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012190 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012191/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012192#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012193int
12194main ()
12195{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012196return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000012197 ;
12198 return 0;
12199}
12200_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012201if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012202 ac_cv_header_time_altzone=yes
12203else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012204 ac_cv_header_time_altzone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012205fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012206rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosec511b472010-05-08 11:01:39 +000012207
Martin v. Löwiseba40652007-08-30 20:10:57 +000012208fi
12209
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012210{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
12211$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012212if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012213
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012214$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012215
12216fi
12217
Guido van Rossumda88dad1995-01-26 00:46:29 +000012218was_it_defined=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012219{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
12220$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
12221cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012222/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012223
12224#include <sys/types.h>
12225#include <sys/select.h>
12226#include <sys/time.h>
12227
Martin v. Löwis11437992002-04-12 09:54:03 +000012228int
12229main ()
12230{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012231;
Martin v. Löwis11437992002-04-12 09:54:03 +000012232 ;
12233 return 0;
12234}
12235_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012236if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012237
12238
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012239$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012240
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012241 was_it_defined=yes
12242
Martin v. Löwiseba40652007-08-30 20:10:57 +000012243fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012244rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012245{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
12246$as_echo "$was_it_defined" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012247
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
12249$as_echo_n "checking for addrinfo... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012250if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012251 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012252else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012253 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012254/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +000012255#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012256int
12257main ()
12258{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012259struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000012260 ;
12261 return 0;
12262}
12263_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012264if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012265 ac_cv_struct_addrinfo=yes
12266else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012267 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012268fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012269rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12270fi
12271
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012272{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
12273$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012274if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012275
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012276$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012277
12278fi
12279
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
12281$as_echo_n "checking for sockaddr_storage... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012282if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012283 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012284else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012285 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012286/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012287
12288# include <sys/types.h>
12289# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012290int
12291main ()
12292{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012293struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000012294 ;
12295 return 0;
12296}
12297_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012298if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012299 ac_cv_struct_sockaddr_storage=yes
12300else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012301 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012302fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012303rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12304fi
12305
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012306{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
12307$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012308if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012309
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012310$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012311
12312fi
12313
Guido van Rossum627b2d71993-12-24 10:39:16 +000012314# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000012315
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
12317$as_echo_n "checking whether char is unsigned... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012318if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012319 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000012320else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012321 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012322/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012323$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012324int
12325main ()
12326{
12327static int test_array [1 - 2 * !(((char) -1) < 0)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012328test_array [0] = 0;
12329return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012330
12331 ;
12332 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000012333}
Martin v. Löwis11437992002-04-12 09:54:03 +000012334_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012335if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012336 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012337else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012338 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012339fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012340rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012341fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012342{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
12343$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012344if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012345 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012346
12347fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000012348
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12350$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012351if ${ac_cv_c_const+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012352 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012353else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012354 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012355/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012356
Martin v. Löwis11437992002-04-12 09:54:03 +000012357int
12358main ()
12359{
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012360
Martin v. Löwis11437992002-04-12 09:54:03 +000012361#ifndef __cplusplus
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012362 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012363 typedef int charset[2];
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012364 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000012365 /* SunOS 4.1.1 cc rejects this. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000012366 char const *const *pcpcc;
12367 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000012368 /* NEC SVR4.0.2 mips cc rejects this. */
12369 struct point {int x, y;};
12370 static struct point const zero = {0,0};
12371 /* AIX XL C 1.02.0.0 rejects this.
12372 It does not let you subtract one const X* pointer from another in
12373 an arm of an if-expression whose if-part is not a constant
12374 expression */
12375 const char *g = "string";
Martin v. Löwiseba40652007-08-30 20:10:57 +000012376 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012377 /* HPUX 7.0 cc rejects these. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000012378 ++pcpcc;
12379 ppc = (char**) pcpcc;
12380 pcpcc = (char const *const *) ppc;
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012381 { /* SCO 3.2v4 cc rejects this sort of thing. */
12382 char tx;
12383 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000012384 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012385
Martin v. Löwis11437992002-04-12 09:54:03 +000012386 *t++ = 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012387 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012388 }
12389 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12390 int x[] = {25, 17};
12391 const int *foo = &x[0];
12392 ++foo;
12393 }
12394 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12395 typedef const int *iptr;
12396 iptr p = 0;
12397 ++p;
12398 }
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012399 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000012400 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012401 struct s { int j; const int *ap[3]; } bx;
12402 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000012403 }
12404 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12405 const int foo = 10;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012406 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012407 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012408 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000012409#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000012410
Martin v. Löwis11437992002-04-12 09:54:03 +000012411 ;
12412 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012413}
Martin v. Löwis11437992002-04-12 09:54:03 +000012414_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012415if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012416 ac_cv_c_const=yes
12417else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012418 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012419fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012420rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012421fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012422{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12423$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012424if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012425
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012426$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012427
12428fi
12429
Michael W. Hudson54241132001-12-07 15:38:26 +000012430
Guido van Rossumda88dad1995-01-26 00:46:29 +000012431works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
12433$as_echo_n "checking for working volatile... " >&6; }
12434cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012435/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012436
Martin v. Löwis11437992002-04-12 09:54:03 +000012437int
12438main ()
12439{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012440volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012441 ;
12442 return 0;
12443}
12444_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012445if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012446 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012447else
Skip Montanaro6dead952003-09-25 14:50:04 +000012448
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012449$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012450
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012451
Guido van Rossum627b2d71993-12-24 10:39:16 +000012452fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012453rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012454{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12455$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012456
Guido van Rossumda88dad1995-01-26 00:46:29 +000012457works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
12459$as_echo_n "checking for working signed char... " >&6; }
12460cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012461/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012462
Martin v. Löwis11437992002-04-12 09:54:03 +000012463int
12464main ()
12465{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012466signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000012467 ;
12468 return 0;
12469}
12470_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012471if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012472 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012473else
Skip Montanaro6dead952003-09-25 14:50:04 +000012474
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012475$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000012476
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012477
Guido van Rossum7f43da71994-08-01 12:15:30 +000012478fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012479rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012480{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12481$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012482
Guido van Rossumda88dad1995-01-26 00:46:29 +000012483have_prototypes=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012484{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
12485$as_echo_n "checking for prototypes... " >&6; }
12486cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012487/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012488int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012489int
12490main ()
12491{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012492return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000012493 ;
12494 return 0;
12495}
12496_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012497if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012498
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012499$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012500
Matthias Klosec511b472010-05-08 11:01:39 +000012501 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012502fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012503rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012504{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
12505$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012506
Guido van Rossumda88dad1995-01-26 00:46:29 +000012507works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
12509$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
12510cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012511/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012512
12513#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000012514int foo(int x, ...) {
12515 va_list va;
12516 va_start(va, x);
12517 va_arg(va, int);
12518 va_arg(va, char *);
12519 va_arg(va, double);
12520 return 0;
12521}
Guido van Rossum7f43da71994-08-01 12:15:30 +000012522
Martin v. Löwis11437992002-04-12 09:54:03 +000012523int
12524main ()
12525{
Guido van Rossum90eea071996-08-30 20:58:57 +000012526return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000012527 ;
12528 return 0;
12529}
12530_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012531if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012532
12533
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012534$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012535
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012536 works=yes
12537
Guido van Rossum627b2d71993-12-24 10:39:16 +000012538fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012539rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012540{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12541$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012542
Martin v. Löwisd6320502004-08-12 13:45:08 +000012543# check for socketpair
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
12545$as_echo_n "checking for socketpair... " >&6; }
12546cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012547/* end confdefs.h. */
12548
12549#include <sys/types.h>
12550#include <sys/socket.h>
12551
12552int
12553main ()
12554{
12555void *x=socketpair
12556 ;
12557 return 0;
12558}
12559_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012560if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000012561
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012562$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000012563
Matthias Klosec511b472010-05-08 11:01:39 +000012564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012565$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012566else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12568$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012569
12570fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012571rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012572
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012573# check if sockaddr has sa_len member
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
12575$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
12576cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012577/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012578#include <sys/types.h>
12579#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012580int
12581main ()
12582{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012583struct sockaddr x;
12584x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012585 ;
12586 return 0;
12587}
12588_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012589if ac_fn_c_try_compile "$LINENO"; then :
12590 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12591$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012592
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012593$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012594
12595else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12597$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000012598
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012599fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012600rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012601
Guido van Rossumda88dad1995-01-26 00:46:29 +000012602va_list_is_array=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
12604$as_echo_n "checking whether va_list is an array... " >&6; }
12605cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012606/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012607
12608#ifdef HAVE_STDARG_PROTOTYPES
12609#include <stdarg.h>
12610#else
12611#include <varargs.h>
12612#endif
12613
Martin v. Löwis11437992002-04-12 09:54:03 +000012614int
12615main ()
12616{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012617va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000012618 ;
12619 return 0;
12620}
12621_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012622if ac_fn_c_try_compile "$LINENO"; then :
12623
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012624else
Skip Montanaro6dead952003-09-25 14:50:04 +000012625
Martin v. Löwis11437992002-04-12 09:54:03 +000012626
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012627$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012628
Guido van Rossumda88dad1995-01-26 00:46:29 +000012629 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012630
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012631fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012632rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012633{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
12634$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012635
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012636# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000012637
12638
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012639ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012640if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012641
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012642 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000012643
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012644 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
12645$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012646 OLD_CFLAGS=$CFLAGS
12647 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012648 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012649/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012650
12651# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012652
Martin v. Löwis11437992002-04-12 09:54:03 +000012653int
12654main ()
12655{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012656
12657 char *name;
12658 struct hostent *he, *res;
12659 char buffer[2048];
12660 int buflen = 2048;
12661 int h_errnop;
12662
12663 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012664
12665 ;
12666 return 0;
12667}
12668_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012669if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012670
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012671 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012672
Martin v. Löwis11437992002-04-12 09:54:03 +000012673
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012674$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012675
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12677$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012678
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012679else
Skip Montanaro6dead952003-09-25 14:50:04 +000012680
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12682$as_echo "no" >&6; }
12683 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
12684$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
12685 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012686/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012687
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012688# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012689
Martin v. Löwis11437992002-04-12 09:54:03 +000012690int
12691main ()
12692{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012693
12694 char *name;
12695 struct hostent *he;
Matthias Klosec511b472010-05-08 11:01:39 +000012696 char buffer[2048];
12697 int buflen = 2048;
12698 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012699
Matthias Klosec511b472010-05-08 11:01:39 +000012700 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012701
12702 ;
12703 return 0;
12704}
12705_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012706if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012707
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012708 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012709
Martin v. Löwis11437992002-04-12 09:54:03 +000012710
Matthias Klosec511b472010-05-08 11:01:39 +000012711$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012712
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12714$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012715
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012716else
Skip Montanaro6dead952003-09-25 14:50:04 +000012717
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12719$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000012720 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
12721$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
12722 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12723/* end confdefs.h. */
12724
12725# include <netdb.h>
12726
12727int
12728main ()
12729{
12730
12731 char *name;
12732 struct hostent *he;
12733 struct hostent_data data;
12734
12735 (void) gethostbyname_r(name, he, &data);
12736
12737 ;
12738 return 0;
12739}
12740_ACEOF
12741if ac_fn_c_try_compile "$LINENO"; then :
12742
12743 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
12744
12745
12746$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
12747
12748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12749$as_echo "yes" >&6; }
12750
12751else
12752
12753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12754$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012755
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012756fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012757rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012758
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012759fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012760rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012761
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012762fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012763rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012764 CFLAGS=$OLD_CFLAGS
12765
12766else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012767
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012768 for ac_func in gethostbyname
12769do :
12770 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012771if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012772 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012773#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012774_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012775
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012776fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012777done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012778
Michael W. Hudson54241132001-12-07 15:38:26 +000012779
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012780fi
12781
Michael W. Hudson54241132001-12-07 15:38:26 +000012782
12783
12784
12785
12786
12787
Guido van Rossum627b2d71993-12-24 10:39:16 +000012788# checks for system services
12789# (none yet)
12790
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012791# Linux requires this for correct f.p. operations
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012792ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012793if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012794
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012795else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012796 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
12797$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012798if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012799 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012800else
Martin v. Löwis11437992002-04-12 09:54:03 +000012801 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012802LIBS="-lieee $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012803cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012804/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012805
Martin v. Löwiseba40652007-08-30 20:10:57 +000012806/* Override any GCC internal prototype to avoid an error.
12807 Use char because int might match the return type of a GCC
12808 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012809#ifdef __cplusplus
12810extern "C"
12811#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012812char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012813int
12814main ()
12815{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012816return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012817 ;
12818 return 0;
12819}
12820_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012821if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012822 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012823else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012824 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012825fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012826rm -f core conftest.err conftest.$ac_objext \
12827 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012828LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012829fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012830{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
12831$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012832if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012833 cat >>confdefs.h <<_ACEOF
12834#define HAVE_LIBIEEE 1
12835_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012836
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012837 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012838
Guido van Rossum627b2d71993-12-24 10:39:16 +000012839fi
12840
Michael W. Hudson54241132001-12-07 15:38:26 +000012841
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012842fi
12843
Michael W. Hudson54241132001-12-07 15:38:26 +000012844
Guido van Rossum7f253911997-05-09 02:42:48 +000012845# Check for --with-fpectl
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
12847$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012848
Martin v. Löwiseba40652007-08-30 20:10:57 +000012849# Check whether --with-fpectl was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012850if test "${with_fpectl+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000012851 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000012852if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000012853then
12854
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012855$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012856
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12858$as_echo "yes" >&6; }
12859else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12860$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012861fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000012862else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12864$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012865fi
12866
Guido van Rossum7f253911997-05-09 02:42:48 +000012867
Guido van Rossum7f43da71994-08-01 12:15:30 +000012868# check for --with-libm=...
12869
Guido van Rossum563e7081996-09-10 18:20:48 +000012870case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000012871Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012872BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000012873*) LIBM=-lm
12874esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
12876$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012877
Martin v. Löwiseba40652007-08-30 20:10:57 +000012878# Check whether --with-libm was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012879if test "${with_libm+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000012880 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000012881if test "$withval" = no
12882then LIBM=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012883 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
12884$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012885elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012886then LIBM=$withval
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
12888$as_echo "set LIBM=\"$withval\"" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012889else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012890fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012891else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012892 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
12893$as_echo "default LIBM=\"$LIBM\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012894fi
12895
Guido van Rossum7f43da71994-08-01 12:15:30 +000012896
12897# check for --with-libc=...
12898
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
12900$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012901
Martin v. Löwiseba40652007-08-30 20:10:57 +000012902# Check whether --with-libc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012903if test "${with_libc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000012904 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000012905if test "$withval" = no
12906then LIBC=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
12908$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012909elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012910then LIBC=$withval
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
12912$as_echo "set LIBC=\"$withval\"" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012913else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012914fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012915else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
12917$as_echo "default LIBC=\"$LIBC\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012918fi
12919
Guido van Rossum7f43da71994-08-01 12:15:30 +000012920
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012921# **************************************************
12922# * Check for various properties of floating point *
12923# **************************************************
Mark Dickinson265d7382008-04-21 22:32:24 +000012924
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
12926$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012927if ${ac_cv_little_endian_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012928 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012929else
12930
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012931if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012932 ac_cv_little_endian_double=no
12933else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012934 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012935/* end confdefs.h. */
12936
12937#include <string.h>
12938int main() {
12939 double x = 9006104071832581.0;
12940 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
12941 return 0;
12942 else
12943 return 1;
12944}
12945
12946_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012947if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012948 ac_cv_little_endian_double=yes
12949else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012950 ac_cv_little_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012951fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012952rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12953 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012954fi
12955
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012956fi
12957
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012958{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
12959$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012960if test "$ac_cv_little_endian_double" = yes
12961then
12962
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012963$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012964
12965fi
12966
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
12968$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012969if ${ac_cv_big_endian_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012970 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012971else
12972
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012973if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012974 ac_cv_big_endian_double=no
12975else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012976 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012977/* end confdefs.h. */
12978
12979#include <string.h>
12980int main() {
12981 double x = 9006104071832581.0;
12982 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
12983 return 0;
12984 else
12985 return 1;
12986}
12987
12988_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012989if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012990 ac_cv_big_endian_double=yes
12991else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012992 ac_cv_big_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012993fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012994rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12995 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012996fi
12997
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012998fi
12999
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013000{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
13001$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013002if test "$ac_cv_big_endian_double" = yes
13003then
13004
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013005$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013006
13007fi
13008
13009# Some ARM platforms use a mixed-endian representation for doubles.
13010# While Python doesn't currently have full support for these platforms
13011# (see e.g., issue 1762561), we can at least make sure that float <-> string
13012# conversions work.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
13014$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013015if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013016 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013017else
13018
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013019if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013020 ac_cv_mixed_endian_double=no
13021else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013022 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013023/* end confdefs.h. */
13024
13025#include <string.h>
13026int main() {
13027 double x = 9006104071832581.0;
13028 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
13029 return 0;
13030 else
13031 return 1;
13032}
13033
13034_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013035if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013036 ac_cv_mixed_endian_double=yes
13037else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013038 ac_cv_mixed_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013039fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013040rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13041 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013042fi
13043
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013044fi
13045
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013046{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
13047$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013048if test "$ac_cv_mixed_endian_double" = yes
13049then
13050
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013051$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013052
13053fi
13054
13055# The short float repr introduced in Python 3.1 requires the
13056# correctly-rounded string <-> double conversion functions from
13057# Python/dtoa.c, which in turn require that the FPU uses 53-bit
13058# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsona548dee2009-11-15 13:12:43 +000013059# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013060# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsona548dee2009-11-15 13:12:43 +000013061
13062# This inline assembler syntax may also work for suncc and icc,
13063# so we try it on all platforms.
13064
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
13066$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
13067cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013068/* end confdefs.h. */
13069
13070int
13071main ()
13072{
13073
Mark Dickinsona548dee2009-11-15 13:12:43 +000013074 unsigned short cw;
13075 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
13076 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013077
13078 ;
13079 return 0;
13080}
13081_ACEOF
Stefan Krah99e36b92015-07-03 15:30:54 +020013082if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013083 have_gcc_asm_for_x87=yes
13084else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013085 have_gcc_asm_for_x87=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013086fi
Stefan Krah99e36b92015-07-03 15:30:54 +020013087rm -f core conftest.err conftest.$ac_objext \
13088 conftest$ac_exeext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013089{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
13090$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsona548dee2009-11-15 13:12:43 +000013091if test "$have_gcc_asm_for_x87" = yes
13092then
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013093
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013094$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013095
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013096fi
Mark Dickinson7a3d8642008-04-22 00:54:27 +000013097
Mark Dickinson04b27232009-01-04 12:29:36 +000013098# Detect whether system arithmetic is subject to x87-style double
13099# rounding issues. The result of this test has little meaning on non
13100# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
13101# mode is round-to-nearest and double rounding issues are present, and
13102# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
13104$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinson99abd142009-10-24 13:44:16 +000013105# $BASECFLAGS may affect the result
13106ac_save_cc="$CC"
13107CC="$CC $BASECFLAGS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013108if test "$cross_compiling" = yes; then :
Mark Dickinson04b27232009-01-04 12:29:36 +000013109 ac_cv_x87_double_rounding=no
13110else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013111 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson04b27232009-01-04 12:29:36 +000013112/* end confdefs.h. */
13113
13114#include <stdlib.h>
13115#include <math.h>
13116int main() {
13117 volatile double x, y, z;
13118 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
13119 x = 0.99999999999999989; /* 1-2**-53 */
13120 y = 1./x;
13121 if (y != 1.)
13122 exit(0);
13123 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
13124 x = 1e16;
13125 y = 2.99999;
13126 z = x + y;
13127 if (z != 1e16+4.)
13128 exit(0);
13129 /* both tests show evidence of double rounding */
13130 exit(1);
13131}
13132
13133_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013134if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson04b27232009-01-04 12:29:36 +000013135 ac_cv_x87_double_rounding=no
13136else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013137 ac_cv_x87_double_rounding=yes
Mark Dickinson04b27232009-01-04 12:29:36 +000013138fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013139rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13140 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson04b27232009-01-04 12:29:36 +000013141fi
13142
Mark Dickinson99abd142009-10-24 13:44:16 +000013143CC="$ac_save_cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013144{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
13145$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson04b27232009-01-04 12:29:36 +000013146if test "$ac_cv_x87_double_rounding" = yes
13147then
13148
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013149$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson04b27232009-01-04 12:29:36 +000013150
13151fi
13152
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013153# ************************************
13154# * Check for mathematical functions *
13155# ************************************
13156
13157LIBS_SAVE=$LIBS
13158LIBS="$LIBS $LIBM"
13159
Mark Dickinson265d7382008-04-21 22:32:24 +000013160# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
13161# -0. on some architectures.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
13163$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013164if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013165 $as_echo_n "(cached) " >&6
Mark Dickinson265d7382008-04-21 22:32:24 +000013166else
13167
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013168if test "$cross_compiling" = yes; then :
Mark Dickinson265d7382008-04-21 22:32:24 +000013169 ac_cv_tanh_preserves_zero_sign=no
13170else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013171 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson265d7382008-04-21 22:32:24 +000013172/* end confdefs.h. */
13173
13174#include <math.h>
Mark Dickinson7a3d8642008-04-22 00:54:27 +000013175#include <stdlib.h>
Mark Dickinson265d7382008-04-21 22:32:24 +000013176int main() {
13177 /* return 0 if either negative zeros don't exist
13178 on this platform or if negative zeros exist
13179 and tanh(-0.) == -0. */
13180 if (atan2(0., -1.) == atan2(-0., -1.) ||
13181 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
13182 else exit(1);
13183}
13184
13185_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013186if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson265d7382008-04-21 22:32:24 +000013187 ac_cv_tanh_preserves_zero_sign=yes
13188else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013189 ac_cv_tanh_preserves_zero_sign=no
Mark Dickinson265d7382008-04-21 22:32:24 +000013190fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013191rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13192 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson265d7382008-04-21 22:32:24 +000013193fi
13194
Mark Dickinson265d7382008-04-21 22:32:24 +000013195fi
13196
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013197{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
13198$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Mark Dickinson265d7382008-04-21 22:32:24 +000013199if test "$ac_cv_tanh_preserves_zero_sign" = yes
13200then
13201
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013202$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Mark Dickinson265d7382008-04-21 22:32:24 +000013203
13204fi
13205
Mark Dickinson65898e02009-09-05 10:27:00 +000013206for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013207do :
13208 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13209ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013210if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinson65898e02009-09-05 10:27:00 +000013211 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013212#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Mark Dickinson65898e02009-09-05 10:27:00 +000013213_ACEOF
13214
13215fi
13216done
13217
Mark Dickinson65898e02009-09-05 10:27:00 +000013218for ac_func in hypot lgamma log1p round tgamma
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013219do :
13220 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13221ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013222if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Christian Heimes0a8143f2007-12-18 23:22:54 +000013223 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013224#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes0a8143f2007-12-18 23:22:54 +000013225_ACEOF
13226
13227fi
13228done
13229
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013230ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
13231"
Matthias Klose3cef2a92012-03-14 23:39:33 +010013232if test "x$ac_cv_have_decl_isinf" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013233 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013234else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013235 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013236fi
13237
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013238cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013239#define HAVE_DECL_ISINF $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013240_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013241ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
13242"
Matthias Klose3cef2a92012-03-14 23:39:33 +010013243if test "x$ac_cv_have_decl_isnan" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013244 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013245else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013246 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013247fi
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013248
13249cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013250#define HAVE_DECL_ISNAN $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013251_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013252ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
13253"
Matthias Klose3cef2a92012-03-14 23:39:33 +010013254if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013255 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013256else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013257 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013258fi
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013259
13260cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013261#define HAVE_DECL_ISFINITE $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013262_ACEOF
13263
13264
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000013265LIBS=$LIBS_SAVE
13266
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013267# For multiprocessing module, check that sem_open
13268# actually works. For FreeBSD versions <= 7.2,
13269# the kernel module that provides POSIX semaphores
13270# isn't loaded by default, so an attempt to call
13271# sem_open results in a 'Signal 12' error.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
13273$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013274if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013275 $as_echo_n "(cached) " >&6
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013276else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013277 if test "$cross_compiling" = yes; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013278 ac_cv_posix_semaphores_enabled=yes
13279else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013280 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013281/* end confdefs.h. */
13282
13283#include <unistd.h>
13284#include <fcntl.h>
13285#include <stdio.h>
13286#include <semaphore.h>
13287#include <sys/stat.h>
13288
13289int main(void) {
13290 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
13291 if (a == SEM_FAILED) {
13292 perror("sem_open");
13293 return 1;
13294 }
13295 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000013296 sem_unlink("/autoconf");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013297 return 0;
13298}
13299
13300_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013301if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013302 ac_cv_posix_semaphores_enabled=yes
13303else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013304 ac_cv_posix_semaphores_enabled=no
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013305fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013306rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13307 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013308fi
13309
13310
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013311fi
13312
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013313{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
13314$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013315if test $ac_cv_posix_semaphores_enabled = no
13316then
13317
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013318$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013319
13320fi
13321
13322# Multiprocessing check for broken sem_getvalue
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
13324$as_echo_n "checking for broken sem_getvalue... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013325if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013326 $as_echo_n "(cached) " >&6
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013327else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013328 if test "$cross_compiling" = yes; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013329 ac_cv_broken_sem_getvalue=yes
13330else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013331 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013332/* end confdefs.h. */
13333
13334#include <unistd.h>
13335#include <fcntl.h>
13336#include <stdio.h>
13337#include <semaphore.h>
13338#include <sys/stat.h>
13339
13340int main(void){
Mark Dickinson59dc89e2009-12-13 21:06:06 +000013341 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013342 int count;
13343 int res;
13344 if(a==SEM_FAILED){
13345 perror("sem_open");
13346 return 1;
13347
13348 }
13349 res = sem_getvalue(a, &count);
13350 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000013351 sem_unlink("/autocftw");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013352 return res==-1 ? 1 : 0;
13353}
13354
13355_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013356if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013357 ac_cv_broken_sem_getvalue=no
13358else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013359 ac_cv_broken_sem_getvalue=yes
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013360fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013361rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13362 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013363fi
13364
13365
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013366fi
13367
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013368{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
13369$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013370if test $ac_cv_broken_sem_getvalue = yes
13371then
13372
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013373$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013374
13375fi
13376
Mark Dickinsonefc82f72009-03-20 15:51:55 +000013377# determine what size digit to use for Python's longs
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
13379$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000013380# Check whether --enable-big-digits was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013381if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonefc82f72009-03-20 15:51:55 +000013382 enableval=$enable_big_digits; case $enable_big_digits in
13383yes)
13384 enable_big_digits=30 ;;
13385no)
13386 enable_big_digits=15 ;;
1338715|30)
13388 ;;
13389*)
Matthias Klose3cef2a92012-03-14 23:39:33 +010013390 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 +000013391esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013392{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
13393$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000013394
13395cat >>confdefs.h <<_ACEOF
13396#define PYLONG_BITS_IN_DIGIT $enable_big_digits
13397_ACEOF
13398
13399
13400else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13402$as_echo "no value specified" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000013403fi
13404
13405
Guido van Rossumef2255b2000-03-10 22:30:29 +000013406# check for wchar.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013407ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +010013408if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013409
13410
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013411$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013412
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013413 wchar_h="yes"
13414
Guido van Rossumef2255b2000-03-10 22:30:29 +000013415else
Martin v. Löwis11437992002-04-12 09:54:03 +000013416 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000013417
13418fi
13419
Michael W. Hudson54241132001-12-07 15:38:26 +000013420
Martin v. Löwis11437992002-04-12 09:54:03 +000013421
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013422# determine wchar_t size
13423if test "$wchar_h" = yes
13424then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013425 # The cast to long int works around a bug in the HP C Compiler
Martin v. Löwiseba40652007-08-30 20:10:57 +000013426# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13427# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13428# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
13430$as_echo_n "checking size of wchar_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013431if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013432 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013433else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013434 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
13435"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013436
Martin v. Löwis11437992002-04-12 09:54:03 +000013437else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013438 if test "$ac_cv_type_wchar_t" = yes; then
13439 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13440$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013441as_fn_error 77 "cannot compute sizeof (wchar_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +010013442See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013443 else
13444 ac_cv_sizeof_wchar_t=0
13445 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013446fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013447
Martin v. Löwis11437992002-04-12 09:54:03 +000013448fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013449{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
13450$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013451
13452
13453
Martin v. Löwis11437992002-04-12 09:54:03 +000013454cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013455#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013456_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013457
Michael W. Hudson54241132001-12-07 15:38:26 +000013458
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013459fi
13460
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
13462$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013463have_ucs4_tcl=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013464cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013465/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013466
13467#include <tcl.h>
13468#if TCL_UTF_MAX != 6
13469# error "NOT UCS4_TCL"
13470#endif
13471int
13472main ()
13473{
13474
13475 ;
13476 return 0;
13477}
13478_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013479if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013480
13481
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013482$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013483
13484 have_ucs4_tcl=yes
13485
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013486fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013487rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013488{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
13489$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013490
Skip Montanaro6dead952003-09-25 14:50:04 +000013491# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013492if test "$wchar_h" = yes
13493then
13494 # check whether wchar_t is signed or not
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013495 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
13496$as_echo_n "checking whether wchar_t is signed... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013497 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013498 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013499else
13500
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013501 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013502 ac_cv_wchar_t_signed=yes
13503else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013504 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013505/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013506
13507 #include <wchar.h>
13508 int main()
13509 {
Martin v. Löwis44fe0e42006-04-11 07:15:30 +000013510 /* Success: exit code 0 */
13511 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013512 }
13513
13514_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013515if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013516 ac_cv_wchar_t_signed=yes
13517else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013518 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +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
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013522fi
13523
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013524fi
13525
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
13527$as_echo "$ac_cv_wchar_t_signed" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013528fi
13529
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what type to use for unicode" >&5
13531$as_echo_n "checking what type to use for unicode... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013532# Check whether --enable-unicode was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013533if test "${enable_unicode+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000013534 enableval=$enable_unicode;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013535else
13536 enable_unicode=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +000013537fi
13538
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013539
13540if test $enable_unicode = yes
13541then
Martin v. Löwisfd917792001-06-27 20:22:04 +000013542 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013543 case "$have_ucs4_tcl" in
13544 yes) enable_unicode="ucs4"
13545 ;;
13546 *) enable_unicode="ucs2"
13547 ;;
13548 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013549fi
13550
Martin v. Löwis0036cba2002-04-12 09:58:45 +000013551
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013552case "$enable_unicode" in
13553ucs2) unicode_size="2"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013554 $as_echo "#define Py_UNICODE_SIZE 2" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013555
13556 ;;
13557ucs4) unicode_size="4"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013558 $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013559
13560 ;;
Martin v. Löwised11a5d2012-05-20 10:42:17 +020013561no) ;; # To allow --disable-unicode
Matthias Klose3cef2a92012-03-14 23:39:33 +010013562*) 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 +000013563esac
13564
Michael W. Hudson54241132001-12-07 15:38:26 +000013565
Martin v. Löwis11437992002-04-12 09:54:03 +000013566
13567
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013568if test "$enable_unicode" = "no"
13569then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000013570 UNICODE_OBJS=""
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not used" >&5
13572$as_echo "not used" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013573else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000013574 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000013575
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013576$as_echo "#define Py_USING_UNICODE 1" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013577
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013578
13579 # wchar_t is only usable if it maps to an unsigned type
13580 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000013581 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013582 then
13583 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013584
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013585$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013586
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013587 $as_echo "#define PY_UNICODE_TYPE wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013588
13589 elif test "$ac_cv_sizeof_short" = "$unicode_size"
13590 then
13591 PY_UNICODE_TYPE="unsigned short"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013592 $as_echo "#define PY_UNICODE_TYPE unsigned short" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013593
13594 elif test "$ac_cv_sizeof_long" = "$unicode_size"
13595 then
13596 PY_UNICODE_TYPE="unsigned long"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013597 $as_echo "#define PY_UNICODE_TYPE unsigned long" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013598
13599 else
13600 PY_UNICODE_TYPE="no type found"
13601 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PY_UNICODE_TYPE" >&5
13603$as_echo "$PY_UNICODE_TYPE" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013604fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000013605
13606# check for endianness
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013607 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13608$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013609if ${ac_cv_c_bigendian+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013610 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000013611else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013612 ac_cv_c_bigendian=unknown
13613 # See if we're dealing with a universal compiler.
13614 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13615/* end confdefs.h. */
13616#ifndef __APPLE_CC__
13617 not a universal capable compiler
13618 #endif
13619 typedef int dummy;
13620
Skip Montanaro6dead952003-09-25 14:50:04 +000013621_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013622if ac_fn_c_try_compile "$LINENO"; then :
13623
13624 # Check for potential -arch flags. It is not universal unless
13625 # there are at least two -arch flags with different values.
13626 ac_arch=
13627 ac_prev=
13628 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13629 if test -n "$ac_prev"; then
13630 case $ac_word in
13631 i?86 | x86_64 | ppc | ppc64)
13632 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13633 ac_arch=$ac_word
13634 else
13635 ac_cv_c_bigendian=universal
13636 break
13637 fi
13638 ;;
13639 esac
13640 ac_prev=
13641 elif test "x$ac_word" = "x-arch"; then
13642 ac_prev=arch
13643 fi
13644 done
13645fi
13646rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13647 if test $ac_cv_c_bigendian = unknown; then
13648 # See if sys/param.h defines the BYTE_ORDER macro.
13649 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013650/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013651#include <sys/types.h>
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013652 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013653
Martin v. Löwis11437992002-04-12 09:54:03 +000013654int
13655main ()
13656{
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013657#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13658 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13659 && LITTLE_ENDIAN)
13660 bogus endian macros
13661 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013662
13663 ;
13664 return 0;
13665}
13666_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013667if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013668 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013669 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013670/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013671#include <sys/types.h>
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013672 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013673
Martin v. Löwis11437992002-04-12 09:54:03 +000013674int
13675main ()
13676{
Guido van Rossumef2255b2000-03-10 22:30:29 +000013677#if BYTE_ORDER != BIG_ENDIAN
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013678 not big endian
13679 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013680
13681 ;
13682 return 0;
13683}
13684_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013685if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013686 ac_cv_c_bigendian=yes
13687else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013688 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000013689fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013690rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013691fi
13692rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13693 fi
13694 if test $ac_cv_c_bigendian = unknown; then
13695 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13696 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013697/* end confdefs.h. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013698#include <limits.h>
13699
Martin v. Löwis11437992002-04-12 09:54:03 +000013700int
13701main ()
13702{
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013703#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13704 bogus endian macros
13705 #endif
13706
Martin v. Löwis11437992002-04-12 09:54:03 +000013707 ;
13708 return 0;
13709}
13710_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013711if ac_fn_c_try_compile "$LINENO"; then :
13712 # It does; now see whether it defined to _BIG_ENDIAN or not.
13713 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13714/* end confdefs.h. */
13715#include <limits.h>
13716
13717int
13718main ()
13719{
13720#ifndef _BIG_ENDIAN
13721 not big endian
13722 #endif
13723
13724 ;
13725 return 0;
13726}
13727_ACEOF
13728if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013729 ac_cv_c_bigendian=yes
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000013730else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013731 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013732fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013733rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13734fi
13735rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13736 fi
13737 if test $ac_cv_c_bigendian = unknown; then
13738 # Compile a test program.
13739 if test "$cross_compiling" = yes; then :
13740 # Try to guess by grepping values from an object file.
13741 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13742/* end confdefs.h. */
13743short int ascii_mm[] =
13744 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13745 short int ascii_ii[] =
13746 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13747 int use_ascii (int i) {
13748 return ascii_mm[i] + ascii_ii[i];
13749 }
13750 short int ebcdic_ii[] =
13751 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13752 short int ebcdic_mm[] =
13753 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13754 int use_ebcdic (int i) {
13755 return ebcdic_mm[i] + ebcdic_ii[i];
13756 }
13757 extern int foo;
Martin v. Löwiseba40652007-08-30 20:10:57 +000013758
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013759int
13760main ()
13761{
13762return use_ascii (foo) == use_ebcdic (foo);
13763 ;
13764 return 0;
13765}
13766_ACEOF
13767if ac_fn_c_try_compile "$LINENO"; then :
13768 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
13769 ac_cv_c_bigendian=yes
13770 fi
13771 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
13772 if test "$ac_cv_c_bigendian" = unknown; then
13773 ac_cv_c_bigendian=no
13774 else
13775 # finding both strings is unlikely to happen, but who knows?
13776 ac_cv_c_bigendian=unknown
13777 fi
13778 fi
13779fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013780rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013781else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013782 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013783/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000013784$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013785int
13786main ()
13787{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013788
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013789 /* Are we little or big endian? From Harbison&Steele. */
13790 union
13791 {
13792 long int l;
13793 char c[sizeof (long int)];
13794 } u;
13795 u.l = 1;
13796 return u.c[sizeof (long int) - 1] == 1;
Martin v. Löwiseba40652007-08-30 20:10:57 +000013797
13798 ;
13799 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000013800}
Martin v. Löwis11437992002-04-12 09:54:03 +000013801_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013802if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013803 ac_cv_c_bigendian=no
13804else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013805 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000013806fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013807rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13808 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000013809fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013810
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013811 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013812fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013813{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
13814$as_echo "$ac_cv_c_bigendian" >&6; }
13815 case $ac_cv_c_bigendian in #(
13816 yes)
13817 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
13818;; #(
13819 no)
13820 ;; #(
13821 universal)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013822
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013823$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000013824
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013825 ;; #(
13826 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013827 as_fn_error $? "unknown endianness
Matthias Klose3cef2a92012-03-14 23:39:33 +010013828 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013829 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000013830
Michael W. Hudson54241132001-12-07 15:38:26 +000013831
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013832# Check whether right shifting a negative integer extends the sign bit
13833# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
13835$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013836if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013837 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000013838else
Martin v. Löwis11437992002-04-12 09:54:03 +000013839
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013840if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013841 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013842else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013843 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013844/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013845
13846int main()
13847{
Vladimir Marangozova6180282000-07-12 05:05:06 +000013848 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013849}
13850
Martin v. Löwis11437992002-04-12 09:54:03 +000013851_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013852if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000013853 ac_cv_rshift_extends_sign=yes
13854else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013855 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000013856fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013857rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13858 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000013859fi
13860
Martin v. Löwiseba40652007-08-30 20:10:57 +000013861fi
13862
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013863{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
13864$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000013865if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013866then
Martin v. Löwis11437992002-04-12 09:54:03 +000013867
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013868$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013869
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013870fi
13871
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013872# check for getc_unlocked and related locking functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
13874$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013875if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013876 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013877else
Martin v. Löwis11437992002-04-12 09:54:03 +000013878
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013879cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013880/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013881#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013882int
13883main ()
13884{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013885
13886 FILE *f = fopen("/dev/null", "r");
13887 flockfile(f);
13888 getc_unlocked(f);
13889 funlockfile(f);
13890
Martin v. Löwis11437992002-04-12 09:54:03 +000013891 ;
13892 return 0;
13893}
13894_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013895if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013896 ac_cv_have_getc_unlocked=yes
13897else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013898 ac_cv_have_getc_unlocked=no
13899fi
13900rm -f core conftest.err conftest.$ac_objext \
13901 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013902fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013903
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013904{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
13905$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013906if test "$ac_cv_have_getc_unlocked" = yes
13907then
Martin v. Löwis11437992002-04-12 09:54:03 +000013908
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013909$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013910
13911fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013912
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013913# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000013914# save the value of LIBS so we don't actually link Python with readline
13915LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013916
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013917# On some systems we need to link readline to a termcap compatible
13918# library. NOTE: Keep the precedence of listed libraries synchronised
13919# with setup.py.
13920py_cv_lib_readline=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
13922$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013923for py_libtermcap in "" ncursesw ncurses curses termcap; do
13924 if test -z "$py_libtermcap"; then
13925 READLINE_LIBS="-lreadline"
13926 else
13927 READLINE_LIBS="-lreadline -l$py_libtermcap"
13928 fi
13929 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013930 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013931/* end confdefs.h. */
13932
Martin v. Löwiseba40652007-08-30 20:10:57 +000013933/* Override any GCC internal prototype to avoid an error.
13934 Use char because int might match the return type of a GCC
13935 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013936#ifdef __cplusplus
13937extern "C"
13938#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013939char readline ();
13940int
13941main ()
13942{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013943return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013944 ;
13945 return 0;
13946}
13947_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013948if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013949 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013950fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013951rm -f core conftest.err conftest.$ac_objext \
13952 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013953 if test $py_cv_lib_readline = yes; then
13954 break
13955 fi
13956done
13957# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
13958#AC_SUBST([READLINE_LIBS])
Gregory P. Smithe080cdf2008-09-07 19:19:04 +000013959if test $py_cv_lib_readline = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
13961$as_echo "none" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013962else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
13964$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013965
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013966$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013967
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013968fi
13969
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013970# check for readline 2.1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
13972$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013973if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013974 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013975else
13976 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013977LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013978cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013979/* end confdefs.h. */
13980
Martin v. Löwiseba40652007-08-30 20:10:57 +000013981/* Override any GCC internal prototype to avoid an error.
13982 Use char because int might match the return type of a GCC
13983 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013984#ifdef __cplusplus
13985extern "C"
13986#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013987char rl_callback_handler_install ();
13988int
13989main ()
13990{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013991return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013992 ;
13993 return 0;
13994}
13995_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013996if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013997 ac_cv_lib_readline_rl_callback_handler_install=yes
13998else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013999 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014000fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014001rm -f core conftest.err conftest.$ac_objext \
14002 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014003LIBS=$ac_check_lib_save_LIBS
14004fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014005{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
14006$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014007if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014008
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014009$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014010
14011fi
14012
14013
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014014# check for readline 2.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014015cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014016/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014017#include <readline/readline.h>
14018_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014019if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014020 have_readline=yes
14021else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014022 have_readline=no
Matthias Klosec511b472010-05-08 11:01:39 +000014023
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014024fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014025rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014026if test $have_readline = yes
14027then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014028 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014029/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014030#include <readline/readline.h>
14031
14032_ACEOF
14033if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014034 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014035
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014036$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014037
14038fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000014039rm -f conftest*
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000014040
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014041 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000014042/* end confdefs.h. */
14043#include <readline/readline.h>
14044
14045_ACEOF
14046if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014047 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000014048
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014049$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000014050
14051fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000014052rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014053
14054fi
14055
Martin v. Löwis0daad592001-09-30 21:09:59 +000014056# check for readline 4.0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
14058$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014059if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014060 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000014061else
Martin v. Löwis11437992002-04-12 09:54:03 +000014062 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000014063LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014064cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014065/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014066
Martin v. Löwiseba40652007-08-30 20:10:57 +000014067/* Override any GCC internal prototype to avoid an error.
14068 Use char because int might match the return type of a GCC
14069 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014070#ifdef __cplusplus
14071extern "C"
14072#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014073char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014074int
14075main ()
14076{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014077return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014078 ;
14079 return 0;
14080}
14081_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014082if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014083 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000014084else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014085 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000014086fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014087rm -f core conftest.err conftest.$ac_objext \
14088 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014089LIBS=$ac_check_lib_save_LIBS
14090fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014091{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
14092$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014093if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014094
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014095$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000014096
Martin v. Löwis0daad592001-09-30 21:09:59 +000014097fi
14098
Michael W. Hudson54241132001-12-07 15:38:26 +000014099
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000014100# also in 4.0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
14102$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014103if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014104 $as_echo_n "(cached) " >&6
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000014105else
14106 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000014107LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014108cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000014109/* end confdefs.h. */
14110
14111/* Override any GCC internal prototype to avoid an error.
14112 Use char because int might match the return type of a GCC
14113 builtin and then its argument prototype would still apply. */
14114#ifdef __cplusplus
14115extern "C"
14116#endif
14117char rl_completion_display_matches_hook ();
14118int
14119main ()
14120{
14121return rl_completion_display_matches_hook ();
14122 ;
14123 return 0;
14124}
14125_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014126if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000014127 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
14128else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014129 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000014130fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014131rm -f core conftest.err conftest.$ac_objext \
14132 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000014133LIBS=$ac_check_lib_save_LIBS
14134fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014135{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
14136$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014137if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000014138
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014139$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000014140
14141fi
14142
14143
Martin Pantera70c3232016-04-03 02:54:58 +000014144# also in 4.0, but not in editline
14145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
14146$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
14147if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
14148 $as_echo_n "(cached) " >&6
14149else
14150 ac_check_lib_save_LIBS=$LIBS
14151LIBS="-lreadline $READLINE_LIBS $LIBS"
14152cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14153/* end confdefs.h. */
14154
14155/* Override any GCC internal prototype to avoid an error.
14156 Use char because int might match the return type of a GCC
14157 builtin and then its argument prototype would still apply. */
14158#ifdef __cplusplus
14159extern "C"
14160#endif
14161char rl_resize_terminal ();
14162int
14163main ()
14164{
14165return rl_resize_terminal ();
14166 ;
14167 return 0;
14168}
14169_ACEOF
14170if ac_fn_c_try_link "$LINENO"; then :
14171 ac_cv_lib_readline_rl_resize_terminal=yes
14172else
14173 ac_cv_lib_readline_rl_resize_terminal=no
14174fi
14175rm -f core conftest.err conftest.$ac_objext \
14176 conftest$ac_exeext conftest.$ac_ext
14177LIBS=$ac_check_lib_save_LIBS
14178fi
14179{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
14180$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
14181if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
14182
14183$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
14184
14185fi
14186
14187
Martin v. Löwis0daad592001-09-30 21:09:59 +000014188# check for readline 4.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
14190$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014191if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014192 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000014193else
Martin v. Löwis11437992002-04-12 09:54:03 +000014194 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000014195LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014196cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014197/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014198
Martin v. Löwiseba40652007-08-30 20:10:57 +000014199/* Override any GCC internal prototype to avoid an error.
14200 Use char because int might match the return type of a GCC
14201 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014202#ifdef __cplusplus
14203extern "C"
14204#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014205char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014206int
14207main ()
14208{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014209return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014210 ;
14211 return 0;
14212}
14213_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014214if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014215 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000014216else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014217 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000014218fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014219rm -f core conftest.err conftest.$ac_objext \
14220 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014221LIBS=$ac_check_lib_save_LIBS
14222fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014223{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
14224$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014225if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014226
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014227$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000014228
Guido van Rossum353ae582001-07-10 16:45:32 +000014229fi
14230
Jack Jansendd19cf82001-12-06 22:36:17 +000014231
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014232# also in readline 4.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014233cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014234/* end confdefs.h. */
14235#include <readline/readline.h>
14236_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014237if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014238 have_readline=yes
14239else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014240 have_readline=no
Matthias Klosec511b472010-05-08 11:01:39 +000014241
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014242fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014243rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014244if test $have_readline = yes
14245then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014246 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014247/* end confdefs.h. */
14248#include <readline/readline.h>
14249
14250_ACEOF
14251if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014252 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014253
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014254$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014255
14256fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000014257rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014258
14259fi
14260
Martin v. Löwis82bca632006-02-10 20:49:30 +000014261# End of readline checks: restore LIBS
14262LIBS=$LIBS_no_readline
14263
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
14265$as_echo_n "checking for broken nice()... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014266if ${ac_cv_broken_nice+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014267 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014268else
Martin v. Löwis11437992002-04-12 09:54:03 +000014269
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014270if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014271 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014272else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014273 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014274/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014275
14276int main()
14277{
14278 int val1 = nice(1);
14279 if (val1 != -1 && val1 == nice(2))
14280 exit(0);
14281 exit(1);
14282}
14283
Martin v. Löwis11437992002-04-12 09:54:03 +000014284_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014285if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014286 ac_cv_broken_nice=yes
14287else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014288 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014289fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014290rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14291 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014292fi
14293
Martin v. Löwiseba40652007-08-30 20:10:57 +000014294fi
14295
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014296{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
14297$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014298if test "$ac_cv_broken_nice" = yes
14299then
Martin v. Löwis11437992002-04-12 09:54:03 +000014300
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014301$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014302
14303fi
14304
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
14306$as_echo_n "checking for broken poll()... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014307if ${ac_cv_broken_poll+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014308 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014309else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014310 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014311 ac_cv_broken_poll=no
14312else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014313 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014314/* end confdefs.h. */
14315
14316#include <poll.h>
14317
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014318int main()
14319{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014320 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014321 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014322
14323 close (42);
14324
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014325 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014326 if (poll_test < 0)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014327 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014328 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014329 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014330 else
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014331 return 1;
14332}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014333
14334_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014335if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014336 ac_cv_broken_poll=yes
14337else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014338 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014339fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014340rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14341 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014342fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014343
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014344fi
14345
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014346{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
14347$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014348if test "$ac_cv_broken_poll" = yes
14349then
14350
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014351$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014352
14353fi
14354
Brett Cannon43802422005-02-10 20:48:03 +000014355# 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 +000014356# (which is not required by ISO C or UNIX spec) and/or if we support
14357# tzname[]
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014358ac_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 +000014359#include <$ac_cv_struct_tm>
14360
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014361"
Matthias Klose3cef2a92012-03-14 23:39:33 +010014362if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000014363
14364cat >>confdefs.h <<_ACEOF
14365#define HAVE_STRUCT_TM_TM_ZONE 1
14366_ACEOF
14367
14368
14369fi
14370
14371if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
14372
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014373$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014374
14375else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014376 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
14377"
Matthias Klose3cef2a92012-03-14 23:39:33 +010014378if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014379 ac_have_decl=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000014380else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014381 ac_have_decl=0
Martin v. Löwiseba40652007-08-30 20:10:57 +000014382fi
14383
Martin v. Löwiseba40652007-08-30 20:10:57 +000014384cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014385#define HAVE_DECL_TZNAME $ac_have_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +000014386_ACEOF
14387
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014388 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
14389$as_echo_n "checking for tzname... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014390if ${ac_cv_var_tzname+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014391 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000014392else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014393 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014394/* end confdefs.h. */
14395#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000014396#if !HAVE_DECL_TZNAME
14397extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000014398#endif
14399
14400int
14401main ()
14402{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014403return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000014404 ;
14405 return 0;
14406}
14407_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014408if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000014409 ac_cv_var_tzname=yes
14410else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014411 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000014412fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014413rm -f core conftest.err conftest.$ac_objext \
14414 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014415fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014416{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
14417$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000014418 if test $ac_cv_var_tzname = yes; then
14419
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014420$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014421
14422 fi
14423fi
14424
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014425
Martin v. Löwis1d459062005-03-14 21:23:33 +000014426# check tzset(3) exists and works like we expect it to
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014427{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
14428$as_echo_n "checking for working tzset()... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014429if ${ac_cv_working_tzset+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014430 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014431else
14432
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014433if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014434 ac_cv_working_tzset=no
14435else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014436 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014437/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014438
14439#include <stdlib.h>
14440#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000014441#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000014442
14443#if HAVE_TZNAME
14444extern char *tzname[];
14445#endif
14446
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014447int main()
14448{
Brett Cannon18367812003-09-19 00:59:16 +000014449 /* Note that we need to ensure that not only does tzset(3)
14450 do 'something' with localtime, but it works as documented
14451 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000014452 This includes making sure that tzname is set properly if
14453 tm->tm_zone does not exist since it is the alternative way
14454 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000014455
14456 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000014457 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000014458 */
14459
Martin v. Löwis1d459062005-03-14 21:23:33 +000014460 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000014461 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
14462
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014463 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014464 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014465 if (localtime(&groundhogday)->tm_hour != 0)
14466 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014467#if HAVE_TZNAME
14468 /* For UTC, tzname[1] is sometimes "", sometimes " " */
14469 if (strcmp(tzname[0], "UTC") ||
14470 (tzname[1][0] != 0 && tzname[1][0] != ' '))
14471 exit(1);
14472#endif
Brett Cannon18367812003-09-19 00:59:16 +000014473
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014474 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014475 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014476 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014477 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014478#if HAVE_TZNAME
14479 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
14480 exit(1);
14481#endif
Brett Cannon18367812003-09-19 00:59:16 +000014482
14483 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
14484 tzset();
14485 if (localtime(&groundhogday)->tm_hour != 11)
14486 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014487#if HAVE_TZNAME
14488 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
14489 exit(1);
14490#endif
14491
14492#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000014493 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
14494 exit(1);
14495 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
14496 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014497#endif
Brett Cannon18367812003-09-19 00:59:16 +000014498
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014499 exit(0);
14500}
14501
14502_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014503if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014504 ac_cv_working_tzset=yes
14505else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014506 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014507fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014508rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14509 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014510fi
14511
Martin v. Löwiseba40652007-08-30 20:10:57 +000014512fi
14513
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014514{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
14515$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014516if test "$ac_cv_working_tzset" = yes
14517then
14518
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014519$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014520
14521fi
14522
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014523# Look for subsecond timestamps in struct stat
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
14525$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014526if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014527 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014528else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014529 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014530/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014531#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014532int
14533main ()
14534{
14535
14536struct stat st;
14537st.st_mtim.tv_nsec = 1;
14538
14539 ;
14540 return 0;
14541}
14542_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014543if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000014544 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014545else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014546 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014547fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014548rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14549fi
14550
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014551{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
14552$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014553if test "$ac_cv_stat_tv_nsec" = yes
14554then
14555
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014556$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014557
14558fi
14559
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014560# Look for BSD style subsecond timestamps in struct stat
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
14562$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014563if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014564 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014565else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014566 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014567/* end confdefs.h. */
14568#include <sys/stat.h>
14569int
14570main ()
14571{
14572
14573struct stat st;
14574st.st_mtimespec.tv_nsec = 1;
14575
14576 ;
14577 return 0;
14578}
14579_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014580if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014581 ac_cv_stat_tv_nsec2=yes
14582else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014583 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014584fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014585rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14586fi
14587
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014588{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
14589$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014590if test "$ac_cv_stat_tv_nsec2" = yes
14591then
14592
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014593$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014594
14595fi
14596
doko@ubuntu.comf27ec3e2014-04-17 20:11:19 +020014597# first curses configure check
14598ac_save_cppflags="$CPPFLAGS"
14599CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
14600
14601for ac_header in curses.h ncurses.h
14602do :
14603 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14604ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
14605if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
14606 cat >>confdefs.h <<_ACEOF
14607#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14608_ACEOF
14609
14610fi
14611
14612done
14613
14614
14615# On Solaris, term.h requires curses.h
14616for ac_header in term.h
14617do :
14618 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
14619#ifdef HAVE_CURSES_H
14620#include <curses.h>
14621#endif
14622
14623"
14624if test "x$ac_cv_header_term_h" = xyes; then :
14625 cat >>confdefs.h <<_ACEOF
14626#define HAVE_TERM_H 1
14627_ACEOF
14628
14629fi
14630
14631done
14632
14633
Jack Jansen666b1e72001-10-31 12:11:48 +000014634# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
14636$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014637if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014638 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014639else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014640 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014641/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014642#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014643int
14644main ()
14645{
Jack Jansen666b1e72001-10-31 12:11:48 +000014646
14647 int rtn;
14648 rtn = mvwdelch(0,0,0);
14649
Martin v. Löwis11437992002-04-12 09:54:03 +000014650 ;
14651 return 0;
14652}
14653_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014654if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014655 ac_cv_mvwdelch_is_expression=yes
14656else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014657 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014658fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014659rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14660fi
14661
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014662{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
14663$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000014664
14665if test "$ac_cv_mvwdelch_is_expression" = yes
14666then
Martin v. Löwis11437992002-04-12 09:54:03 +000014667
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014668$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014669
14670fi
14671
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
14673$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014674if ${ac_cv_window_has_flags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014675 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014676else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014677 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014678/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014679#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014680int
14681main ()
14682{
Jack Jansen666b1e72001-10-31 12:11:48 +000014683
14684 WINDOW *w;
14685 w->_flags = 0;
14686
Martin v. Löwis11437992002-04-12 09:54:03 +000014687 ;
14688 return 0;
14689}
14690_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014691if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014692 ac_cv_window_has_flags=yes
14693else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014694 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014695fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014696rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14697fi
14698
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014699{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
14700$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000014701
Jack Jansen666b1e72001-10-31 12:11:48 +000014702
14703if test "$ac_cv_window_has_flags" = yes
14704then
Martin v. Löwis11437992002-04-12 09:54:03 +000014705
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014706$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014707
14708fi
14709
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
14711$as_echo_n "checking for is_term_resized... " >&6; }
14712cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000014713/* end confdefs.h. */
14714#include <curses.h>
14715int
14716main ()
14717{
14718void *x=is_term_resized
14719 ;
14720 return 0;
14721}
14722_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014723if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000014724
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014725$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000014726
Matthias Klosec511b472010-05-08 11:01:39 +000014727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014728$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014729else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014730 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14731$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014732
14733fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014734rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14735
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
14737$as_echo_n "checking for resize_term... " >&6; }
14738cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000014739/* end confdefs.h. */
14740#include <curses.h>
14741int
14742main ()
14743{
14744void *x=resize_term
14745 ;
14746 return 0;
14747}
14748_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014749if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000014750
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014751$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000014752
Matthias Klosec511b472010-05-08 11:01:39 +000014753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014754$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014755else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014756 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14757$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014758
14759fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014760rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14761
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
14763$as_echo_n "checking for resizeterm... " >&6; }
14764cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000014765/* end confdefs.h. */
14766#include <curses.h>
14767int
14768main ()
14769{
14770void *x=resizeterm
14771 ;
14772 return 0;
14773}
14774_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014775if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000014776
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014777$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000014778
Matthias Klosec511b472010-05-08 11:01:39 +000014779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014780$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014781else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14783$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014784
14785fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014786rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.comf27ec3e2014-04-17 20:11:19 +020014787# last curses configure check
14788CPPFLAGS=$ac_save_cppflags
Martin v. Löwiseba40652007-08-30 20:10:57 +000014789
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
14791$as_echo "$as_me: checking for device files" >&6;}
14792
14793if test "x$cross_compiling" = xyes; then
14794 if test "${ac_cv_file__dev_ptmx+set}" != set; then
14795 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14796$as_echo_n "checking for /dev/ptmx... " >&6; }
14797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14798$as_echo "not set" >&6; }
14799 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14800 fi
14801 if test "${ac_cv_file__dev_ptc+set}" != set; then
14802 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14803$as_echo_n "checking for /dev/ptc... " >&6; }
14804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14805$as_echo "not set" >&6; }
14806 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14807 fi
14808fi
14809
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14811$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014812if ${ac_cv_file__dev_ptmx+:} false; then :
14813 $as_echo_n "(cached) " >&6
14814else
14815 test "$cross_compiling" = yes &&
14816 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14817if test -r "/dev/ptmx"; then
14818 ac_cv_file__dev_ptmx=yes
14819else
14820 ac_cv_file__dev_ptmx=no
14821fi
14822fi
14823{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
14824$as_echo "$ac_cv_file__dev_ptmx" >&6; }
14825if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Martin v. Löwisfefbc202006-10-17 18:59:23 +000014826
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014827fi
14828
14829if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014830
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014831$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014832
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014833fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14835$as_echo_n "checking for /dev/ptc... " >&6; }
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014836if ${ac_cv_file__dev_ptc+:} false; then :
14837 $as_echo_n "(cached) " >&6
14838else
14839 test "$cross_compiling" = yes &&
14840 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14841if test -r "/dev/ptc"; then
14842 ac_cv_file__dev_ptc=yes
14843else
14844 ac_cv_file__dev_ptc=no
14845fi
14846fi
14847{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
14848$as_echo "$ac_cv_file__dev_ptc" >&6; }
14849if test "x$ac_cv_file__dev_ptc" = xyes; then :
Martin v. Löwisfefbc202006-10-17 18:59:23 +000014850
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014851fi
14852
14853if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000014854
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014855$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000014856
Neal Norwitz865400f2003-03-21 01:42:58 +000014857fi
14858
Mark Dickinson82864d12009-11-15 16:18:58 +000014859if test "$have_long_long" = yes
14860then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014861 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
14862$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014863 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014864 $as_echo_n "(cached) " >&6
Mark Dickinson82864d12009-11-15 16:18:58 +000014865else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014866 if test "$cross_compiling" = yes; then :
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014867 ac_cv_have_long_long_format="cross -- assuming no"
14868 if test x$GCC = xyes; then
14869 save_CFLAGS=$CFLAGS
14870 CFLAGS="$CFLAGS -Werror -Wformat"
14871 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14872/* end confdefs.h. */
14873
14874 #include <stdio.h>
14875 #include <stddef.h>
14876
14877int
14878main ()
14879{
14880
14881 char *buffer;
14882 sprintf(buffer, "%lld", (long long)123);
14883 sprintf(buffer, "%lld", (long long)-123);
14884 sprintf(buffer, "%llu", (unsigned long long)123);
14885
14886 ;
14887 return 0;
14888}
14889_ACEOF
14890if ac_fn_c_try_compile "$LINENO"; then :
14891 ac_cv_have_long_long_format=yes
14892
14893fi
14894rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14895 CFLAGS=$save_CFLAGS
14896 fi
Mark Dickinson82864d12009-11-15 16:18:58 +000014897else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014898 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson82864d12009-11-15 16:18:58 +000014899/* end confdefs.h. */
14900
14901 #include <stdio.h>
14902 #include <stddef.h>
14903 #include <string.h>
14904
14905 #ifdef HAVE_SYS_TYPES_H
14906 #include <sys/types.h>
14907 #endif
14908
14909 int main()
14910 {
14911 char buffer[256];
14912
14913 if (sprintf(buffer, "%lld", (long long)123) < 0)
14914 return 1;
14915 if (strcmp(buffer, "123"))
14916 return 1;
14917
14918 if (sprintf(buffer, "%lld", (long long)-123) < 0)
14919 return 1;
14920 if (strcmp(buffer, "-123"))
14921 return 1;
14922
14923 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
14924 return 1;
14925 if (strcmp(buffer, "123"))
14926 return 1;
14927
14928 return 0;
14929 }
14930
14931_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014932if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson82864d12009-11-15 16:18:58 +000014933 ac_cv_have_long_long_format=yes
14934else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014935 ac_cv_have_long_long_format=no
Mark Dickinson82864d12009-11-15 16:18:58 +000014936fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014937rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14938 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson82864d12009-11-15 16:18:58 +000014939fi
14940
14941
Mark Dickinson82864d12009-11-15 16:18:58 +000014942fi
14943
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
14945$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson82864d12009-11-15 16:18:58 +000014946fi
14947
Mark Dickinson5ce84742009-12-31 20:48:04 +000014948if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson82864d12009-11-15 16:18:58 +000014949then
14950
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014951$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson82864d12009-11-15 16:18:58 +000014952
14953fi
14954
Ronald Oussoren315cd0c2009-11-19 16:25:21 +000014955if test $ac_sys_system = Darwin
14956then
14957 LIBS="$LIBS -framework CoreFoundation"
14958fi
14959
Mark Dickinson82864d12009-11-15 16:18:58 +000014960
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
14962$as_echo_n "checking for %zd printf() format support... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014963if ${ac_cv_have_size_t_format+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014964 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014965else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014966 if test "$cross_compiling" = yes; then :
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000014967 ac_cv_have_size_t_format="cross -- assuming yes"
14968
Brett Cannon09d12362006-05-11 05:11:33 +000014969else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014970 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon09d12362006-05-11 05:11:33 +000014971/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014972
Brett Cannon09d12362006-05-11 05:11:33 +000014973#include <stdio.h>
14974#include <stddef.h>
14975#include <string.h>
14976
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000014977#ifdef HAVE_SYS_TYPES_H
14978#include <sys/types.h>
14979#endif
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000014980
14981#ifdef HAVE_SSIZE_T
14982typedef ssize_t Py_ssize_t;
14983#elif SIZEOF_VOID_P == SIZEOF_LONG
14984typedef long Py_ssize_t;
14985#else
14986typedef int Py_ssize_t;
14987#endif
Brett Cannon09d12362006-05-11 05:11:33 +000014988
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000014989int main()
14990{
14991 char buffer[256];
14992
Brett Cannon09d12362006-05-11 05:11:33 +000014993 if(sprintf(buffer, "%zd", (size_t)123) < 0)
14994 return 1;
14995
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000014996 if (strcmp(buffer, "123"))
14997 return 1;
14998
14999 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
15000 return 1;
15001
15002 if (strcmp(buffer, "-123"))
Brett Cannon09d12362006-05-11 05:11:33 +000015003 return 1;
15004
15005 return 0;
15006}
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000015007
Brett Cannon09d12362006-05-11 05:11:33 +000015008_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015009if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000015010 ac_cv_have_size_t_format=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015011else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015012 ac_cv_have_size_t_format=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015013fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015014rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15015 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000015016fi
15017
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000015018fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015019{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
15020$as_echo "$ac_cv_have_size_t_format" >&6; }
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000015021if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000015022
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015023$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000015024
15025fi
15026
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015027ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000015028#ifdef HAVE_SYS_TYPES_H
15029#include <sys/types.h>
15030#endif
15031#ifdef HAVE_SYS_SOCKET_H
15032#include <sys/socket.h>
15033#endif
15034
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015035"
Matthias Klose3cef2a92012-03-14 23:39:33 +010015036if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000015037
Martin v. Löwis11437992002-04-12 09:54:03 +000015038else
Guido van Rossum95713eb2000-05-18 20:53:31 +000015039
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015040$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000015041
15042fi
15043
Michael W. Hudson54241132001-12-07 15:38:26 +000015044
Benjamin Peterson7497e912010-10-16 00:53:39 +000015045case $ac_sys_system in
15046AIX*)
15047
15048$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
15049 ;;
15050esac
15051
15052
Michael W. Hudson54241132001-12-07 15:38:26 +000015053
15054
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000015055for h in `(cd $srcdir;echo Python/thread_*.h)`
15056do
15057 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
15058done
15059
Michael W. Hudson54241132001-12-07 15:38:26 +000015060
Neal Norwitzd24499d2005-12-18 21:36:39 +000015061SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
15063$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015064for dir in $SRCDIRS; do
15065 if test ! -d $dir; then
15066 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000015067 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015068done
Benjamin Peterson2c992a02015-05-28 12:45:31 -050015069
15070# BEGIN_COMPUTED_GOTO
15071# Check for --with-computed-gotos
15072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
15073$as_echo_n "checking for --with-computed-gotos... " >&6; }
15074
15075# Check whether --with-computed-gotos was given.
15076if test "${with_computed_gotos+set}" = set; then :
15077 withval=$with_computed_gotos;
15078if test "$withval" = yes
15079then
15080
15081$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
15082
15083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15084$as_echo "yes" >&6; }
15085fi
15086if test "$withval" = no
15087then
15088
15089$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
15090
15091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15092$as_echo "no" >&6; }
15093fi
15094
15095else
15096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
15097$as_echo "no value specified" >&6; }
15098fi
15099
15100
15101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
15102$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
15103if ${ac_cv_computed_gotos+:} false; then :
15104 $as_echo_n "(cached) " >&6
15105else
15106 if test "$cross_compiling" = yes; then :
15107 if test "${with_computed_gotos+set}" = set; then
15108 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
15109 else
15110 ac_cv_computed_gotos=no
15111 fi
15112else
15113 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15114/* end confdefs.h. */
15115
15116int main(int argc, char **argv)
15117{
15118 static void *targets[1] = { &&LABEL1 };
15119 goto LABEL2;
15120LABEL1:
15121 return 0;
15122LABEL2:
15123 goto *targets[0];
15124 return 1;
15125}
15126
15127_ACEOF
15128if ac_fn_c_try_run "$LINENO"; then :
15129 ac_cv_computed_gotos=yes
15130else
15131 ac_cv_computed_gotos=no
15132fi
15133rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15134 conftest.$ac_objext conftest.beam conftest.$ac_ext
15135fi
15136
15137fi
15138
15139{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
15140$as_echo "$ac_cv_computed_gotos" >&6; }
15141case "$ac_cv_computed_gotos" in yes*)
15142
15143$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
15144
15145esac
15146# END_COMPUTED_GOTO
15147
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015148{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
15149$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000015150
Ned Deily3f1d0b32014-11-20 02:11:03 -080015151# ensurepip option
15152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
15153$as_echo_n "checking for ensurepip... " >&6; }
15154
15155# Check whether --with-ensurepip was given.
15156if test "${with_ensurepip+set}" = set; then :
15157 withval=$with_ensurepip;
15158else
15159 with_ensurepip=no
15160fi
15161
15162case $with_ensurepip in #(
15163 yes|upgrade) :
15164 ENSUREPIP=upgrade ;; #(
15165 install) :
15166 ENSUREPIP=install ;; #(
15167 no) :
15168 ENSUREPIP=no ;; #(
15169 *) :
15170 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
15171esac
15172{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
15173$as_echo "$ENSUREPIP" >&6; }
15174
15175
Guido van Rossum627b2d71993-12-24 10:39:16 +000015176# generate output files
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000015177ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000015178
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000015179ac_config_files="$ac_config_files Modules/ld_so_aix"
15180
Martin v. Löwis11437992002-04-12 09:54:03 +000015181cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015182# This file is a shell script that caches the results of configure
15183# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000015184# scripts and configure runs, see configure's option --config-cache.
15185# It is not useful on other systems. If it contains results you don't
15186# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015187#
Martin v. Löwis11437992002-04-12 09:54:03 +000015188# config.status only pays attention to the cache file if you give it
15189# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015190#
Skip Montanaro6dead952003-09-25 14:50:04 +000015191# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000015192# loading this file, other *unset* `ac_cv_foo' will be assigned the
15193# following values.
15194
15195_ACEOF
15196
Guido van Rossumf78abae1997-01-21 22:02:36 +000015197# The following way of writing the cache mishandles newlines in values,
15198# but we know of no workaround that is simple, portable, and efficient.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015199# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015200# Ultrix sh set writes to stderr and can't be redirected directly,
15201# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015202(
15203 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
15204 eval ac_val=\$$ac_var
15205 case $ac_val in #(
15206 *${as_nl}*)
15207 case $ac_var in #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015208 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
15209$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015210 esac
15211 case $ac_var in #(
15212 _ | IFS | as_nl) ;; #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015213 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
15214 *) { eval $ac_var=; unset $ac_var;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015215 esac ;;
15216 esac
15217 done
15218
Martin v. Löwis11437992002-04-12 09:54:03 +000015219 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +000015220 case $as_nl`(ac_space=' '; set) 2>&1` in #(
15221 *${as_nl}ac_space=\ *)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015222 # `set' does not quote correctly, so add quotes: double-quote
15223 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000015224 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015225 "s/'/'\\\\''/g;
15226 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Martin v. Löwiseba40652007-08-30 20:10:57 +000015227 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000015228 *)
15229 # `set' quotes correctly as required by POSIX, so do not add quotes.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015230 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000015231 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015232 esac |
15233 sort
15234) |
Martin v. Löwis11437992002-04-12 09:54:03 +000015235 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000015236 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000015237 t clear
Martin v. Löwiseba40652007-08-30 20:10:57 +000015238 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000015239 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15240 t end
Martin v. Löwiseba40652007-08-30 20:10:57 +000015241 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15242 :end' >>confcache
15243if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
15244 if test -w "$cache_file"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +010015245 if test "x$cache_file" != "x/dev/null"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015246 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
15247$as_echo "$as_me: updating cache $cache_file" >&6;}
Matthias Klose3cef2a92012-03-14 23:39:33 +010015248 if test ! -f "$cache_file" || test -h "$cache_file"; then
15249 cat confcache >"$cache_file"
15250 else
15251 case $cache_file in #(
15252 */* | ?:*)
15253 mv -f confcache "$cache_file"$$ &&
15254 mv -f "$cache_file"$$ "$cache_file" ;; #(
15255 *)
15256 mv -f confcache "$cache_file" ;;
15257 esac
15258 fi
15259 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015260 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015261 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
15262$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015263 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015264fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015265rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000015266
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015267test "x$prefix" = xNONE && prefix=$ac_default_prefix
15268# Let make expand exec_prefix.
15269test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000015270
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015271DEFS=-DHAVE_CONFIG_H
15272
Skip Montanaro6dead952003-09-25 14:50:04 +000015273ac_libobjs=
15274ac_ltlibobjs=
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015275U=
Skip Montanaro6dead952003-09-25 14:50:04 +000015276for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
15277 # 1. Remove the extension, and $U if already installed.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015278 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015279 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015280 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
15281 # will be set to the directory where LIBOBJS objects are built.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015282 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
15283 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000015284done
15285LIBOBJS=$ac_libobjs
15286
15287LTLIBOBJS=$ac_ltlibobjs
15288
15289
Martin v. Löwis11437992002-04-12 09:54:03 +000015290
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015291
Matthias Klose3cef2a92012-03-14 23:39:33 +010015292: "${CONFIG_STATUS=./config.status}"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015293ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000015294ac_clean_files_save=$ac_clean_files
15295ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015296{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
15297$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
15298as_write_fail=0
15299cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015300#! $SHELL
15301# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015302# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015303# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000015304# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015305
Martin v. Löwis11437992002-04-12 09:54:03 +000015306debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000015307ac_cs_recheck=false
15308ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000015309
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015310SHELL=\${CONFIG_SHELL-$SHELL}
15311export SHELL
15312_ASEOF
15313cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
15314## -------------------- ##
15315## M4sh Initialization. ##
15316## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000015317
Martin v. Löwiseba40652007-08-30 20:10:57 +000015318# Be more Bourne compatible
15319DUALCASE=1; export DUALCASE # for MKS sh
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015320if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015321 emulate sh
15322 NULLCMD=:
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015323 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000015324 # is contrary to our usage. Disable this feature.
15325 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000015326 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000015327else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015328 case `(set -o) 2>/dev/null` in #(
15329 *posix*) :
15330 set -o posix ;; #(
15331 *) :
15332 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015333esac
Martin v. Löwis11437992002-04-12 09:54:03 +000015334fi
Michael W. Hudson54241132001-12-07 15:38:26 +000015335
Skip Montanaro6dead952003-09-25 14:50:04 +000015336
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015337as_nl='
15338'
15339export as_nl
15340# Printing a long string crashes Solaris 7 /usr/bin/printf.
15341as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
15342as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
15343as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
15344# Prefer a ksh shell builtin over an external printf program on Solaris,
15345# but without wasting forks for bash or zsh.
15346if test -z "$BASH_VERSION$ZSH_VERSION" \
15347 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
15348 as_echo='print -r --'
15349 as_echo_n='print -rn --'
15350elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
15351 as_echo='printf %s\n'
15352 as_echo_n='printf %s'
15353else
15354 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
15355 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
15356 as_echo_n='/usr/ucb/echo -n'
15357 else
15358 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
15359 as_echo_n_body='eval
15360 arg=$1;
15361 case $arg in #(
15362 *"$as_nl"*)
15363 expr "X$arg" : "X\\(.*\\)$as_nl";
15364 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
15365 esac;
15366 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
15367 '
15368 export as_echo_n_body
15369 as_echo_n='sh -c $as_echo_n_body as_echo'
15370 fi
15371 export as_echo_body
15372 as_echo='sh -c $as_echo_body as_echo'
15373fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015374
15375# The user is always right.
15376if test "${PATH_SEPARATOR+set}" != set; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015377 PATH_SEPARATOR=:
15378 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
15379 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
15380 PATH_SEPARATOR=';'
15381 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000015382fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015383
Martin v. Löwiseba40652007-08-30 20:10:57 +000015384
15385# IFS
15386# We need space, tab and new line, in precisely that order. Quoting is
15387# there to prevent editors from complaining about space-tab.
15388# (If _AS_PATH_WALK were called with IFS unset, it would disable word
15389# splitting by setting IFS to empty value.)
Martin v. Löwiseba40652007-08-30 20:10:57 +000015390IFS=" "" $as_nl"
15391
15392# Find who we are. Look in the path if we contain no directory separator.
Matthias Klose3cef2a92012-03-14 23:39:33 +010015393as_myself=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015394case $0 in #((
Martin v. Löwiseba40652007-08-30 20:10:57 +000015395 *[\\/]* ) as_myself=$0 ;;
15396 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000015397for as_dir in $PATH
15398do
15399 IFS=$as_save_IFS
15400 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015401 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
15402 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000015403IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000015404
Martin v. Löwiseba40652007-08-30 20:10:57 +000015405 ;;
15406esac
15407# We did not find ourselves, most probably we were run as `sh COMMAND'
15408# in which case we are not to be found in the path.
15409if test "x$as_myself" = x; then
15410 as_myself=$0
15411fi
15412if test ! -f "$as_myself"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015413 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
15414 exit 1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015415fi
15416
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015417# Unset variables that we do not need and which cause bugs (e.g. in
15418# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
15419# suppresses any "Segmentation fault" message there. '((' could
15420# trigger a bug in pdksh 5.2.14.
15421for as_var in BASH_ENV ENV MAIL MAILPATH
15422do eval test x\${$as_var+set} = xset \
15423 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Martin v. Löwiseba40652007-08-30 20:10:57 +000015424done
15425PS1='$ '
15426PS2='> '
15427PS4='+ '
15428
15429# NLS nuisances.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015430LC_ALL=C
15431export LC_ALL
15432LANGUAGE=C
15433export LANGUAGE
Martin v. Löwiseba40652007-08-30 20:10:57 +000015434
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015435# CDPATH.
15436(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
15437
15438
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015439# as_fn_error STATUS ERROR [LINENO LOG_FD]
15440# ----------------------------------------
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015441# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
15442# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015443# script with STATUS, using 1 if that was 0.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015444as_fn_error ()
15445{
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015446 as_status=$1; test $as_status -eq 0 && as_status=1
15447 if test "$4"; then
15448 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
15449 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015450 fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015451 $as_echo "$as_me: error: $2" >&2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015452 as_fn_exit $as_status
15453} # as_fn_error
15454
15455
15456# as_fn_set_status STATUS
15457# -----------------------
15458# Set $? to STATUS, without forking.
15459as_fn_set_status ()
15460{
15461 return $1
15462} # as_fn_set_status
15463
15464# as_fn_exit STATUS
15465# -----------------
15466# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
15467as_fn_exit ()
15468{
15469 set +e
15470 as_fn_set_status $1
15471 exit $1
15472} # as_fn_exit
15473
15474# as_fn_unset VAR
15475# ---------------
15476# Portably unset VAR.
15477as_fn_unset ()
15478{
15479 { eval $1=; unset $1;}
15480}
15481as_unset=as_fn_unset
15482# as_fn_append VAR VALUE
15483# ----------------------
15484# Append the text in VALUE to the end of the definition contained in VAR. Take
15485# advantage of any shell optimizations that allow amortized linear growth over
15486# repeated appends, instead of the typical quadratic growth present in naive
15487# implementations.
15488if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
15489 eval 'as_fn_append ()
15490 {
15491 eval $1+=\$2
15492 }'
15493else
15494 as_fn_append ()
15495 {
15496 eval $1=\$$1\$2
15497 }
15498fi # as_fn_append
15499
15500# as_fn_arith ARG...
15501# ------------------
15502# Perform arithmetic evaluation on the ARGs, and store the result in the
15503# global $as_val. Take advantage of shells that can avoid forks. The arguments
15504# must be portable across $(()) and expr.
15505if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
15506 eval 'as_fn_arith ()
15507 {
15508 as_val=$(( $* ))
15509 }'
15510else
15511 as_fn_arith ()
15512 {
15513 as_val=`expr "$@" || test $? -eq 1`
15514 }
15515fi # as_fn_arith
15516
15517
Martin v. Löwiseba40652007-08-30 20:10:57 +000015518if expr a : '\(a\)' >/dev/null 2>&1 &&
15519 test "X`expr 00001 : '.*\(...\)'`" = X001; then
15520 as_expr=expr
15521else
15522 as_expr=false
15523fi
15524
15525if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
15526 as_basename=basename
15527else
15528 as_basename=false
15529fi
15530
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015531if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
15532 as_dirname=dirname
15533else
15534 as_dirname=false
15535fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015536
Martin v. Löwiseba40652007-08-30 20:10:57 +000015537as_me=`$as_basename -- "$0" ||
15538$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15539 X"$0" : 'X\(//\)$' \| \
15540 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015541$as_echo X/"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000015542 sed '/^.*\/\([^/][^/]*\)\/*$/{
15543 s//\1/
15544 q
15545 }
15546 /^X\/\(\/\/\)$/{
15547 s//\1/
15548 q
15549 }
15550 /^X\/\(\/\).*/{
15551 s//\1/
15552 q
15553 }
15554 s/.*/./; q'`
15555
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015556# Avoid depending upon Character Ranges.
15557as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15558as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15559as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15560as_cr_digits='0123456789'
15561as_cr_alnum=$as_cr_Letters$as_cr_digits
Martin v. Löwiseba40652007-08-30 20:10:57 +000015562
15563ECHO_C= ECHO_N= ECHO_T=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015564case `echo -n x` in #(((((
Martin v. Löwiseba40652007-08-30 20:10:57 +000015565-n*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015566 case `echo 'xy\c'` in
Martin v. Löwiseba40652007-08-30 20:10:57 +000015567 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015568 xy) ECHO_C='\c';;
15569 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
15570 ECHO_T=' ';;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015571 esac;;
15572*)
15573 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000015574esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015575
Martin v. Löwis11437992002-04-12 09:54:03 +000015576rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +000015577if test -d conf$$.dir; then
15578 rm -f conf$$.dir/conf$$.file
15579else
15580 rm -f conf$$.dir
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015581 mkdir conf$$.dir 2>/dev/null
Martin v. Löwiseba40652007-08-30 20:10:57 +000015582fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015583if (echo >conf$$.file) 2>/dev/null; then
15584 if ln -s conf$$.file conf$$ 2>/dev/null; then
15585 as_ln_s='ln -s'
15586 # ... but there are two gotchas:
15587 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
15588 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015589 # In both cases, we have to default to `cp -pR'.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015590 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015591 as_ln_s='cp -pR'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015592 elif ln conf$$.file conf$$ 2>/dev/null; then
15593 as_ln_s=ln
15594 else
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015595 as_ln_s='cp -pR'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015596 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015597else
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015598 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000015599fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015600rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
15601rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000015602
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015603
15604# as_fn_mkdir_p
15605# -------------
15606# Create "$as_dir" as a directory, including parents if necessary.
15607as_fn_mkdir_p ()
15608{
15609
15610 case $as_dir in #(
15611 -*) as_dir=./$as_dir;;
15612 esac
15613 test -d "$as_dir" || eval $as_mkdir_p || {
15614 as_dirs=
15615 while :; do
15616 case $as_dir in #(
15617 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
15618 *) as_qdir=$as_dir;;
15619 esac
15620 as_dirs="'$as_qdir' $as_dirs"
15621 as_dir=`$as_dirname -- "$as_dir" ||
15622$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15623 X"$as_dir" : 'X\(//\)[^/]' \| \
15624 X"$as_dir" : 'X\(//\)$' \| \
15625 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
15626$as_echo X"$as_dir" |
15627 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15628 s//\1/
15629 q
15630 }
15631 /^X\(\/\/\)[^/].*/{
15632 s//\1/
15633 q
15634 }
15635 /^X\(\/\/\)$/{
15636 s//\1/
15637 q
15638 }
15639 /^X\(\/\).*/{
15640 s//\1/
15641 q
15642 }
15643 s/.*/./; q'`
15644 test -d "$as_dir" && break
15645 done
15646 test -z "$as_dirs" || eval "mkdir $as_dirs"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015647 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015648
15649
15650} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000015651if mkdir -p . 2>/dev/null; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015652 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000015653else
Skip Montanarof0d5f792004-08-15 14:08:23 +000015654 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000015655 as_mkdir_p=false
15656fi
15657
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015658
15659# as_fn_executable_p FILE
15660# -----------------------
15661# Test if FILE is an executable regular file.
15662as_fn_executable_p ()
15663{
15664 test -f "$1" && test -x "$1"
15665} # as_fn_executable_p
15666as_test_x='test -x'
15667as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000015668
15669# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015670as_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 +000015671
15672# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015673as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015674
15675
Martin v. Löwis11437992002-04-12 09:54:03 +000015676exec 6>&1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015677## ----------------------------------- ##
15678## Main body of $CONFIG_STATUS script. ##
15679## ----------------------------------- ##
15680_ASEOF
15681test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015682
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015683cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15684# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000015685# report actual input values of CONFIG_FILES etc. instead of their
Martin v. Löwiseba40652007-08-30 20:10:57 +000015686# values after options handling.
15687ac_log="
Martin v. Löwis174440b2008-10-03 08:59:41 +000015688This file was extended by python $as_me 2.7, which was
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015689generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000015690
15691 CONFIG_FILES = $CONFIG_FILES
15692 CONFIG_HEADERS = $CONFIG_HEADERS
15693 CONFIG_LINKS = $CONFIG_LINKS
15694 CONFIG_COMMANDS = $CONFIG_COMMANDS
15695 $ $0 $@
15696
Martin v. Löwiseba40652007-08-30 20:10:57 +000015697on `(hostname || uname -n) 2>/dev/null | sed 1q`
15698"
15699
Martin v. Löwis11437992002-04-12 09:54:03 +000015700_ACEOF
15701
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015702case $ac_config_files in *"
15703"*) set x $ac_config_files; shift; ac_config_files=$*;;
15704esac
15705
15706case $ac_config_headers in *"
15707"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
15708esac
15709
15710
15711cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015712# Files that config.status was made for.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015713config_files="$ac_config_files"
15714config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000015715
Martin v. Löwiseba40652007-08-30 20:10:57 +000015716_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015717
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015718cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015719ac_cs_usage="\
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015720\`$as_me' instantiates files and other configuration actions
15721from templates according to the current configuration. Unless the files
15722and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000015723
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015724Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000015725
15726 -h, --help print this help, then exit
Martin v. Löwiseba40652007-08-30 20:10:57 +000015727 -V, --version print version number and configuration settings, then exit
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015728 --config print configuration, then exit
15729 -q, --quiet, --silent
15730 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000015731 -d, --debug don't remove temporary files
15732 --recheck update $as_me by reconfiguring in the same conditions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015733 --file=FILE[:TEMPLATE]
15734 instantiate the configuration file FILE
15735 --header=FILE[:TEMPLATE]
15736 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000015737
15738Configuration files:
15739$config_files
15740
15741Configuration headers:
15742$config_headers
15743
Benjamin Petersoncc8929b2016-08-03 22:01:32 -070015744Report bugs to <https://bugs.python.org/>."
Skip Montanaro89e975f2007-08-22 19:05:21 +000015745
Martin v. Löwiseba40652007-08-30 20:10:57 +000015746_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015747cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15748ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000015749ac_cs_version="\\
Martin v. Löwis174440b2008-10-03 08:59:41 +000015750python config.status 2.7
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015751configured by $0, generated by GNU Autoconf 2.69,
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015752 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000015753
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015754Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000015755This config.status script is free software; the Free Software Foundation
15756gives unlimited permission to copy, distribute and modify it."
Martin v. Löwiseba40652007-08-30 20:10:57 +000015757
15758ac_pwd='$ac_pwd'
15759srcdir='$srcdir'
15760INSTALL='$INSTALL'
Trent Nelsonf6407a12012-08-30 14:56:13 +000015761MKDIR_P='$MKDIR_P'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015762test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000015763_ACEOF
15764
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015765cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15766# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000015767ac_need_defaults=:
15768while test $# != 0
15769do
15770 case $1 in
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015771 --*=?*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000015772 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15773 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000015774 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000015775 ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015776 --*=)
15777 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15778 ac_optarg=
15779 ac_shift=:
15780 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015781 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000015782 ac_option=$1
15783 ac_optarg=$2
15784 ac_shift=shift
15785 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015786 esac
15787
Skip Montanaro6dead952003-09-25 14:50:04 +000015788 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000015789 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000015790 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15791 ac_cs_recheck=: ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015792 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015793 $as_echo "$ac_cs_version"; exit ;;
15794 --config | --confi | --conf | --con | --co | --c )
15795 $as_echo "$ac_cs_config"; exit ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015796 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000015797 debug=: ;;
15798 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000015799 $ac_shift
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015800 case $ac_optarg in
15801 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015802 '') as_fn_error $? "missing file argument" ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015803 esac
15804 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015805 ac_need_defaults=false;;
15806 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000015807 $ac_shift
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015808 case $ac_optarg in
15809 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15810 esac
15811 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015812 ac_need_defaults=false;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015813 --he | --h)
15814 # Conflict between --help and --header
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015815 as_fn_error $? "ambiguous option: \`$1'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015816Try \`$0 --help' for more information.";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015817 --help | --hel | -h )
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015818 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000015819 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
15820 | -silent | --silent | --silen | --sile | --sil | --si | --s)
15821 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015822
15823 # This is an error.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015824 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015825Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015826
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015827 *) as_fn_append ac_config_targets " $1"
Martin v. Löwiseba40652007-08-30 20:10:57 +000015828 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015829
15830 esac
15831 shift
15832done
15833
Skip Montanaro6dead952003-09-25 14:50:04 +000015834ac_configure_extra_args=
15835
15836if $ac_cs_silent; then
15837 exec 6>/dev/null
15838 ac_configure_extra_args="$ac_configure_extra_args --silent"
15839fi
15840
15841_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015842cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000015843if \$ac_cs_recheck; then
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015844 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015845 shift
15846 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
15847 CONFIG_SHELL='$SHELL'
Martin v. Löwiseba40652007-08-30 20:10:57 +000015848 export CONFIG_SHELL
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015849 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000015850fi
15851
Martin v. Löwis11437992002-04-12 09:54:03 +000015852_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015853cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015854exec 5>>config.log
15855{
15856 echo
15857 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
15858## Running $as_me. ##
15859_ASBOX
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015860 $as_echo "$ac_log"
Martin v. Löwiseba40652007-08-30 20:10:57 +000015861} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015862
Martin v. Löwiseba40652007-08-30 20:10:57 +000015863_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015864cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015865_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015866
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015867cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015868
15869# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000015870for ac_config_target in $ac_config_targets
15871do
Martin v. Löwiseba40652007-08-30 20:10:57 +000015872 case $ac_config_target in
15873 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
15874 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
15875 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
15876 "Mac/IDLE/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/IDLE/Makefile" ;;
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000015877 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
15878 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015879 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
15880 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000015881 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000015882 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015883
Matthias Klose3cef2a92012-03-14 23:39:33 +010015884 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015885 esac
15886done
15887
Martin v. Löwiseba40652007-08-30 20:10:57 +000015888
Martin v. Löwis11437992002-04-12 09:54:03 +000015889# If the user did not use the arguments to specify the items to instantiate,
15890# then the envvar interface is used. Set only those that are not.
15891# We use the long form for the default assignment because of an extremely
15892# bizarre bug on SunOS 4.1.3.
15893if $ac_need_defaults; then
15894 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15895 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
15896fi
15897
Skip Montanaro6dead952003-09-25 14:50:04 +000015898# Have a temporary directory for convenience. Make it in the build tree
Martin v. Löwiseba40652007-08-30 20:10:57 +000015899# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000015900# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015901# Hook for its removal unless debugging.
15902# Note that there is a small window in which the directory will not be cleaned:
15903# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000015904$debug ||
15905{
Matthias Klose3cef2a92012-03-14 23:39:33 +010015906 tmp= ac_tmp=
Martin v. Löwiseba40652007-08-30 20:10:57 +000015907 trap 'exit_status=$?
Matthias Klose3cef2a92012-03-14 23:39:33 +010015908 : "${ac_tmp:=$tmp}"
15909 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +000015910' 0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015911 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000015912}
Martin v. Löwis11437992002-04-12 09:54:03 +000015913# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000015914
Martin v. Löwis11437992002-04-12 09:54:03 +000015915{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015916 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Matthias Klose3cef2a92012-03-14 23:39:33 +010015917 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000015918} ||
15919{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015920 tmp=./conf$$-$RANDOM
15921 (umask 077 && mkdir "$tmp")
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015922} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Matthias Klose3cef2a92012-03-14 23:39:33 +010015923ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000015924
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015925# Set up the scripts for CONFIG_FILES section.
15926# No need to generate them if there are no CONFIG_FILES.
15927# This happens for instance with `./config.status config.h'.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015928if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015929
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015930
15931ac_cr=`echo X | tr X '\015'`
15932# On cygwin, bash can eat \r inside `` if the user requested igncr.
15933# But we know of no other shell where ac_cr would be empty at this
15934# point, so we can use a bashism as a fallback.
15935if test "x$ac_cr" = x; then
15936 eval ac_cr=\$\'\\r\'
15937fi
15938ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
15939if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015940 ac_cs_awk_cr='\\r'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015941else
15942 ac_cs_awk_cr=$ac_cr
15943fi
15944
Matthias Klose3cef2a92012-03-14 23:39:33 +010015945echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000015946_ACEOF
15947
Martin v. Löwiseba40652007-08-30 20:10:57 +000015948
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015949{
15950 echo "cat >conf$$subs.awk <<_ACEOF" &&
15951 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
15952 echo "_ACEOF"
15953} >conf$$subs.sh ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015954 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15955ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015956ac_delim='%!_!# '
15957for ac_last_try in false false false false false :; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015958 . ./conf$$subs.sh ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015959 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015960
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015961 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
15962 if test $ac_delim_n = $ac_delim_num; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015963 break
15964 elif $ac_last_try; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015965 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015966 else
15967 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000015968 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015969done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015970rm -f conf$$subs.sh
Martin v. Löwiseba40652007-08-30 20:10:57 +000015971
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015972cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Matthias Klose3cef2a92012-03-14 23:39:33 +010015973cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000015974_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015975sed -n '
15976h
15977s/^/S["/; s/!.*/"]=/
15978p
15979g
15980s/^[^!]*!//
15981:repl
15982t repl
15983s/'"$ac_delim"'$//
15984t delim
15985:nl
15986h
15987s/\(.\{148\}\)..*/\1/
15988t more1
15989s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
15990p
15991n
15992b repl
15993:more1
15994s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15995p
15996g
15997s/.\{148\}//
15998t nl
15999:delim
16000h
16001s/\(.\{148\}\)..*/\1/
16002t more2
16003s/["\\]/\\&/g; s/^/"/; s/$/"/
16004p
16005b
16006:more2
16007s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16008p
16009g
16010s/.\{148\}//
16011t delim
16012' <conf$$subs.awk | sed '
16013/^[^""]/{
16014 N
16015 s/\n//
16016}
16017' >>$CONFIG_STATUS || ac_write_fail=1
16018rm -f conf$$subs.awk
16019cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16020_ACAWK
Matthias Klose3cef2a92012-03-14 23:39:33 +010016021cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016022 for (key in S) S_is_set[key] = 1
16023 FS = ""
16024
16025}
16026{
16027 line = $ 0
16028 nfields = split(line, field, "@")
16029 substed = 0
16030 len = length(field[1])
16031 for (i = 2; i < nfields; i++) {
16032 key = field[i]
16033 keylen = length(key)
16034 if (S_is_set[key]) {
16035 value = S[key]
16036 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
16037 len += length(value) + length(field[++i])
16038 substed = 1
16039 } else
16040 len += 1 + keylen
16041 }
16042
16043 print line
16044}
16045
16046_ACAWK
Martin v. Löwiseba40652007-08-30 20:10:57 +000016047_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016048cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16049if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
16050 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
16051else
16052 cat
Matthias Klose3cef2a92012-03-14 23:39:33 +010016053fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016054 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016055_ACEOF
16056
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016057# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
16058# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Martin v. Löwiseba40652007-08-30 20:10:57 +000016059# trailing colons and then remove the whole line if VPATH becomes empty
16060# (actually we leave an empty line to preserve line numbers).
16061if test "x$srcdir" = x.; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016062 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
16063h
16064s///
16065s/^/:/
16066s/[ ]*$/:/
16067s/:\$(srcdir):/:/g
16068s/:\${srcdir}:/:/g
16069s/:@srcdir@:/:/g
16070s/^:*//
Martin v. Löwiseba40652007-08-30 20:10:57 +000016071s/:*$//
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016072x
16073s/\(=[ ]*\).*/\1/
16074G
16075s/\n//
Martin v. Löwiseba40652007-08-30 20:10:57 +000016076s/^[^=]*=[ ]*$//
16077}'
16078fi
16079
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016080cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016081fi # test -n "$CONFIG_FILES"
16082
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016083# Set up the scripts for CONFIG_HEADERS section.
16084# No need to generate them if there are no CONFIG_HEADERS.
16085# This happens for instance with `./config.status Makefile'.
16086if test -n "$CONFIG_HEADERS"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +010016087cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016088BEGIN {
16089_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000016090
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016091# Transform confdefs.h into an awk script `defines.awk', embedded as
16092# here-document in config.status, that substitutes the proper values into
16093# config.h.in to produce config.h.
16094
16095# Create a delimiter string that does not exist in confdefs.h, to ease
16096# handling of long lines.
16097ac_delim='%!_!# '
16098for ac_last_try in false false :; do
Matthias Klose3cef2a92012-03-14 23:39:33 +010016099 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
16100 if test -z "$ac_tt"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016101 break
16102 elif $ac_last_try; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016103 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016104 else
16105 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
16106 fi
16107done
16108
16109# For the awk script, D is an array of macro values keyed by name,
16110# likewise P contains macro parameters if any. Preserve backslash
16111# newline sequences.
16112
16113ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
16114sed -n '
16115s/.\{148\}/&'"$ac_delim"'/g
16116t rset
16117:rset
16118s/^[ ]*#[ ]*define[ ][ ]*/ /
16119t def
16120d
16121:def
16122s/\\$//
16123t bsnl
16124s/["\\]/\\&/g
16125s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16126D["\1"]=" \3"/p
16127s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
16128d
16129:bsnl
16130s/["\\]/\\&/g
16131s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16132D["\1"]=" \3\\\\\\n"\\/p
16133t cont
16134s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
16135t cont
16136d
16137:cont
16138n
16139s/.\{148\}/&'"$ac_delim"'/g
16140t clear
16141:clear
16142s/\\$//
16143t bsnlc
16144s/["\\]/\\&/g; s/^/"/; s/$/"/p
16145d
16146:bsnlc
16147s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
16148b cont
16149' <confdefs.h | sed '
16150s/'"$ac_delim"'/"\\\
16151"/g' >>$CONFIG_STATUS || ac_write_fail=1
16152
16153cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16154 for (key in D) D_is_set[key] = 1
16155 FS = ""
16156}
16157/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
16158 line = \$ 0
16159 split(line, arg, " ")
16160 if (arg[1] == "#") {
16161 defundef = arg[2]
16162 mac1 = arg[3]
16163 } else {
16164 defundef = substr(arg[1], 2)
16165 mac1 = arg[2]
16166 }
16167 split(mac1, mac2, "(") #)
16168 macro = mac2[1]
16169 prefix = substr(line, 1, index(line, defundef) - 1)
16170 if (D_is_set[macro]) {
16171 # Preserve the white space surrounding the "#".
16172 print prefix "define", macro P[macro] D[macro]
16173 next
16174 } else {
16175 # Replace #undef with comments. This is necessary, for example,
16176 # in the case of _POSIX_SOURCE, which is predefined and required
16177 # on some systems where configure will not decide to define it.
16178 if (defundef == "undef") {
16179 print "/*", prefix defundef, macro, "*/"
16180 next
16181 }
16182 }
16183}
16184{ print }
16185_ACAWK
16186_ACEOF
16187cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016188 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016189fi # test -n "$CONFIG_HEADERS"
16190
16191
16192eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
16193shift
16194for ac_tag
Martin v. Löwiseba40652007-08-30 20:10:57 +000016195do
16196 case $ac_tag in
16197 :[FHLC]) ac_mode=$ac_tag; continue;;
16198 esac
16199 case $ac_mode$ac_tag in
16200 :[FHL]*:*);;
Matthias Klose3cef2a92012-03-14 23:39:33 +010016201 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016202 :[FH]-) ac_tag=-:-;;
16203 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
16204 esac
16205 ac_save_IFS=$IFS
16206 IFS=:
16207 set x $ac_tag
16208 IFS=$ac_save_IFS
16209 shift
16210 ac_file=$1
16211 shift
16212
16213 case $ac_mode in
16214 :L) ac_source=$1;;
16215 :[FH])
16216 ac_file_inputs=
16217 for ac_f
16218 do
16219 case $ac_f in
Matthias Klose3cef2a92012-03-14 23:39:33 +010016220 -) ac_f="$ac_tmp/stdin";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016221 *) # Look for the file first in the build tree, then in the source tree
16222 # (if the path is not absolute). The absolute path cannot be DOS-style,
16223 # because $ac_f cannot contain `:'.
16224 test -f "$ac_f" ||
16225 case $ac_f in
16226 [\\/$]*) false;;
16227 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
16228 esac ||
Matthias Klose3cef2a92012-03-14 23:39:33 +010016229 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016230 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016231 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
16232 as_fn_append ac_file_inputs " '$ac_f'"
Martin v. Löwiseba40652007-08-30 20:10:57 +000016233 done
16234
16235 # Let's still pretend it is `configure' which instantiates (i.e., don't
16236 # use $as_me), people would be surprised to read:
16237 # /* config.h. Generated by config.status. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016238 configure_input='Generated from '`
16239 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
16240 `' by configure.'
Martin v. Löwiseba40652007-08-30 20:10:57 +000016241 if test x"$ac_file" != x-; then
16242 configure_input="$ac_file. $configure_input"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016243 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
16244$as_echo "$as_me: creating $ac_file" >&6;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000016245 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016246 # Neutralize special characters interpreted by sed in replacement strings.
16247 case $configure_input in #(
16248 *\&* | *\|* | *\\* )
16249 ac_sed_conf_input=`$as_echo "$configure_input" |
16250 sed 's/[\\\\&|]/\\\\&/g'`;; #(
16251 *) ac_sed_conf_input=$configure_input;;
16252 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000016253
16254 case $ac_tag in
Matthias Klose3cef2a92012-03-14 23:39:33 +010016255 *:-:* | *:-) cat >"$ac_tmp/stdin" \
16256 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016257 esac
16258 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016259 esac
16260
Martin v. Löwiseba40652007-08-30 20:10:57 +000016261 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000016262$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016263 X"$ac_file" : 'X\(//\)[^/]' \| \
16264 X"$ac_file" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000016265 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016266$as_echo X"$ac_file" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000016267 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16268 s//\1/
16269 q
16270 }
16271 /^X\(\/\/\)[^/].*/{
16272 s//\1/
16273 q
16274 }
16275 /^X\(\/\/\)$/{
16276 s//\1/
16277 q
16278 }
16279 /^X\(\/\).*/{
16280 s//\1/
16281 q
16282 }
16283 s/.*/./; q'`
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016284 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000016285 ac_builddir=.
16286
Martin v. Löwiseba40652007-08-30 20:10:57 +000016287case "$ac_dir" in
16288.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
16289*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016290 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000016291 # A ".." for each directory in $ac_dir_suffix.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016292 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000016293 case $ac_top_builddir_sub in
16294 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
16295 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
16296 esac ;;
16297esac
16298ac_abs_top_builddir=$ac_pwd
16299ac_abs_builddir=$ac_pwd$ac_dir_suffix
16300# for backward compatibility:
16301ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000016302
16303case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +000016304 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000016305 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +000016306 ac_top_srcdir=$ac_top_builddir_sub
16307 ac_abs_top_srcdir=$ac_pwd ;;
16308 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000016309 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016310 ac_top_srcdir=$srcdir
16311 ac_abs_top_srcdir=$srcdir ;;
16312 *) # Relative name.
16313 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
16314 ac_top_srcdir=$ac_top_build_prefix$srcdir
16315 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016316esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000016317ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000016318
Martin v. Löwis11437992002-04-12 09:54:03 +000016319
Martin v. Löwiseba40652007-08-30 20:10:57 +000016320 case $ac_mode in
16321 :F)
16322 #
16323 # CONFIG_FILE
16324 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016325
16326 case $INSTALL in
16327 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016328 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016329 esac
Trent Nelsonf6407a12012-08-30 14:56:13 +000016330 ac_MKDIR_P=$MKDIR_P
16331 case $MKDIR_P in
16332 [\\/$]* | ?:[\\/]* ) ;;
16333 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
16334 esac
Brett Cannon19fab762007-06-02 03:02:29 +000016335_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000016336
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016337cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000016338# If the template does not know about datarootdir, expand it.
16339# FIXME: This hack should be removed a few years after 2.60.
16340ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016341ac_sed_dataroot='
16342/datarootdir/ {
Martin v. Löwiseba40652007-08-30 20:10:57 +000016343 p
16344 q
16345}
16346/@datadir@/p
16347/@docdir@/p
16348/@infodir@/p
16349/@localedir@/p
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016350/@mandir@/p'
16351case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Martin v. Löwiseba40652007-08-30 20:10:57 +000016352*datarootdir*) ac_datarootdir_seen=yes;;
16353*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016354 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
16355$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000016356_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016357cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000016358 ac_datarootdir_hack='
16359 s&@datadir@&$datadir&g
16360 s&@docdir@&$docdir&g
16361 s&@infodir@&$infodir&g
16362 s&@localedir@&$localedir&g
16363 s&@mandir@&$mandir&g
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016364 s&\\\${datarootdir}&$datarootdir&g' ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016365esac
16366_ACEOF
16367
16368# Neutralize VPATH when `$srcdir' = `.'.
16369# Shell code in configure.ac might set extrasub.
16370# FIXME: do we really want to maintain this feature?
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016371cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16372ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000016373$extrasub
16374_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016375cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016376:t
16377/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016378s|@configure_input@|$ac_sed_conf_input|;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000016379s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016380s&@top_build_prefix@&$ac_top_build_prefix&;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000016381s&@srcdir@&$ac_srcdir&;t t
16382s&@abs_srcdir@&$ac_abs_srcdir&;t t
16383s&@top_srcdir@&$ac_top_srcdir&;t t
16384s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
16385s&@builddir@&$ac_builddir&;t t
16386s&@abs_builddir@&$ac_abs_builddir&;t t
16387s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
16388s&@INSTALL@&$ac_INSTALL&;t t
Trent Nelsonf6407a12012-08-30 14:56:13 +000016389s&@MKDIR_P@&$ac_MKDIR_P&;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000016390$ac_datarootdir_hack
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016391"
Matthias Klose3cef2a92012-03-14 23:39:33 +010016392eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
16393 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016394
Martin v. Löwiseba40652007-08-30 20:10:57 +000016395test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Matthias Klose3cef2a92012-03-14 23:39:33 +010016396 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
16397 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
16398 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016399 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016400which seems to be undefined. Please make sure it is defined" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016401$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016402which seems to be undefined. Please make sure it is defined" >&2;}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016403
Matthias Klose3cef2a92012-03-14 23:39:33 +010016404 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000016405 case $ac_file in
Matthias Klose3cef2a92012-03-14 23:39:33 +010016406 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
16407 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016408 esac \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016409 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016410 ;;
16411 :H)
16412 #
16413 # CONFIG_HEADER
16414 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016415 if test x"$ac_file" != x-; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016416 {
16417 $as_echo "/* $configure_input */" \
Matthias Klose3cef2a92012-03-14 23:39:33 +010016418 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
16419 } >"$ac_tmp/config.h" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016420 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Matthias Klose3cef2a92012-03-14 23:39:33 +010016421 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016422 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
16423$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016424 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016425 rm -f "$ac_file"
Matthias Klose3cef2a92012-03-14 23:39:33 +010016426 mv "$ac_tmp/config.h" "$ac_file" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016427 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016428 fi
16429 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016430 $as_echo "/* $configure_input */" \
Matthias Klose3cef2a92012-03-14 23:39:33 +010016431 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016432 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016433 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016434 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000016435
Martin v. Löwiseba40652007-08-30 20:10:57 +000016436
16437 esac
16438
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000016439
16440 case $ac_file$ac_mode in
16441 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
16442
16443 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000016444done # for ac_tag
16445
Guido van Rossum627b2d71993-12-24 10:39:16 +000016446
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016447as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000016448_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016449ac_clean_files=$ac_clean_files_save
16450
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016451test $ac_write_fail = 0 ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016452 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016453
Martin v. Löwis11437992002-04-12 09:54:03 +000016454
16455# configure is writing to config.log, and then calls config.status.
16456# config.status does its own redirection, appending to config.log.
16457# Unfortunately, on DOS this fails, as config.log is still kept open
16458# by configure, so config.status won't be able to write to it; its
16459# output is simply discarded. So we exec the FD to /dev/null,
16460# effectively closing config.log, so it can be properly (re)opened and
16461# appended to by config.status. When coming back to configure, we
16462# need to make the FD available again.
16463if test "$no_create" != yes; then
16464 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000016465 ac_config_status_args=
16466 test "$silent" = yes &&
16467 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000016468 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000016469 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000016470 exec 5>>config.log
16471 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16472 # would make configure fail if this is the last instruction.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016473 $ac_cs_success || as_fn_exit 1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016474fi
16475if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
16476 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
16477$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016478fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000016479
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016480
Martin v. Löwisf7afe952006-04-14 15:16:15 +000016481echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016482if test ! -f Modules/Setup
16483then
16484 cp $srcdir/Modules/Setup.dist Modules/Setup
16485fi
16486
Martin v. Löwisf7afe952006-04-14 15:16:15 +000016487echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016488if test ! -f Modules/Setup.local
16489then
16490 echo "# Edit this file for local setup changes" >Modules/Setup.local
16491fi
16492
16493echo "creating Makefile"
16494$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
16495 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000016496 Modules/Setup.local Modules/Setup
Skip Montanaro89e975f2007-08-22 19:05:21 +000016497
16498case $ac_sys_system in
16499BeOS)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016500 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000016501
16502 Support for BeOS is deprecated as of Python 2.6.
16503 See PEP 11 for the gory details.
16504 " >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016505$as_echo "$as_me: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000016506
16507 Support for BeOS is deprecated as of Python 2.6.
16508 See PEP 11 for the gory details.
16509 " >&2;}
16510 ;;
16511*) ;;
16512esac
16513
Neil Schemenauerc761fc82001-02-19 04:50:49 +000016514mv config.c Modules
Gregory P. Smith6d8fdfc2016-09-07 23:28:23 -070016515
16516if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
16517 echo "" >&6
16518 echo "" >&6
16519 echo "If you want a release build with all optimizations active (LTO, PGO, etc),"
16520 echo "please run ./configure --with-optimizations" >&6
16521 echo "" >&6
16522 echo "" >&6
16523fi