blob: c01dfe0f27463b64723bb4fd3ddbd275ba37142d [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
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000690SVNVERSION
691ARFLAGS
doko@python.orgd65e2ba2013-01-31 23:52:03 +0100692ac_ct_AR
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000693AR
694RANLIB
695GNULD
696LINKCC
697RUNSHARED
698INSTSONAME
699LDLIBRARYDIR
700BLDLIBRARY
701DLLLIBRARY
702LDLIBRARY
703LIBRARY
704BUILDEXEEXT
705EGREP
706GREP
707CPP
doko@python.org4e63fbe2013-01-25 13:08:27 +0100708MULTIARCH
doko@python.orgd65e2ba2013-01-31 23:52:03 +0100709ac_ct_CXX
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000710MAINCC
711CXX
712OBJEXT
713EXEEXT
714ac_ct_CC
715CPPFLAGS
716LDFLAGS
717CFLAGS
718CC
719EXPORT_MACOSX_DEPLOYMENT_TARGET
720CONFIGURE_MACOSX_DEPLOYMENT_TARGET
721EXTRAMACHDEPPATH
722EXTRAPLATDIR
doko@ubuntu.coma50b0de2015-04-13 21:55:59 +0200723PLATDIR
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000724SGI_ABI
doko@python.orgd65e2ba2013-01-31 23:52:03 +0100725_PYTHON_HOST_PLATFORM
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000726MACHDEP
727FRAMEWORKINSTALLAPPSPREFIX
728FRAMEWORKUNIXTOOLSPREFIX
729FRAMEWORKALTINSTALLLAST
730FRAMEWORKALTINSTALLFIRST
731FRAMEWORKINSTALLLAST
732FRAMEWORKINSTALLFIRST
733PYTHONFRAMEWORKINSTALLDIR
734PYTHONFRAMEWORKPREFIX
735PYTHONFRAMEWORKDIR
736PYTHONFRAMEWORKIDENTIFIER
737PYTHONFRAMEWORK
738LIPO_32BIT_FLAGS
739ARCH_RUN_32BIT
740UNIVERSALSDK
741CONFIG_ARGS
742SOVERSION
743VERSION
Martin Panterbc82de02016-07-29 05:52:32 +0000744GENERATED_COMMENT
doko@python.orgd65e2ba2013-01-31 23:52:03 +0100745PYTHON_FOR_BUILD
746host_os
747host_vendor
748host_cpu
749host
750build_os
751build_vendor
752build_cpu
753build
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000754target_alias
755host_alias
756build_alias
757LIBS
758ECHO_T
759ECHO_N
760ECHO_C
761DEFS
762mandir
763localedir
764libdir
765psdir
766pdfdir
767dvidir
768htmldir
769infodir
770docdir
771oldincludedir
772includedir
Benjamin Peterson42e10292016-07-07 00:02:31 -0700773runstatedir
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000774localstatedir
775sharedstatedir
776sysconfdir
777datadir
778datarootdir
779libexecdir
780sbindir
781bindir
782program_transform_name
783prefix
784exec_prefix
785PACKAGE_URL
786PACKAGE_BUGREPORT
787PACKAGE_STRING
788PACKAGE_VERSION
789PACKAGE_TARNAME
790PACKAGE_NAME
791PATH_SEPARATOR
792SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000793ac_subst_files=''
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000794ac_user_opts='
795enable_option_checking
796enable_universalsdk
797with_universal_archs
798with_framework_name
799enable_framework
800with_gcc
Zachary Ware6ed42ea2015-12-21 11:43:03 -0600801with_icc
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000802with_cxx_main
803with_suffix
804enable_shared
805enable_profiling
806with_pydebug
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)b9999152016-11-20 21:19:36 +0000807enable_optimizations
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)c543a0f2016-06-02 23:44:40 +0000808with_lto
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000809enable_toolbox_glue
810with_libs
811with_system_expat
812with_system_ffi
Ned Deilya2a9f572013-10-25 00:30:10 -0700813with_tcltk_includes
814with_tcltk_libs
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000815with_dbmliborder
816with_signal_module
817with_dec_threads
818with_threads
819with_thread
820with_pth
821enable_ipv6
822with_doc_strings
823with_tsc
824with_pymalloc
825with_valgrind
826with_wctype_functions
827with_fpectl
828with_libm
829with_libc
830enable_big_digits
831enable_unicode
Benjamin Peterson2c992a02015-05-28 12:45:31 -0500832with_computed_gotos
Ned Deily3f1d0b32014-11-20 02:11:03 -0800833with_ensurepip
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000834'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000835 ac_precious_vars='build_alias
836host_alias
837target_alias
838CC
839CFLAGS
840LDFLAGS
841LIBS
842CPPFLAGS
Benjamin Peterson64e8f6e2014-12-15 00:00:23 -0500843CPP
844PKG_CONFIG
845PKG_CONFIG_PATH
846PKG_CONFIG_LIBDIR'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000847
Guido van Rossum627b2d71993-12-24 10:39:16 +0000848
Guido van Rossum7f43da71994-08-01 12:15:30 +0000849# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000850ac_init_help=
851ac_init_version=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000852ac_unrecognized_opts=
853ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000854# The variables have the same names as the options, with
855# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000856cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000857exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000858no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000859no_recursion=
860prefix=NONE
861program_prefix=NONE
862program_suffix=NONE
863program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000864silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000865site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000866srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000867verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000868x_includes=NONE
869x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000870
871# Installation directory options.
872# These are left unexpanded so users can "make install exec_prefix=/foo"
873# and all the variables that are supposed to be based on exec_prefix
874# by default will actually change.
875# Use braces instead of parens because sh, perl, etc. also accept them.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000876# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000877bindir='${exec_prefix}/bin'
878sbindir='${exec_prefix}/sbin'
879libexecdir='${exec_prefix}/libexec'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000880datarootdir='${prefix}/share'
881datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000882sysconfdir='${prefix}/etc'
883sharedstatedir='${prefix}/com'
884localstatedir='${prefix}/var'
Benjamin Peterson42e10292016-07-07 00:02:31 -0700885runstatedir='${localstatedir}/run'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000886includedir='${prefix}/include'
887oldincludedir='/usr/include'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000888docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
889infodir='${datarootdir}/info'
890htmldir='${docdir}'
891dvidir='${docdir}'
892pdfdir='${docdir}'
893psdir='${docdir}'
894libdir='${exec_prefix}/lib'
895localedir='${datarootdir}/locale'
896mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000897
Guido van Rossum7f43da71994-08-01 12:15:30 +0000898ac_prev=
Martin v. Löwiseba40652007-08-30 20:10:57 +0000899ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000900for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000901do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000902 # If the previous option needs an argument, assign it.
903 if test -n "$ac_prev"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +0000904 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000905 ac_prev=
906 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000907 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000908
Martin v. Löwiseba40652007-08-30 20:10:57 +0000909 case $ac_option in
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000910 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
911 *=) ac_optarg= ;;
912 *) ac_optarg=yes ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000913 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000914
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000915 # Accept the important Cygnus configure options, so we can diagnose typos.
916
Martin v. Löwiseba40652007-08-30 20:10:57 +0000917 case $ac_dashdash$ac_option in
918 --)
919 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000920
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000921 -bindir | --bindir | --bindi | --bind | --bin | --bi)
922 ac_prev=bindir ;;
923 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000924 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000925
926 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000927 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000928 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000929 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000930
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000931 -cache-file | --cache-file | --cache-fil | --cache-fi \
932 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
933 ac_prev=cache_file ;;
934 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
935 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000936 cache_file=$ac_optarg ;;
937
938 --config-cache | -C)
939 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000940
Martin v. Löwiseba40652007-08-30 20:10:57 +0000941 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000942 ac_prev=datadir ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000943 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000944 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000945
Martin v. Löwiseba40652007-08-30 20:10:57 +0000946 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
947 | --dataroo | --dataro | --datar)
948 ac_prev=datarootdir ;;
949 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
950 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
951 datarootdir=$ac_optarg ;;
952
Guido van Rossum7f43da71994-08-01 12:15:30 +0000953 -disable-* | --disable-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000954 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000955 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000956 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000957 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000958 ac_useropt_orig=$ac_useropt
959 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
960 case $ac_user_opts in
961 *"
962"enable_$ac_useropt"
963"*) ;;
964 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
965 ac_unrecognized_sep=', ';;
966 esac
967 eval enable_$ac_useropt=no ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000968
969 -docdir | --docdir | --docdi | --doc | --do)
970 ac_prev=docdir ;;
971 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
972 docdir=$ac_optarg ;;
973
974 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
975 ac_prev=dvidir ;;
976 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
977 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000978
979 -enable-* | --enable-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000980 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000981 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000982 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000983 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000984 ac_useropt_orig=$ac_useropt
985 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
986 case $ac_user_opts in
987 *"
988"enable_$ac_useropt"
989"*) ;;
990 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
991 ac_unrecognized_sep=', ';;
992 esac
993 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000994
Guido van Rossum7f43da71994-08-01 12:15:30 +0000995 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
996 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
997 | --exec | --exe | --ex)
998 ac_prev=exec_prefix ;;
999 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1000 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1001 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001002 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001003
1004 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001005 # Obsolete; use --with-gas.
1006 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001007
Martin v. Löwis11437992002-04-12 09:54:03 +00001008 -help | --help | --hel | --he | -h)
1009 ac_init_help=long ;;
1010 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1011 ac_init_help=recursive ;;
1012 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1013 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001014
1015 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001016 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001017 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001018 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001019
Martin v. Löwiseba40652007-08-30 20:10:57 +00001020 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1021 ac_prev=htmldir ;;
1022 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1023 | --ht=*)
1024 htmldir=$ac_optarg ;;
1025
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001026 -includedir | --includedir | --includedi | --included | --include \
1027 | --includ | --inclu | --incl | --inc)
1028 ac_prev=includedir ;;
1029 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1030 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001031 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001032
1033 -infodir | --infodir | --infodi | --infod | --info | --inf)
1034 ac_prev=infodir ;;
1035 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001036 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001037
1038 -libdir | --libdir | --libdi | --libd)
1039 ac_prev=libdir ;;
1040 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001041 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001042
1043 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1044 | --libexe | --libex | --libe)
1045 ac_prev=libexecdir ;;
1046 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1047 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001048 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001049
Martin v. Löwiseba40652007-08-30 20:10:57 +00001050 -localedir | --localedir | --localedi | --localed | --locale)
1051 ac_prev=localedir ;;
1052 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1053 localedir=$ac_optarg ;;
1054
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001055 -localstatedir | --localstatedir | --localstatedi | --localstated \
Martin v. Löwiseba40652007-08-30 20:10:57 +00001056 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001057 ac_prev=localstatedir ;;
1058 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Martin v. Löwiseba40652007-08-30 20:10:57 +00001059 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001060 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001061
1062 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1063 ac_prev=mandir ;;
1064 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001065 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001066
Guido van Rossum7f43da71994-08-01 12:15:30 +00001067 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001068 # Obsolete; use --without-fp.
1069 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001070
1071 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001072 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001073 no_create=yes ;;
1074
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001075 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1076 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1077 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001078
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001079 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1080 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1081 | --oldin | --oldi | --old | --ol | --o)
1082 ac_prev=oldincludedir ;;
1083 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1084 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1085 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001086 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001087
Guido van Rossum7f43da71994-08-01 12:15:30 +00001088 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1089 ac_prev=prefix ;;
1090 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001091 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001092
1093 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1094 | --program-pre | --program-pr | --program-p)
1095 ac_prev=program_prefix ;;
1096 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1097 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001098 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001099
1100 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1101 | --program-suf | --program-su | --program-s)
1102 ac_prev=program_suffix ;;
1103 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1104 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001105 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001106
1107 -program-transform-name | --program-transform-name \
1108 | --program-transform-nam | --program-transform-na \
1109 | --program-transform-n | --program-transform- \
1110 | --program-transform | --program-transfor \
1111 | --program-transfo | --program-transf \
1112 | --program-trans | --program-tran \
1113 | --progr-tra | --program-tr | --program-t)
1114 ac_prev=program_transform_name ;;
1115 -program-transform-name=* | --program-transform-name=* \
1116 | --program-transform-nam=* | --program-transform-na=* \
1117 | --program-transform-n=* | --program-transform-=* \
1118 | --program-transform=* | --program-transfor=* \
1119 | --program-transfo=* | --program-transf=* \
1120 | --program-trans=* | --program-tran=* \
1121 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001122 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001123
Martin v. Löwiseba40652007-08-30 20:10:57 +00001124 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1125 ac_prev=pdfdir ;;
1126 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1127 pdfdir=$ac_optarg ;;
1128
1129 -psdir | --psdir | --psdi | --psd | --ps)
1130 ac_prev=psdir ;;
1131 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1132 psdir=$ac_optarg ;;
1133
Guido van Rossum7f43da71994-08-01 12:15:30 +00001134 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1135 | -silent | --silent | --silen | --sile | --sil)
1136 silent=yes ;;
1137
Benjamin Peterson42e10292016-07-07 00:02:31 -07001138 -runstatedir | --runstatedir | --runstatedi | --runstated \
1139 | --runstate | --runstat | --runsta | --runst | --runs \
1140 | --run | --ru | --r)
1141 ac_prev=runstatedir ;;
1142 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1143 | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1144 | --run=* | --ru=* | --r=*)
1145 runstatedir=$ac_optarg ;;
1146
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001147 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1148 ac_prev=sbindir ;;
1149 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1150 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001151 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001152
1153 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1154 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1155 | --sharedst | --shareds | --shared | --share | --shar \
1156 | --sha | --sh)
1157 ac_prev=sharedstatedir ;;
1158 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1159 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1160 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1161 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001162 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001163
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001164 -site | --site | --sit)
1165 ac_prev=site ;;
1166 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001167 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001168
Guido van Rossum7f43da71994-08-01 12:15:30 +00001169 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1170 ac_prev=srcdir ;;
1171 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001172 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001173
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001174 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1175 | --syscon | --sysco | --sysc | --sys | --sy)
1176 ac_prev=sysconfdir ;;
1177 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1178 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001179 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001180
Guido van Rossum7f43da71994-08-01 12:15:30 +00001181 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001182 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001183 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001184 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001185
1186 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1187 verbose=yes ;;
1188
Martin v. Löwis11437992002-04-12 09:54:03 +00001189 -version | --version | --versio | --versi | --vers | -V)
1190 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001191
1192 -with-* | --with-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001193 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001194 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001195 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001196 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001197 ac_useropt_orig=$ac_useropt
1198 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1199 case $ac_user_opts in
1200 *"
1201"with_$ac_useropt"
1202"*) ;;
1203 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1204 ac_unrecognized_sep=', ';;
1205 esac
1206 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001207
1208 -without-* | --without-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001209 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001210 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001211 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001212 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001213 ac_useropt_orig=$ac_useropt
1214 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1215 case $ac_user_opts in
1216 *"
1217"with_$ac_useropt"
1218"*) ;;
1219 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1220 ac_unrecognized_sep=', ';;
1221 esac
1222 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001223
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001224 --x)
1225 # Obsolete; use --with-x.
1226 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001227
1228 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1229 | --x-incl | --x-inc | --x-in | --x-i)
1230 ac_prev=x_includes ;;
1231 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1232 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001233 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001234
1235 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1236 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1237 ac_prev=x_libraries ;;
1238 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1239 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001240 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001241
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001242 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1243Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001244 ;;
1245
Martin v. Löwis11437992002-04-12 09:54:03 +00001246 *=*)
1247 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1248 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001249 case $ac_envvar in #(
1250 '' | [0-9]* | *[!_$as_cr_alnum]* )
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001251 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001252 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001253 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001254 export $ac_envvar ;;
1255
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001256 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001257 # FIXME: should be removed in autoconf 3.0.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001258 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001259 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001260 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Matthias Klose3cef2a92012-03-14 23:39:33 +01001261 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001262 ;;
1263
1264 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001265done
1266
Guido van Rossum7f43da71994-08-01 12:15:30 +00001267if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001268 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001269 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001270fi
1271
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001272if test -n "$ac_unrecognized_opts"; then
1273 case $enable_option_checking in
1274 no) ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001275 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001276 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1277 esac
1278fi
1279
1280# Check all directory arguments for consistency.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001281for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1282 datadir sysconfdir sharedstatedir localstatedir includedir \
1283 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
Benjamin Peterson42e10292016-07-07 00:02:31 -07001284 libdir localedir mandir runstatedir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001285do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001286 eval ac_val=\$$ac_var
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001287 # Remove trailing slashes.
1288 case $ac_val in
1289 */ )
1290 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1291 eval $ac_var=\$ac_val;;
1292 esac
1293 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001294 case $ac_val in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001295 [\\/$]* | ?:[\\/]* ) continue;;
1296 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001297 esac
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001298 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001299done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001300
Martin v. Löwis11437992002-04-12 09:54:03 +00001301# There might be people who depend on the old broken behavior: `$host'
1302# used to hold the argument of --host etc.
1303# FIXME: To remove some day.
1304build=$build_alias
1305host=$host_alias
1306target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001307
Martin v. Löwis11437992002-04-12 09:54:03 +00001308# FIXME: To remove some day.
1309if test "x$host_alias" != x; then
1310 if test "x$build_alias" = x; then
1311 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001312 elif test "x$build_alias" != "x$host_alias"; then
1313 cross_compiling=yes
1314 fi
1315fi
1316
1317ac_tool_prefix=
1318test -n "$host_alias" && ac_tool_prefix=$host_alias-
1319
1320test "$silent" = yes && exec 6>/dev/null
1321
Guido van Rossum627b2d71993-12-24 10:39:16 +00001322
Martin v. Löwiseba40652007-08-30 20:10:57 +00001323ac_pwd=`pwd` && test -n "$ac_pwd" &&
1324ac_ls_di=`ls -di .` &&
1325ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001326 as_fn_error $? "working directory cannot be determined"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001327test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001328 as_fn_error $? "pwd does not report name of working directory"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001329
1330
Guido van Rossum627b2d71993-12-24 10:39:16 +00001331# Find the source files, if location was not specified.
1332if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001333 ac_srcdir_defaulted=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +00001334 # Try the directory containing this script, then the parent directory.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001335 ac_confdir=`$as_dirname -- "$as_myself" ||
1336$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1337 X"$as_myself" : 'X\(//\)[^/]' \| \
1338 X"$as_myself" : 'X\(//\)$' \| \
1339 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1340$as_echo X"$as_myself" |
Martin v. Löwiseba40652007-08-30 20:10:57 +00001341 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1342 s//\1/
1343 q
1344 }
1345 /^X\(\/\/\)[^/].*/{
1346 s//\1/
1347 q
1348 }
1349 /^X\(\/\/\)$/{
1350 s//\1/
1351 q
1352 }
1353 /^X\(\/\).*/{
1354 s//\1/
1355 q
1356 }
1357 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001358 srcdir=$ac_confdir
Martin v. Löwiseba40652007-08-30 20:10:57 +00001359 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001360 srcdir=..
1361 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001362else
1363 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001364fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001365if test ! -r "$srcdir/$ac_unique_file"; then
1366 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001367 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Brett Cannon19fab762007-06-02 03:02:29 +00001368fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001369ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1370ac_abs_confdir=`(
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001371 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001372 pwd)`
1373# When building in place, set srcdir=.
1374if test "$ac_abs_confdir" = "$ac_pwd"; then
1375 srcdir=.
1376fi
1377# Remove unnecessary trailing slashes from srcdir.
1378# Double slashes in file names in object file debugging info
1379# mess up M-x gdb in Emacs.
1380case $srcdir in
1381*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1382esac
1383for ac_var in $ac_precious_vars; do
1384 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1385 eval ac_env_${ac_var}_value=\$${ac_var}
1386 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1387 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1388done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001389
Martin v. Löwis11437992002-04-12 09:54:03 +00001390#
1391# Report the --help message.
1392#
1393if test "$ac_init_help" = "long"; then
1394 # Omit some internal or obsolete options to make the list less imposing.
1395 # This message is too long to be a string in the A/UX 3.1 sh.
1396 cat <<_ACEOF
Martin v. Löwis174440b2008-10-03 08:59:41 +00001397\`configure' configures python 2.7 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001398
1399Usage: $0 [OPTION]... [VAR=VALUE]...
1400
1401To assign environment variables (e.g., CC, CFLAGS...), specify them as
1402VAR=VALUE. See below for descriptions of some of the useful variables.
1403
1404Defaults for the options are specified in brackets.
1405
1406Configuration:
1407 -h, --help display this help and exit
1408 --help=short display options specific to this package
1409 --help=recursive display the short help of all the included packages
1410 -V, --version display version information and exit
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001411 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001412 --cache-file=FILE cache test results in FILE [disabled]
1413 -C, --config-cache alias for \`--cache-file=config.cache'
1414 -n, --no-create do not create output files
1415 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1416
Martin v. Löwis11437992002-04-12 09:54:03 +00001417Installation directories:
1418 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001419 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001420 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001421 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001422
1423By default, \`make install' will install all the files in
1424\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1425an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1426for instance \`--prefix=\$HOME'.
1427
1428For better control, use the options below.
1429
1430Fine tuning of the installation directories:
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001431 --bindir=DIR user executables [EPREFIX/bin]
1432 --sbindir=DIR system admin executables [EPREFIX/sbin]
1433 --libexecdir=DIR program executables [EPREFIX/libexec]
1434 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1435 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1436 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
Benjamin Peterson42e10292016-07-07 00:02:31 -07001437 --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001438 --libdir=DIR object code libraries [EPREFIX/lib]
1439 --includedir=DIR C header files [PREFIX/include]
1440 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1441 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1442 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1443 --infodir=DIR info documentation [DATAROOTDIR/info]
1444 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1445 --mandir=DIR man documentation [DATAROOTDIR/man]
1446 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1447 --htmldir=DIR html documentation [DOCDIR]
1448 --dvidir=DIR dvi documentation [DOCDIR]
1449 --pdfdir=DIR pdf documentation [DOCDIR]
1450 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001451_ACEOF
1452
1453 cat <<\_ACEOF
doko@python.orgd65e2ba2013-01-31 23:52:03 +01001454
1455System types:
1456 --build=BUILD configure for building on BUILD [guessed]
1457 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Gregory P. Smith794b2912016-09-08 00:07:40 -07001458 --target=TARGET configure for building compilers for TARGET [HOST]
Martin v. Löwis11437992002-04-12 09:54:03 +00001459_ACEOF
1460fi
1461
1462if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001463 case $ac_init_help in
Martin v. Löwis174440b2008-10-03 08:59:41 +00001464 short | recursive ) echo "Configuration of python 2.7:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001465 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001466 cat <<\_ACEOF
1467
1468Optional Features:
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001469 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001470 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1471 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Brett Cannon91a1dec2008-02-13 19:15:44 +00001472 --enable-universalsdk[=SDKDIR]
Brett Cannon9a8bb0e2008-02-03 02:07:55 +00001473 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001474 --enable-framework[=INSTALLDIR]
1475 Build (MacOSX|Darwin) framework
1476 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001477 --enable-profiling enable C-level code profiling
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)b9999152016-11-20 21:19:36 +00001478 --enable-optimizations Enable expensive optimizations (PGO, maybe LTO,
1479 etc). Disabled by default.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001480 --enable-toolbox-glue disable/enable MacOSX glue code for extensions
1481 --enable-ipv6 Enable ipv6 (with ipv4) support
1482 --disable-ipv6 Disable ipv6 support
Mark Dickinsonefc82f72009-03-20 15:51:55 +00001483 --enable-big-digits[=BITS]
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001484 use big digits for Python longs [[BITS=30]]
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001485 --enable-unicode[=ucs[24]]
Benjamin Peterson66556b02010-05-25 02:23:32 +00001486 Enable Unicode strings (default is ucs2)
Martin v. Löwis11437992002-04-12 09:54:03 +00001487
1488Optional Packages:
1489 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1490 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001491 --with-universal-archs=ARCH
1492 select architectures for universal build ("32-bit",
Ronald Oussoren23d92532009-09-07 06:12:00 +00001493 "64-bit", "3-way", "intel" or "all")
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001494 --with-framework-name=FRAMEWORK
1495 specify an alternate name of the framework built
1496 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001497 --without-gcc never use gcc
Zachary Ware6ed42ea2015-12-21 11:43:03 -06001498 --with-icc build with icc
Martin v. Löwis0f48d982006-04-14 14:34:26 +00001499 --with-cxx-main=<compiler>
1500 compile main() and link python executable with C++
1501 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001502 --with-suffix=.exe set executable suffix
1503 --with-pydebug build with Py_DEBUG defined
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)c543a0f2016-06-02 23:44:40 +00001504 --with-lto Enable Link Time Optimization in PGO builds.
1505 Disabled by default.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001506 --with-libs='lib1 ...' link against additional libs
Benjamin Peterson2c196742009-12-31 03:17:18 +00001507 --with-system-expat build pyexpat module using an installed expat
1508 library
Martin v. Löwis9176fc12006-04-11 11:12:43 +00001509 --with-system-ffi build _ctypes module using an installed ffi library
Ned Deilya2a9f572013-10-25 00:30:10 -07001510 --with-tcltk-includes='-I...'
1511 override search for Tcl and Tk include files
1512 --with-tcltk-libs='-L...'
1513 override search for Tcl and Tk libs
Benjamin Peterson867475c2009-04-29 20:36:25 +00001514 --with-dbmliborder=db1:db2:...
1515 order to check db backends for dbm. Valid value is a
1516 colon separated string with the backend names
1517 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001518 --with-signal-module disable/enable signal module
1519 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1520 --with(out)-threads[=DIRECTORY]
1521 disable/enable thread support
1522 --with(out)-thread[=DIRECTORY]
1523 deprecated; use --with(out)-threads
1524 --with-pth use GNU pth threading libraries
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001525 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001526 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001527 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00001528 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001529 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001530 --with-fpectl enable SIGFPE catching
1531 --with-libm=STRING math library
1532 --with-libc=STRING C library
Benjamin Peterson2c992a02015-05-28 12:45:31 -05001533 --with(out)-computed-gotos
1534 Use computed gotos in evaluation loop (enabled by
1535 default on supported compilers)
Ned Deily3f1d0b32014-11-20 02:11:03 -08001536 --with(out)-ensurepip=[=OPTION]
1537 "install" or "upgrade" using bundled pip, default is
1538 "no"
Martin v. Löwis11437992002-04-12 09:54:03 +00001539
1540Some influential environment variables:
1541 CC C compiler command
1542 CFLAGS C compiler flags
1543 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1544 nonstandard directory <lib dir>
Martin v. Löwiseba40652007-08-30 20:10:57 +00001545 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001546 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Martin v. Löwiseba40652007-08-30 20:10:57 +00001547 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001548 CPP C preprocessor
Benjamin Peterson64e8f6e2014-12-15 00:00:23 -05001549 PKG_CONFIG path to pkg-config utility
1550 PKG_CONFIG_PATH
1551 directories to add to pkg-config's search path
1552 PKG_CONFIG_LIBDIR
1553 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001554
1555Use these variables to override the choices made by `configure' or to help
1556it to find libraries and programs with nonstandard names/locations.
1557
Benjamin Petersoncc8929b2016-08-03 22:01:32 -07001558Report bugs to <https://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001559_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001560ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001561fi
1562
1563if test "$ac_init_help" = "recursive"; then
1564 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001565 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001566 test -d "$ac_dir" ||
1567 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1568 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001569 ac_builddir=.
1570
Martin v. Löwiseba40652007-08-30 20:10:57 +00001571case "$ac_dir" in
1572.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1573*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001574 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001575 # A ".." for each directory in $ac_dir_suffix.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001576 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001577 case $ac_top_builddir_sub in
1578 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1579 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1580 esac ;;
1581esac
1582ac_abs_top_builddir=$ac_pwd
1583ac_abs_builddir=$ac_pwd$ac_dir_suffix
1584# for backward compatibility:
1585ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001586
1587case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001588 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001589 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001590 ac_top_srcdir=$ac_top_builddir_sub
1591 ac_abs_top_srcdir=$ac_pwd ;;
1592 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001593 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001594 ac_top_srcdir=$srcdir
1595 ac_abs_top_srcdir=$srcdir ;;
1596 *) # Relative name.
1597 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1598 ac_top_srcdir=$ac_top_build_prefix$srcdir
1599 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001600esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001601ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001602
Martin v. Löwiseba40652007-08-30 20:10:57 +00001603 cd "$ac_dir" || { ac_status=$?; continue; }
1604 # Check for guested configure.
1605 if test -f "$ac_srcdir/configure.gnu"; then
1606 echo &&
1607 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1608 elif test -f "$ac_srcdir/configure"; then
1609 echo &&
1610 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001611 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001612 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001613 fi || ac_status=$?
1614 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001615 done
1616fi
1617
Martin v. Löwiseba40652007-08-30 20:10:57 +00001618test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001619if $ac_init_version; then
1620 cat <<\_ACEOF
Martin v. Löwis174440b2008-10-03 08:59:41 +00001621python configure 2.7
Charles-François Natalibe2b9072013-01-08 19:47:00 +01001622generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001623
Charles-François Natalibe2b9072013-01-08 19:47:00 +01001624Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001625This configure script is free software; the Free Software Foundation
1626gives unlimited permission to copy, distribute and modify it.
1627_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001628 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001629fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001630
1631## ------------------------ ##
1632## Autoconf initialization. ##
1633## ------------------------ ##
1634
1635# ac_fn_c_try_compile LINENO
1636# --------------------------
1637# Try to compile conftest.$ac_ext, and return whether this succeeded.
1638ac_fn_c_try_compile ()
1639{
1640 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1641 rm -f conftest.$ac_objext
1642 if { { ac_try="$ac_compile"
1643case "(($ac_try" in
1644 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1645 *) ac_try_echo=$ac_try;;
1646esac
1647eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1648$as_echo "$ac_try_echo"; } >&5
1649 (eval "$ac_compile") 2>conftest.err
1650 ac_status=$?
1651 if test -s conftest.err; then
1652 grep -v '^ *+' conftest.err >conftest.er1
1653 cat conftest.er1 >&5
1654 mv -f conftest.er1 conftest.err
1655 fi
1656 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1657 test $ac_status = 0; } && {
1658 test -z "$ac_c_werror_flag" ||
1659 test ! -s conftest.err
1660 } && test -s conftest.$ac_objext; then :
1661 ac_retval=0
1662else
1663 $as_echo "$as_me: failed program was:" >&5
1664sed 's/^/| /' conftest.$ac_ext >&5
1665
1666 ac_retval=1
1667fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01001668 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001669 as_fn_set_status $ac_retval
1670
1671} # ac_fn_c_try_compile
1672
1673# ac_fn_c_try_cpp LINENO
1674# ----------------------
1675# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1676ac_fn_c_try_cpp ()
1677{
1678 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1679 if { { ac_try="$ac_cpp conftest.$ac_ext"
1680case "(($ac_try" in
1681 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1682 *) ac_try_echo=$ac_try;;
1683esac
1684eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1685$as_echo "$ac_try_echo"; } >&5
1686 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1687 ac_status=$?
1688 if test -s conftest.err; then
1689 grep -v '^ *+' conftest.err >conftest.er1
1690 cat conftest.er1 >&5
1691 mv -f conftest.er1 conftest.err
1692 fi
1693 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001694 test $ac_status = 0; } > conftest.i && {
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001695 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1696 test ! -s conftest.err
1697 }; then :
1698 ac_retval=0
1699else
1700 $as_echo "$as_me: failed program was:" >&5
1701sed 's/^/| /' conftest.$ac_ext >&5
1702
1703 ac_retval=1
1704fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01001705 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001706 as_fn_set_status $ac_retval
1707
1708} # ac_fn_c_try_cpp
1709
1710# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1711# -------------------------------------------------------
1712# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1713# the include files in INCLUDES and setting the cache variable VAR
1714# accordingly.
1715ac_fn_c_check_header_mongrel ()
1716{
1717 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Matthias Klose3cef2a92012-03-14 23:39:33 +01001718 if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001719 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1720$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001721if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001722 $as_echo_n "(cached) " >&6
1723fi
1724eval ac_res=\$$3
1725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1726$as_echo "$ac_res" >&6; }
1727else
1728 # Is the header compilable?
1729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1730$as_echo_n "checking $2 usability... " >&6; }
1731cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1732/* end confdefs.h. */
1733$4
1734#include <$2>
1735_ACEOF
1736if ac_fn_c_try_compile "$LINENO"; then :
1737 ac_header_compiler=yes
1738else
1739 ac_header_compiler=no
1740fi
1741rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1742{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1743$as_echo "$ac_header_compiler" >&6; }
1744
1745# Is the header present?
1746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1747$as_echo_n "checking $2 presence... " >&6; }
1748cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1749/* end confdefs.h. */
1750#include <$2>
1751_ACEOF
1752if ac_fn_c_try_cpp "$LINENO"; then :
1753 ac_header_preproc=yes
1754else
1755 ac_header_preproc=no
1756fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001757rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001758{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1759$as_echo "$ac_header_preproc" >&6; }
1760
1761# So? What about this header?
1762case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1763 yes:no: )
1764 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1765$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1766 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1767$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1768 ;;
1769 no:yes:* )
1770 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1771$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1772 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1773$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1774 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1775$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1776 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1777$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1778 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1779$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Benjamin Petersoncc8929b2016-08-03 22:01:32 -07001780( $as_echo "## --------------------------------------- ##
1781## Report this to https://bugs.python.org/ ##
1782## --------------------------------------- ##"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001783 ) | sed "s/^/$as_me: WARNING: /" >&2
1784 ;;
1785esac
1786 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1787$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001788if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001789 $as_echo_n "(cached) " >&6
1790else
1791 eval "$3=\$ac_header_compiler"
1792fi
1793eval ac_res=\$$3
1794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1795$as_echo "$ac_res" >&6; }
1796fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01001797 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001798
1799} # ac_fn_c_check_header_mongrel
1800
1801# ac_fn_c_try_run LINENO
1802# ----------------------
1803# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1804# that executables *can* be run.
1805ac_fn_c_try_run ()
1806{
1807 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1808 if { { ac_try="$ac_link"
1809case "(($ac_try" in
1810 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1811 *) ac_try_echo=$ac_try;;
1812esac
1813eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1814$as_echo "$ac_try_echo"; } >&5
1815 (eval "$ac_link") 2>&5
1816 ac_status=$?
1817 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1818 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1819 { { case "(($ac_try" in
1820 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1821 *) ac_try_echo=$ac_try;;
1822esac
1823eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1824$as_echo "$ac_try_echo"; } >&5
1825 (eval "$ac_try") 2>&5
1826 ac_status=$?
1827 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1828 test $ac_status = 0; }; }; then :
1829 ac_retval=0
1830else
1831 $as_echo "$as_me: program exited with status $ac_status" >&5
1832 $as_echo "$as_me: failed program was:" >&5
1833sed 's/^/| /' conftest.$ac_ext >&5
1834
1835 ac_retval=$ac_status
1836fi
1837 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Matthias Klose3cef2a92012-03-14 23:39:33 +01001838 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001839 as_fn_set_status $ac_retval
1840
1841} # ac_fn_c_try_run
1842
1843# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1844# -------------------------------------------------------
1845# Tests whether HEADER exists and can be compiled using the include files in
1846# INCLUDES, setting the cache variable VAR accordingly.
1847ac_fn_c_check_header_compile ()
1848{
1849 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1850 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1851$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001852if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001853 $as_echo_n "(cached) " >&6
1854else
1855 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1856/* end confdefs.h. */
1857$4
1858#include <$2>
1859_ACEOF
1860if ac_fn_c_try_compile "$LINENO"; then :
1861 eval "$3=yes"
1862else
1863 eval "$3=no"
1864fi
1865rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1866fi
1867eval ac_res=\$$3
1868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1869$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001870 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001871
1872} # ac_fn_c_check_header_compile
1873
1874# ac_fn_c_try_link LINENO
1875# -----------------------
1876# Try to link conftest.$ac_ext, and return whether this succeeded.
1877ac_fn_c_try_link ()
1878{
1879 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1880 rm -f conftest.$ac_objext conftest$ac_exeext
1881 if { { ac_try="$ac_link"
1882case "(($ac_try" in
1883 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1884 *) ac_try_echo=$ac_try;;
1885esac
1886eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1887$as_echo "$ac_try_echo"; } >&5
1888 (eval "$ac_link") 2>conftest.err
1889 ac_status=$?
1890 if test -s conftest.err; then
1891 grep -v '^ *+' conftest.err >conftest.er1
1892 cat conftest.er1 >&5
1893 mv -f conftest.er1 conftest.err
1894 fi
1895 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1896 test $ac_status = 0; } && {
1897 test -z "$ac_c_werror_flag" ||
1898 test ! -s conftest.err
1899 } && test -s conftest$ac_exeext && {
1900 test "$cross_compiling" = yes ||
Charles-François Natalibe2b9072013-01-08 19:47:00 +01001901 test -x conftest$ac_exeext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001902 }; then :
1903 ac_retval=0
1904else
1905 $as_echo "$as_me: failed program was:" >&5
1906sed 's/^/| /' conftest.$ac_ext >&5
1907
1908 ac_retval=1
1909fi
1910 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1911 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1912 # interfere with the next link command; also delete a directory that is
1913 # left behind by Apple's compiler. We do this before executing the actions.
1914 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Matthias Klose3cef2a92012-03-14 23:39:33 +01001915 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001916 as_fn_set_status $ac_retval
1917
1918} # ac_fn_c_try_link
1919
1920# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1921# -------------------------------------------
1922# Tests whether TYPE exists after having included INCLUDES, setting cache
1923# variable VAR accordingly.
1924ac_fn_c_check_type ()
1925{
1926 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1927 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1928$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001929if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001930 $as_echo_n "(cached) " >&6
1931else
1932 eval "$3=no"
1933 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1934/* end confdefs.h. */
1935$4
1936int
1937main ()
1938{
1939if (sizeof ($2))
1940 return 0;
1941 ;
1942 return 0;
1943}
1944_ACEOF
1945if ac_fn_c_try_compile "$LINENO"; then :
1946 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1947/* end confdefs.h. */
1948$4
1949int
1950main ()
1951{
1952if (sizeof (($2)))
1953 return 0;
1954 ;
1955 return 0;
1956}
1957_ACEOF
1958if ac_fn_c_try_compile "$LINENO"; then :
1959
1960else
1961 eval "$3=yes"
1962fi
1963rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1964fi
1965rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1966fi
1967eval ac_res=\$$3
1968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1969$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001970 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001971
1972} # ac_fn_c_check_type
1973
1974# ac_fn_c_find_uintX_t LINENO BITS VAR
1975# ------------------------------------
1976# Finds an unsigned integer type with width BITS, setting cache variable VAR
1977# accordingly.
1978ac_fn_c_find_uintX_t ()
1979{
1980 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1981 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1982$as_echo_n "checking for uint$2_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001983if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001984 $as_echo_n "(cached) " >&6
1985else
1986 eval "$3=no"
1987 # Order is important - never check a type that is potentially smaller
1988 # than half of the expected target width.
1989 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1990 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1991 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1992/* end confdefs.h. */
1993$ac_includes_default
1994int
1995main ()
1996{
1997static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01001998test_array [0] = 0;
1999return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002000
2001 ;
2002 return 0;
2003}
2004_ACEOF
2005if ac_fn_c_try_compile "$LINENO"; then :
2006 case $ac_type in #(
2007 uint$2_t) :
2008 eval "$3=yes" ;; #(
2009 *) :
2010 eval "$3=\$ac_type" ;;
2011esac
2012fi
2013rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002014 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002015
2016else
2017 break
2018fi
2019 done
2020fi
2021eval ac_res=\$$3
2022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2023$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002024 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002025
2026} # ac_fn_c_find_uintX_t
2027
2028# ac_fn_c_find_intX_t LINENO BITS VAR
2029# -----------------------------------
2030# Finds a signed integer type with width BITS, setting cache variable VAR
2031# accordingly.
2032ac_fn_c_find_intX_t ()
2033{
2034 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2035 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
2036$as_echo_n "checking for int$2_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002037if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002038 $as_echo_n "(cached) " >&6
2039else
2040 eval "$3=no"
2041 # Order is important - never check a type that is potentially smaller
2042 # than half of the expected target width.
2043 for ac_type in int$2_t 'int' 'long int' \
2044 'long long int' 'short int' 'signed char'; do
2045 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2046/* end confdefs.h. */
2047$ac_includes_default
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002048 enum { N = $2 / 2 - 1 };
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002049int
2050main ()
2051{
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002052static 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 +01002053test_array [0] = 0;
2054return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002055
2056 ;
2057 return 0;
2058}
2059_ACEOF
2060if ac_fn_c_try_compile "$LINENO"; then :
2061 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2062/* end confdefs.h. */
2063$ac_includes_default
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002064 enum { N = $2 / 2 - 1 };
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002065int
2066main ()
2067{
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002068static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002069 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002070test_array [0] = 0;
2071return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002072
2073 ;
2074 return 0;
2075}
2076_ACEOF
2077if ac_fn_c_try_compile "$LINENO"; then :
2078
2079else
2080 case $ac_type in #(
2081 int$2_t) :
2082 eval "$3=yes" ;; #(
2083 *) :
2084 eval "$3=\$ac_type" ;;
2085esac
2086fi
2087rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2088fi
2089rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002090 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002091
2092else
2093 break
2094fi
2095 done
2096fi
2097eval ac_res=\$$3
2098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2099$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002100 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002101
2102} # ac_fn_c_find_intX_t
2103
2104# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2105# --------------------------------------------
2106# Tries to find the compile-time value of EXPR in a program that includes
2107# INCLUDES, setting VAR accordingly. Returns whether the value could be
2108# computed
2109ac_fn_c_compute_int ()
2110{
2111 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2112 if test "$cross_compiling" = yes; then
2113 # Depending upon the size, compute the lo and hi bounds.
2114cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2115/* end confdefs.h. */
2116$4
2117int
2118main ()
2119{
2120static int test_array [1 - 2 * !(($2) >= 0)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002121test_array [0] = 0;
2122return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002123
2124 ;
2125 return 0;
2126}
2127_ACEOF
2128if ac_fn_c_try_compile "$LINENO"; then :
2129 ac_lo=0 ac_mid=0
2130 while :; do
2131 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2132/* end confdefs.h. */
2133$4
2134int
2135main ()
2136{
2137static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002138test_array [0] = 0;
2139return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002140
2141 ;
2142 return 0;
2143}
2144_ACEOF
2145if ac_fn_c_try_compile "$LINENO"; then :
2146 ac_hi=$ac_mid; break
2147else
2148 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2149 if test $ac_lo -le $ac_mid; then
2150 ac_lo= ac_hi=
2151 break
2152 fi
2153 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2154fi
2155rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2156 done
2157else
2158 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2159/* end confdefs.h. */
2160$4
2161int
2162main ()
2163{
2164static int test_array [1 - 2 * !(($2) < 0)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002165test_array [0] = 0;
2166return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002167
2168 ;
2169 return 0;
2170}
2171_ACEOF
2172if ac_fn_c_try_compile "$LINENO"; then :
2173 ac_hi=-1 ac_mid=-1
2174 while :; do
2175 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2176/* end confdefs.h. */
2177$4
2178int
2179main ()
2180{
2181static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002182test_array [0] = 0;
2183return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002184
2185 ;
2186 return 0;
2187}
2188_ACEOF
2189if ac_fn_c_try_compile "$LINENO"; then :
2190 ac_lo=$ac_mid; break
2191else
2192 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2193 if test $ac_mid -le $ac_hi; then
2194 ac_lo= ac_hi=
2195 break
2196 fi
2197 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2198fi
2199rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2200 done
2201else
2202 ac_lo= ac_hi=
2203fi
2204rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2205fi
2206rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2207# Binary search between lo and hi bounds.
2208while test "x$ac_lo" != "x$ac_hi"; do
2209 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2210 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2211/* end confdefs.h. */
2212$4
2213int
2214main ()
2215{
2216static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002217test_array [0] = 0;
2218return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002219
2220 ;
2221 return 0;
2222}
2223_ACEOF
2224if ac_fn_c_try_compile "$LINENO"; then :
2225 ac_hi=$ac_mid
2226else
2227 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2228fi
2229rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2230done
2231case $ac_lo in #((
2232?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2233'') ac_retval=1 ;;
2234esac
2235 else
2236 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2237/* end confdefs.h. */
2238$4
2239static long int longval () { return $2; }
2240static unsigned long int ulongval () { return $2; }
2241#include <stdio.h>
2242#include <stdlib.h>
2243int
2244main ()
2245{
2246
2247 FILE *f = fopen ("conftest.val", "w");
2248 if (! f)
2249 return 1;
2250 if (($2) < 0)
2251 {
2252 long int i = longval ();
2253 if (i != ($2))
2254 return 1;
2255 fprintf (f, "%ld", i);
2256 }
2257 else
2258 {
2259 unsigned long int i = ulongval ();
2260 if (i != ($2))
2261 return 1;
2262 fprintf (f, "%lu", i);
2263 }
2264 /* Do not output a trailing newline, as this causes \r\n confusion
2265 on some platforms. */
2266 return ferror (f) || fclose (f) != 0;
2267
2268 ;
2269 return 0;
2270}
2271_ACEOF
2272if ac_fn_c_try_run "$LINENO"; then :
2273 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2274else
2275 ac_retval=1
2276fi
2277rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2278 conftest.$ac_objext conftest.beam conftest.$ac_ext
2279rm -f conftest.val
2280
2281 fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01002282 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002283 as_fn_set_status $ac_retval
2284
2285} # ac_fn_c_compute_int
2286
2287# ac_fn_c_check_func LINENO FUNC VAR
2288# ----------------------------------
2289# Tests whether FUNC exists, setting the cache variable VAR accordingly
2290ac_fn_c_check_func ()
2291{
2292 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2293 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2294$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002295if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002296 $as_echo_n "(cached) " >&6
2297else
2298 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2299/* end confdefs.h. */
2300/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2301 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2302#define $2 innocuous_$2
2303
2304/* System header to define __stub macros and hopefully few prototypes,
2305 which can conflict with char $2 (); below.
2306 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2307 <limits.h> exists even on freestanding compilers. */
2308
2309#ifdef __STDC__
2310# include <limits.h>
2311#else
2312# include <assert.h>
2313#endif
2314
2315#undef $2
2316
2317/* Override any GCC internal prototype to avoid an error.
2318 Use char because int might match the return type of a GCC
2319 builtin and then its argument prototype would still apply. */
2320#ifdef __cplusplus
2321extern "C"
2322#endif
2323char $2 ();
2324/* The GNU C library defines this for functions which it implements
2325 to always fail with ENOSYS. Some functions are actually named
2326 something starting with __ and the normal name is an alias. */
2327#if defined __stub_$2 || defined __stub___$2
2328choke me
2329#endif
2330
2331int
2332main ()
2333{
2334return $2 ();
2335 ;
2336 return 0;
2337}
2338_ACEOF
2339if ac_fn_c_try_link "$LINENO"; then :
2340 eval "$3=yes"
2341else
2342 eval "$3=no"
2343fi
2344rm -f core conftest.err conftest.$ac_objext \
2345 conftest$ac_exeext conftest.$ac_ext
2346fi
2347eval ac_res=\$$3
2348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2349$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002350 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002351
2352} # ac_fn_c_check_func
2353
2354# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2355# ----------------------------------------------------
2356# Tries to find if the field MEMBER exists in type AGGR, after including
2357# INCLUDES, setting cache variable VAR accordingly.
2358ac_fn_c_check_member ()
2359{
2360 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2361 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2362$as_echo_n "checking for $2.$3... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002363if eval \${$4+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002364 $as_echo_n "(cached) " >&6
2365else
2366 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2367/* end confdefs.h. */
2368$5
2369int
2370main ()
2371{
2372static $2 ac_aggr;
2373if (ac_aggr.$3)
2374return 0;
2375 ;
2376 return 0;
2377}
2378_ACEOF
2379if ac_fn_c_try_compile "$LINENO"; then :
2380 eval "$4=yes"
2381else
2382 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2383/* end confdefs.h. */
2384$5
2385int
2386main ()
2387{
2388static $2 ac_aggr;
2389if (sizeof ac_aggr.$3)
2390return 0;
2391 ;
2392 return 0;
2393}
2394_ACEOF
2395if ac_fn_c_try_compile "$LINENO"; then :
2396 eval "$4=yes"
2397else
2398 eval "$4=no"
2399fi
2400rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2401fi
2402rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2403fi
2404eval ac_res=\$$4
2405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2406$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002407 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002408
2409} # ac_fn_c_check_member
2410
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002411# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2412# ---------------------------------------------
2413# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2414# accordingly.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002415ac_fn_c_check_decl ()
2416{
2417 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002418 as_decl_name=`echo $2|sed 's/ *(.*//'`
2419 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2420 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2421$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002422if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002423 $as_echo_n "(cached) " >&6
2424else
2425 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2426/* end confdefs.h. */
2427$4
2428int
2429main ()
2430{
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002431#ifndef $as_decl_name
2432#ifdef __cplusplus
2433 (void) $as_decl_use;
2434#else
2435 (void) $as_decl_name;
2436#endif
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002437#endif
2438
2439 ;
2440 return 0;
2441}
2442_ACEOF
2443if ac_fn_c_try_compile "$LINENO"; then :
2444 eval "$3=yes"
2445else
2446 eval "$3=no"
2447fi
2448rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2449fi
2450eval ac_res=\$$3
2451 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2452$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002453 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002454
2455} # ac_fn_c_check_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +00002456cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002457This file contains any messages produced by compilers while
2458running configure, to aid debugging if configure makes a mistake.
2459
Martin v. Löwis174440b2008-10-03 08:59:41 +00002460It was created by python $as_me 2.7, which was
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002461generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002462
2463 $ $0 $@
2464
2465_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00002466exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002467{
2468cat <<_ASUNAME
2469## --------- ##
2470## Platform. ##
2471## --------- ##
2472
2473hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2474uname -m = `(uname -m) 2>/dev/null || echo unknown`
2475uname -r = `(uname -r) 2>/dev/null || echo unknown`
2476uname -s = `(uname -s) 2>/dev/null || echo unknown`
2477uname -v = `(uname -v) 2>/dev/null || echo unknown`
2478
2479/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2480/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2481
2482/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2483/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2484/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Martin v. Löwiseba40652007-08-30 20:10:57 +00002485/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002486/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2487/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2488/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2489
2490_ASUNAME
2491
2492as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2493for as_dir in $PATH
2494do
2495 IFS=$as_save_IFS
2496 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002497 $as_echo "PATH: $as_dir"
2498 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002499IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002500
2501} >&5
2502
2503cat >&5 <<_ACEOF
2504
2505
2506## ----------- ##
2507## Core tests. ##
2508## ----------- ##
2509
2510_ACEOF
2511
2512
2513# Keep a trace of the command line.
2514# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002515# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002516# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002517# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002518ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002519ac_configure_args0=
2520ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002521ac_must_keep_next=false
2522for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002523do
Skip Montanaro6dead952003-09-25 14:50:04 +00002524 for ac_arg
2525 do
2526 case $ac_arg in
2527 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2528 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2529 | -silent | --silent | --silen | --sile | --sil)
2530 continue ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002531 *\'*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002532 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002533 esac
2534 case $ac_pass in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002535 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002536 2)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002537 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002538 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002539 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002540 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002541 case $ac_arg in
2542 *=* | --config-cache | -C | -disable-* | --disable-* \
2543 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2544 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2545 | -with-* | --with-* | -without-* | --without-* | --x)
2546 case "$ac_configure_args0 " in
2547 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2548 esac
2549 ;;
2550 -* ) ac_must_keep_next=true ;;
2551 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002552 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002553 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002554 ;;
2555 esac
2556 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002557done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002558{ ac_configure_args0=; unset ac_configure_args0;}
2559{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002560
2561# When interrupted or exit'd, cleanup temporary files, and complete
2562# config.log. We remove comments because anyway the quotes in there
2563# would cause problems or look ugly.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002564# WARNING: Use '\'' to represent an apostrophe within the trap.
2565# 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 +00002566trap 'exit_status=$?
2567 # Save into config.log some information that might help in debugging.
2568 {
2569 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002570
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002571 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002572## Cache variables. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002573## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002574 echo
2575 # The following way of writing the cache mishandles newlines in values,
Martin v. Löwiseba40652007-08-30 20:10:57 +00002576(
2577 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2578 eval ac_val=\$$ac_var
2579 case $ac_val in #(
2580 *${as_nl}*)
2581 case $ac_var in #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002582 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2583$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002584 esac
2585 case $ac_var in #(
2586 _ | IFS | as_nl) ;; #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002587 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2588 *) { eval $ac_var=; unset $ac_var;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002589 esac ;;
2590 esac
2591 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002592 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +00002593 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2594 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002595 sed -n \
Martin v. Löwiseba40652007-08-30 20:10:57 +00002596 "s/'\''/'\''\\\\'\'''\''/g;
2597 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2598 ;; #(
Skip Montanaro89e975f2007-08-22 19:05:21 +00002599 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00002600 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaro89e975f2007-08-22 19:05:21 +00002601 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002602 esac |
2603 sort
2604)
Martin v. Löwis11437992002-04-12 09:54:03 +00002605 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002606
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002607 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002608## Output variables. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002609## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002610 echo
2611 for ac_var in $ac_subst_vars
2612 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002613 eval ac_val=\$$ac_var
2614 case $ac_val in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002615 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002616 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002617 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002618 done | sort
2619 echo
2620
2621 if test -n "$ac_subst_files"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002622 $as_echo "## ------------------- ##
Martin v. Löwiseba40652007-08-30 20:10:57 +00002623## File substitutions. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002624## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002625 echo
2626 for ac_var in $ac_subst_files
2627 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002628 eval ac_val=\$$ac_var
2629 case $ac_val in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002630 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002631 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002632 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002633 done | sort
2634 echo
2635 fi
2636
Martin v. Löwis11437992002-04-12 09:54:03 +00002637 if test -s confdefs.h; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002638 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002639## confdefs.h. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002640## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002641 echo
Martin v. Löwiseba40652007-08-30 20:10:57 +00002642 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002643 echo
2644 fi
2645 test "$ac_signal" != 0 &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002646 $as_echo "$as_me: caught signal $ac_signal"
2647 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002648 } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002649 rm -f core *.core core.conftest.* &&
2650 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002651 exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +00002652' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002653for ac_signal in 1 2 13 15; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002654 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002655done
2656ac_signal=0
2657
2658# confdefs.h avoids OS command line length limits that DEFS can exceed.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002659rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002660
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002661$as_echo "/* confdefs.h */" > confdefs.h
2662
Martin v. Löwis11437992002-04-12 09:54:03 +00002663# Predefined preprocessor variables.
2664
2665cat >>confdefs.h <<_ACEOF
2666#define PACKAGE_NAME "$PACKAGE_NAME"
2667_ACEOF
2668
Martin v. Löwis11437992002-04-12 09:54:03 +00002669cat >>confdefs.h <<_ACEOF
2670#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2671_ACEOF
2672
Martin v. Löwis11437992002-04-12 09:54:03 +00002673cat >>confdefs.h <<_ACEOF
2674#define PACKAGE_VERSION "$PACKAGE_VERSION"
2675_ACEOF
2676
Martin v. Löwis11437992002-04-12 09:54:03 +00002677cat >>confdefs.h <<_ACEOF
2678#define PACKAGE_STRING "$PACKAGE_STRING"
2679_ACEOF
2680
Martin v. Löwis11437992002-04-12 09:54:03 +00002681cat >>confdefs.h <<_ACEOF
2682#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2683_ACEOF
2684
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002685cat >>confdefs.h <<_ACEOF
2686#define PACKAGE_URL "$PACKAGE_URL"
2687_ACEOF
2688
Martin v. Löwis11437992002-04-12 09:54:03 +00002689
2690# Let the site file select an alternate cache file if it wants to.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002691# Prefer an explicitly selected file to automatically selected ones.
2692ac_site_file1=NONE
2693ac_site_file2=NONE
Martin v. Löwiseba40652007-08-30 20:10:57 +00002694if test -n "$CONFIG_SITE"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002695 # We do not want a PATH search for config.site.
2696 case $CONFIG_SITE in #((
2697 -*) ac_site_file1=./$CONFIG_SITE;;
2698 */*) ac_site_file1=$CONFIG_SITE;;
2699 *) ac_site_file1=./$CONFIG_SITE;;
2700 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00002701elif test "x$prefix" != xNONE; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002702 ac_site_file1=$prefix/share/config.site
2703 ac_site_file2=$prefix/etc/config.site
Martin v. Löwiseba40652007-08-30 20:10:57 +00002704else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002705 ac_site_file1=$ac_default_prefix/share/config.site
2706 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002707fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002708for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Martin v. Löwiseba40652007-08-30 20:10:57 +00002709do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002710 test "x$ac_site_file" = xNONE && continue
2711 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2712 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2713$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002714 sed 's/^/| /' "$ac_site_file" >&5
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002715 . "$ac_site_file" \
2716 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2717$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2718as_fn_error $? "failed to load site script $ac_site_file
Matthias Klose3cef2a92012-03-14 23:39:33 +01002719See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002720 fi
2721done
2722
2723if test -r "$cache_file"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002724 # Some versions of bash will fail to source /dev/null (special files
2725 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2726 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2727 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2728$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002729 case $cache_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00002730 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2731 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002732 esac
2733 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002734else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002735 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2736$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002737 >$cache_file
2738fi
2739
2740# Check that the precious variables saved in the cache have kept the same
2741# value.
2742ac_cache_corrupted=false
Martin v. Löwiseba40652007-08-30 20:10:57 +00002743for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002744 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2745 eval ac_new_set=\$ac_env_${ac_var}_set
Martin v. Löwiseba40652007-08-30 20:10:57 +00002746 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2747 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002748 case $ac_old_set,$ac_new_set in
2749 set,)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002750 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2751$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 +00002752 ac_cache_corrupted=: ;;
2753 ,set)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002754 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2755$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002756 ac_cache_corrupted=: ;;
2757 ,);;
2758 *)
2759 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002760 # differences in whitespace do not lead to failure.
2761 ac_old_val_w=`echo x $ac_old_val`
2762 ac_new_val_w=`echo x $ac_new_val`
2763 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2764 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2765$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2766 ac_cache_corrupted=:
2767 else
2768 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2769$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2770 eval $ac_var=\$ac_old_val
2771 fi
2772 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2773$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2774 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2775$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002776 fi;;
2777 esac
2778 # Pass precious variables to config.status.
2779 if test "$ac_new_set" = set; then
2780 case $ac_new_val in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002781 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002782 *) ac_arg=$ac_var=$ac_new_val ;;
2783 esac
2784 case " $ac_configure_args " in
2785 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002786 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002787 esac
2788 fi
2789done
2790if $ac_cache_corrupted; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002791 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2792$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2793 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2794$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002795 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002796fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002797## -------------------- ##
2798## Main body of script. ##
2799## -------------------- ##
Martin v. Löwiseba40652007-08-30 20:10:57 +00002800
Guido van Rossum7f43da71994-08-01 12:15:30 +00002801ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002802ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002803ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2804ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2805ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002806
Guido van Rossum627b2d71993-12-24 10:39:16 +00002807
Michael W. Hudson54241132001-12-07 15:38:26 +00002808
Martin v. Löwiseba40652007-08-30 20:10:57 +00002809ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002810
2811
doko@python.orgd65e2ba2013-01-31 23:52:03 +01002812ac_aux_dir=
2813for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2814 if test -f "$ac_dir/install-sh"; then
2815 ac_aux_dir=$ac_dir
2816 ac_install_sh="$ac_aux_dir/install-sh -c"
2817 break
2818 elif test -f "$ac_dir/install.sh"; then
2819 ac_aux_dir=$ac_dir
2820 ac_install_sh="$ac_aux_dir/install.sh -c"
2821 break
2822 elif test -f "$ac_dir/shtool"; then
2823 ac_aux_dir=$ac_dir
2824 ac_install_sh="$ac_aux_dir/shtool install -c"
2825 break
2826 fi
2827done
2828if test -z "$ac_aux_dir"; then
2829 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2830fi
2831
2832# These three variables are undocumented and unsupported,
2833# and are intended to be withdrawn in a future Autoconf release.
2834# They can cause serious problems if a builder's source tree is in a directory
2835# whose full name contains unusual characters.
2836ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2837ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2838ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2839
2840
2841# Make sure we can run config.sub.
2842$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2843 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2844
2845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2846$as_echo_n "checking build system type... " >&6; }
2847if ${ac_cv_build+:} false; then :
2848 $as_echo_n "(cached) " >&6
2849else
2850 ac_build_alias=$build_alias
2851test "x$ac_build_alias" = x &&
2852 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2853test "x$ac_build_alias" = x &&
2854 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2855ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2856 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2857
2858fi
2859{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2860$as_echo "$ac_cv_build" >&6; }
2861case $ac_cv_build in
2862*-*-*) ;;
2863*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2864esac
2865build=$ac_cv_build
2866ac_save_IFS=$IFS; IFS='-'
2867set x $ac_cv_build
2868shift
2869build_cpu=$1
2870build_vendor=$2
2871shift; shift
2872# Remember, the first character of IFS is used to create $*,
2873# except with old shells:
2874build_os=$*
2875IFS=$ac_save_IFS
2876case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2877
2878
2879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2880$as_echo_n "checking host system type... " >&6; }
2881if ${ac_cv_host+:} false; then :
2882 $as_echo_n "(cached) " >&6
2883else
2884 if test "x$host_alias" = x; then
2885 ac_cv_host=$ac_cv_build
2886else
2887 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2888 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2889fi
2890
2891fi
2892{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2893$as_echo "$ac_cv_host" >&6; }
2894case $ac_cv_host in
2895*-*-*) ;;
2896*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2897esac
2898host=$ac_cv_host
2899ac_save_IFS=$IFS; IFS='-'
2900set x $ac_cv_host
2901shift
2902host_cpu=$1
2903host_vendor=$2
2904shift; shift
2905# Remember, the first character of IFS is used to create $*,
2906# except with old shells:
2907host_os=$*
2908IFS=$ac_save_IFS
2909case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2910
2911
2912
2913
2914
Ned Deily983df862014-08-22 13:30:59 -07002915# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2916rm -f pybuilddir.txt
2917
doko@python.orgd65e2ba2013-01-31 23:52:03 +01002918if test "$cross_compiling" = yes; then
2919 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2920$as_echo_n "checking for python interpreter for cross build... " >&6; }
2921 if test -z "$PYTHON_FOR_BUILD"; then
2922 for interp in python$PACKAGE_VERSION python2 python; do
2923 which $interp >/dev/null 2>&1 || continue
2924 if $interp -c 'import sys;sys.exit(not (sys.version_info[:2] >= (2,7) and sys.version_info[0] < 3))'; then
2925 break
2926 fi
2927 interp=
2928 done
2929 if test x$interp = x; then
2930 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2931 fi
2932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2933$as_echo "$interp" >&6; }
doko@ubuntu.coma50b0de2015-04-13 21:55:59 +02002934 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 +01002935 fi
Martin Panterbc82de02016-07-29 05:52:32 +00002936 # Used to comment out stuff for rebuilding generated files
2937 GENERATED_COMMENT='#'
doko@python.orgd65e2ba2013-01-31 23:52:03 +01002938elif test "$cross_compiling" = maybe; then
2939 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
2940else
2941 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
Martin Panterbc82de02016-07-29 05:52:32 +00002942 GENERATED_COMMENT=''
doko@python.orgd65e2ba2013-01-31 23:52:03 +01002943fi
2944
2945
Martin v. Löwis11437992002-04-12 09:54:03 +00002946
Martin Panter801110b2016-07-28 01:28:27 +00002947
Georg Brandlbcd64a32009-03-31 21:45:18 +00002948if test "$prefix" != "/"; then
2949 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2950fi
2951
2952
Martin v. Löwis11437992002-04-12 09:54:03 +00002953
2954
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002955# We don't use PACKAGE_ variables, and they cause conflicts
2956# with other autoconf-based packages that include Python.h
2957grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2958rm confdefs.h
2959mv confdefs.h.new confdefs.h
2960
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002961
Martin v. Löwis174440b2008-10-03 08:59:41 +00002962VERSION=2.7
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002963
Martin v. Löwis1142de32002-03-29 16:28:31 +00002964
2965SOVERSION=1.0
2966
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002967# The later defininition of _XOPEN_SOURCE disables certain features
2968# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2969
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002970$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002971
2972
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002973# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2974# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2975# them.
2976
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002977$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002978
2979
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002980# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2981# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2982# them.
2983
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002984$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002985
2986
Martin v. Löwisd6320502004-08-12 13:45:08 +00002987# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2988# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2989
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002990$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002991
2992
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002993# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2994# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2995# them.
2996
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002997$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002998
2999
3000
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003001define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003002
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003003# Arguments passed to configure.
3004
3005CONFIG_ARGS="$ac_configure_args"
3006
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3008$as_echo_n "checking for --enable-universalsdk... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003009# Check whether --enable-universalsdk was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003010if test "${enable_universalsdk+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003011 enableval=$enable_universalsdk;
Ronald Oussoren988117f2006-04-29 11:31:35 +00003012 case $enableval in
3013 yes)
3014 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003015 if test ! -d "${enableval}"
3016 then
3017 enableval=/
3018 fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00003019 ;;
3020 esac
3021 case $enableval in
3022 no)
3023 UNIVERSALSDK=
3024 enable_universalsdk=
3025 ;;
3026 *)
3027 UNIVERSALSDK=$enableval
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003028 if test ! -d "${UNIVERSALSDK}"
3029 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003030 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003031 fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00003032 ;;
3033 esac
3034
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003035
Ronald Oussoren988117f2006-04-29 11:31:35 +00003036else
3037
3038 UNIVERSALSDK=
3039 enable_universalsdk=
3040
Martin v. Löwiseba40652007-08-30 20:10:57 +00003041fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00003042
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003043if test -n "${UNIVERSALSDK}"
3044then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3046$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003047else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3049$as_echo "no" >&6; }
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003050fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00003051
Martin v. Löwiseba40652007-08-30 20:10:57 +00003052
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +00003053
Ned Deily8e60f6e2013-05-30 00:14:29 -07003054ARCH_RUN_32BIT=""
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +00003055
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003056UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren92919a62009-12-24 13:30:58 +00003057
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3059$as_echo_n "checking for --with-universal-archs... " >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003060
3061# Check whether --with-universal-archs was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003062if test "${with_universal_archs+set}" = set; then :
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003063 withval=$with_universal_archs;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
3065$as_echo "$withval" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003066 UNIVERSAL_ARCHS="$withval"
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00003067 if test "${enable_universalsdk}" ; then
3068 :
3069 else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003070 as_fn_error $? "--with-universal-archs without --enable-universalsdk. See Mac/README" "$LINENO" 5
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00003071 fi
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003072
3073else
3074
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 32-bit" >&5
3076$as_echo "32-bit" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003077
3078fi
3079
3080
3081
3082
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003083
3084# Check whether --with-framework-name was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003085if test "${with_framework_name+set}" = set; then :
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003086 withval=$with_framework_name;
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00003087 if test "${enable_framework}"; then
3088 :
3089 else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003090 as_fn_error $? "--with-framework-name without --enable-framework. See Mac/README" "$LINENO" 5
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00003091 fi
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003092 PYTHONFRAMEWORK=${withval}
3093 PYTHONFRAMEWORKDIR=${withval}.framework
3094 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3095
3096else
3097
3098 PYTHONFRAMEWORK=Python
3099 PYTHONFRAMEWORKDIR=Python.framework
3100 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3101
3102fi
3103
Martin v. Löwiseba40652007-08-30 20:10:57 +00003104# Check whether --enable-framework was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003105if test "${enable_framework+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003106 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003107 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003108 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003109 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003110 esac
3111 case $enableval in
3112 no)
3113 PYTHONFRAMEWORK=
3114 PYTHONFRAMEWORKDIR=no-framework
3115 PYTHONFRAMEWORKPREFIX=
3116 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00003117 FRAMEWORKINSTALLFIRST=
3118 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00003119 FRAMEWORKALTINSTALLFIRST=
3120 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00003121 if test "x${prefix}" = "xNONE"; then
3122 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3123 else
3124 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3125 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003126 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003127 ;;
3128 *)
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003129 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003130 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00003131 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003132 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure bininstall maninstall"
Ronald Oussoren92919a62009-12-24 13:30:58 +00003133 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3134 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003135 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003136
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00003137 if test "x${prefix}" = "xNONE" ; then
3138 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003139
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00003140 else
3141 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3142 fi
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003143
3144 case "${enableval}" in
3145 /System*)
3146 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3147 if test "${prefix}" = "NONE" ; then
3148 # See below
3149 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3150 fi
3151 ;;
3152
3153 /Library*)
3154 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3155 ;;
3156
3157 */Library/Frameworks)
3158 MDIR="`dirname "${enableval}"`"
3159 MDIR="`dirname "${MDIR}"`"
3160 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3161
3162 if test "${prefix}" = "NONE"; then
3163 # User hasn't specified the
3164 # --prefix option, but wants to install
3165 # the framework in a non-default location,
3166 # ensure that the compatibility links get
3167 # installed relative to that prefix as well
3168 # instead of in /usr/local.
3169 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3170 fi
3171 ;;
3172
3173 *)
3174 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3175 ;;
3176 esac
3177
Jack Jansen127e56e2001-09-11 14:41:54 +00003178 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Ronald Oussoren836b0392006-05-14 19:56:34 +00003179
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003180 # Add files for Mac specific code to the list of output
Ronald Oussoren836b0392006-05-14 19:56:34 +00003181 # files:
Martin v. Löwiseba40652007-08-30 20:10:57 +00003182 ac_config_files="$ac_config_files Mac/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00003183
Martin v. Löwiseba40652007-08-30 20:10:57 +00003184 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00003185
Martin v. Löwiseba40652007-08-30 20:10:57 +00003186 ac_config_files="$ac_config_files Mac/IDLE/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00003187
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003188 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3189
3190 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3191
Jack Jansene578a632001-08-15 01:27:14 +00003192 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003193
Guido van Rossum563e7081996-09-10 18:20:48 +00003194else
Martin v. Löwis11437992002-04-12 09:54:03 +00003195
Jack Jansene578a632001-08-15 01:27:14 +00003196 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003197 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003198 PYTHONFRAMEWORKPREFIX=
3199 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00003200 FRAMEWORKINSTALLFIRST=
3201 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00003202 FRAMEWORKALTINSTALLFIRST=
3203 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00003204 if test "x${prefix}" = "xNONE" ; then
3205 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3206 else
3207 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3208 fi
Jack Jansene578a632001-08-15 01:27:14 +00003209 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003210
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003211
Martin v. Löwiseba40652007-08-30 20:10:57 +00003212fi
3213
Michael W. Hudson54241132001-12-07 15:38:26 +00003214
3215
3216
3217
Jack Jansene578a632001-08-15 01:27:14 +00003218
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00003219
3220
Ronald Oussoren5b787322006-06-06 19:50:24 +00003221
3222
3223
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003224
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003225
Jack Jansene578a632001-08-15 01:27:14 +00003226##AC_ARG_WITH(dyld,
Matthias Klose22520ea2010-05-08 10:14:46 +00003227## AS_HELP_STRING([--with-dyld],
3228## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003229##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003230# Set name for machine-dependent library files
3231
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003232{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3233$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003234if test -z "$MACHDEP"
3235then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003236 # avoid using uname for cross builds
3237 if test "$cross_compiling" = yes; then
3238 # ac_sys_system and ac_sys_release are only used for setting
3239 # `define_xopen_source' in the case statement below. For the
3240 # current supported cross builds, this macro is not adjusted.
3241 case "$host" in
3242 *-*-linux*)
3243 ac_sys_system=Linux
3244 ;;
3245 *-*-cygwin*)
3246 ac_sys_system=Cygwin
3247 ;;
3248 *)
3249 # for now, limit cross builds to known configurations
3250 MACHDEP="unknown"
3251 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3252 esac
3253 ac_sys_release=
3254 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003255 ac_sys_system=`uname -s`
Georg Brandlfe18a112009-09-04 07:55:14 +00003256 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003257 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003258 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003259 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003260 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003261 fi
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003262 fi
3263 ac_md_system=`echo $ac_sys_system |
3264 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3265 ac_md_release=`echo $ac_sys_release |
3266 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3267 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003268
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003269 case $MACHDEP in
Victor Stinneracacbaa2011-08-20 14:02:38 +02003270 linux*) MACHDEP="linux2";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003271 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003272 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003273 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00003274 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003275 '') MACHDEP="unknown";;
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003276 esac
3277fi
3278
3279
3280if test "$cross_compiling" = yes; then
3281 case "$host" in
3282 *-*-linux*)
3283 case "$host_cpu" in
3284 arm*)
3285 _host_cpu=arm
3286 ;;
3287 *)
3288 _host_cpu=$host_cpu
3289 esac
3290 ;;
3291 *-*-cygwin*)
3292 _host_cpu=
3293 ;;
3294 *)
3295 # for now, limit cross builds to known configurations
3296 MACHDEP="unknown"
3297 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003298 esac
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003299 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003300fi
Guido van Rossum91922671997-10-09 20:24:13 +00003301
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003302# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3303# disable features if it is defined, without any means to access these
3304# features as extensions. For these systems, we skip the definition of
3305# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3306# some feature, make sure there is no alternative way to access this
3307# feature. Also, when using wildcards, make sure you have verified the
3308# need for not defining _XOPEN_SOURCE on all systems matching the
3309# wildcard, and that the wildcard does not include future systems
3310# (which may remove their limitations).
3311case $ac_sys_system/$ac_sys_release in
3312 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3313 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003314 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis7875ef62010-02-15 21:41:12 +00003315 # In addition, Stefan Krah confirms that issue #1244610 exists through
3316 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali97781b02011-07-22 23:43:42 +02003317 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Martin v. Löwiscb78de62007-12-29 18:49:21 +00003318 define_xopen_source=no
3319 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3320 # also defined. This can be overridden by defining _BSD_SOURCE
3321 # As this has a different meaning on Linux, only define it on OpenBSD
3322
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003323$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwiscb78de62007-12-29 18:49:21 +00003324
3325 ;;
Charles-François Natali97781b02011-07-22 23:43:42 +02003326 OpenBSD/*)
Martin v. Löwis5e2dd862010-02-15 08:32:00 +00003327 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3328 # also defined. This can be overridden by defining _BSD_SOURCE
3329 # As this has a different meaning on Linux, only define it on OpenBSD
3330
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003331$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis5e2dd862010-02-15 08:32:00 +00003332
3333 ;;
Martin v. Löwis4d542ec2006-11-25 15:39:19 +00003334 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3335 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3336 # Marc Recht
Benjamin Petersoneac68f42008-11-16 17:54:55 +00003337 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 +00003338 define_xopen_source=no;;
Martin v. Löwisb41afb52010-05-28 15:28:47 +00003339 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3340 # request to enable features supported by the standard as a request
3341 # to disable features not supported by the standard. The best way
3342 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3343 # entirely and define __EXTENSIONS__ instead.
3344 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003345 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003346 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3347 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003348 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003349 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003350 define_xopen_source=no;;
3351 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003352 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003353 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003354 define_xopen_source=no;;
Martin v. Löwisbb86d832008-11-04 20:40:09 +00003355 # On FreeBSD 4, the math functions C89 does not cover are never defined
3356 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3357 FreeBSD/4.*)
3358 define_xopen_source=no;;
3359 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3360 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3361 # identifies itself as Darwin/7.*
3362 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3363 # disables platform specific features beyond repair.
3364 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3365 # has no effect, don't bother defining them
3366 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003367 define_xopen_source=no;;
Ronald Oussorena55af9a2010-01-17 16:25:57 +00003368 Darwin/1[0-9].*)
3369 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003370 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3371 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3372 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003373 AIX/4)
3374 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003375 AIX/5)
3376 if test `uname -r` -eq 1; then
3377 define_xopen_source=no
3378 fi
3379 ;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00003380 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3381 # defining NI_NUMERICHOST.
3382 QNX/6.3.2)
3383 define_xopen_source=no
3384 ;;
Martin v. Löwisa0588362006-04-04 06:03:50 +00003385
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003386esac
3387
3388if test $define_xopen_source = yes
3389then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003390
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003391$as_echo "#define _XOPEN_SOURCE 600" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003392
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003393
3394 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3395 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3396 # several APIs are not declared. Since this is also needed in some
3397 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003398
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003399$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003400
3401
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003402
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003403$as_echo "#define _POSIX_C_SOURCE 200112L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003404
3405
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003406fi
3407
Guido van Rossum91922671997-10-09 20:24:13 +00003408#
3409# SGI compilers allow the specification of the both the ABI and the
3410# ISA on the command line. Depending on the values of these switches,
Martin Panterb1d867f2016-05-26 05:28:50 +00003411# different and often incompatible code will be generated.
Guido van Rossum91922671997-10-09 20:24:13 +00003412#
3413# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3414# thus supply support for various ABI/ISA combinations. The MACHDEP
3415# variable is also adjusted.
3416#
3417
3418if test ! -z "$SGI_ABI"
3419then
3420 CC="cc $SGI_ABI"
3421 LDFLAGS="$SGI_ABI $LDFLAGS"
3422 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3423fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003424{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3425$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003426
doko@ubuntu.coma50b0de2015-04-13 21:55:59 +02003427
3428PLATDIR=plat-$MACHDEP
3429
Jack Jansen83f898c2002-12-30 22:23:40 +00003430# And add extra plat-mac for darwin
3431
Jack Jansen7b59b422003-03-17 15:44:10 +00003432
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking EXTRAPLATDIR" >&5
3434$as_echo_n "checking EXTRAPLATDIR... " >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00003435if test -z "$EXTRAPLATDIR"
3436then
3437 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00003438 darwin)
3439 EXTRAPLATDIR="\$(PLATMACDIRS)"
3440 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
3441 ;;
3442 *)
3443 EXTRAPLATDIR=""
3444 EXTRAMACHDEPPATH=""
3445 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00003446 esac
3447fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003448{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRAPLATDIR" >&5
3449$as_echo "$EXTRAPLATDIR" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00003450
Jack Jansen6b08a402004-06-03 12:41:45 +00003451# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3452# it may influence the way we can build extensions, so distutils
3453# needs to check it
3454
Ronald Oussoren988117f2006-04-29 11:31:35 +00003455
Jack Jansen6b08a402004-06-03 12:41:45 +00003456CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Ronald Oussoren988117f2006-04-29 11:31:35 +00003457EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003458
Guido van Rossum627b2d71993-12-24 10:39:16 +00003459# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003460
3461# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3462# for debug/optimization stuff. BASECFLAGS is for flags that are required
3463# just to get things to compile and link. Users are free to override OPT
3464# when running configure or make. The build should not break if they do.
3465# BASECFLAGS should generally not be messed with, however.
3466
3467# XXX shouldn't some/most/all of this code be merged with the stuff later
3468# on that fiddles with OPT and BASECFLAGS?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3470$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003471
Martin v. Löwiseba40652007-08-30 20:10:57 +00003472# Check whether --with-gcc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003473if test "${with_gcc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003474 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003475 case $withval in
Mark Dickinson04b27232009-01-04 12:29:36 +00003476 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003477 without_gcc=yes;;
3478 yes) CC=gcc
3479 without_gcc=no;;
3480 *) CC=$withval
3481 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003482 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003483else
Martin v. Löwis11437992002-04-12 09:54:03 +00003484
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003485 case $ac_sys_system in
Antoine Pitrou285cd162010-09-21 15:23:17 +00003486 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003487 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003488 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003489 case $BE_HOST_CPU in
3490 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00003491 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003492 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00003493 BASECFLAGS="$BASECFLAGS -export pragma"
3494 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003495 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003496 ;;
3497 x86)
Fred Drake5790be12000-10-09 17:06:13 +00003498 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003499 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00003500 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003501 ;;
3502 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003503 as_fn_error $? "Unknown BeOS platform \"$BE_HOST_CPU\"" "$LINENO" 5
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003504 ;;
3505 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003506 AR="\$(srcdir)/Modules/ar_beos"
3507 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003508 ;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003509 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003510 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00003511fi
3512
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003513{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3514$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003515
Zachary Ware6ed42ea2015-12-21 11:43:03 -06003516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-icc" >&5
3517$as_echo_n "checking for --with-icc... " >&6; }
3518
3519# Check whether --with-icc was given.
3520if test "${with_icc+set}" = set; then :
3521 withval=$with_icc;
3522 case $withval in
3523 no) CC=${CC:-cc}
3524 with_icc=no;;
3525 yes) CC=icc
3526 CXX=icpc
3527 with_icc=yes;;
3528 *) CC=$withval
3529 with_icc=$withval;;
3530 esac
3531else
3532
3533 with_icc=no
3534fi
3535
3536{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icc" >&5
3537$as_echo "$with_icc" >&6; }
3538
Guido van Rossum8b131c51995-03-09 14:10:13 +00003539# If the user switches compilers, we can't believe the cache
3540if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3541then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003542 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003543(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003544fi
3545
Trent Nelson15daa352012-12-13 06:46:39 +00003546if test "$MACHDEP" = "irix6" && test "$CC" != "gcc"; then
3547 # Normally, MIPSpro CC treats #error directives as warnings, which means
3548 # a successful exit code is returned (0). This is a problem because IRIX
3549 # has a bunch of system headers with this guard at the top:
3550 #
3551 # #ifndef __c99
3552 # #error This header file is to be used only for c99 mode compilations
3553 # #else
3554 #
3555 # When autoconf tests for such a header, like stdint.h, this happens:
3556 #
3557 # configure:4619: cc -c conftest.c >&5
3558 # cc-1035 cc: WARNING File = /usr/include/stdint.h, Line = 5
3559 # #error directive: This header file is to be used only for c99 mode
3560 # compilations
3561 #
3562 # #error This header file is to be used only for c99 mode compilations
3563 # ^
3564 #
3565 # configure:4619: $? = 0
3566 # configure:4619: result: yes
3567 #
3568 # Therefore, we use `-diag_error 1035` to have the compiler treat the
3569 # warning as an error, which causes cc to return a non-zero result,
3570 # which autoconf can interpret correctly.
3571 CFLAGS="$CFLAGS -diag_error 1035"
3572 # Whilst we're here, we might as well make sure CXX defaults to something
3573 # sensible if we're not using gcc.
3574 if test -z "$CXX"; then
3575 CXX="CC"
3576 fi
3577fi
3578
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00003579# If the user set CFLAGS, use this instead of the automatically
3580# determined setting
3581preset_cflags="$CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +00003582ac_ext=c
3583ac_cpp='$CPP $CPPFLAGS'
3584ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3585ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3586ac_compiler_gnu=$ac_cv_c_compiler_gnu
3587if test -n "$ac_tool_prefix"; then
3588 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3589set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3591$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003592if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003593 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003594else
3595 if test -n "$CC"; then
3596 ac_cv_prog_CC="$CC" # Let the user override the test.
3597else
Martin v. Löwis11437992002-04-12 09:54:03 +00003598as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3599for as_dir in $PATH
3600do
3601 IFS=$as_save_IFS
3602 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003603 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003604 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003605 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003606 $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 +00003607 break 2
3608 fi
3609done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003610 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003611IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003612
Jack Jansendd19cf82001-12-06 22:36:17 +00003613fi
3614fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003615CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003616if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3618$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003619else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3621$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003622fi
3623
Martin v. Löwiseba40652007-08-30 20:10:57 +00003624
Martin v. Löwis11437992002-04-12 09:54:03 +00003625fi
3626if test -z "$ac_cv_prog_CC"; then
3627 ac_ct_CC=$CC
3628 # Extract the first word of "gcc", so it can be a program name with args.
3629set dummy gcc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3631$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003632if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003633 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003634else
3635 if test -n "$ac_ct_CC"; then
3636 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3637else
3638as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3639for as_dir in $PATH
3640do
3641 IFS=$as_save_IFS
3642 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003643 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003644 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003645 ac_cv_prog_ac_ct_CC="gcc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003646 $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 +00003647 break 2
3648 fi
3649done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003650 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003651IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003652
3653fi
3654fi
3655ac_ct_CC=$ac_cv_prog_ac_ct_CC
3656if test -n "$ac_ct_CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3658$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003659else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3661$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003662fi
3663
Martin v. Löwiseba40652007-08-30 20:10:57 +00003664 if test "x$ac_ct_CC" = x; then
3665 CC=""
3666 else
3667 case $cross_compiling:$ac_tool_warned in
3668yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003669{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3670$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00003671ac_tool_warned=yes ;;
3672esac
3673 CC=$ac_ct_CC
3674 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003675else
3676 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003677fi
3678
Jack Jansendd19cf82001-12-06 22:36:17 +00003679if test -z "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003680 if test -n "$ac_tool_prefix"; then
3681 # 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 +00003682set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3684$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003685if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003686 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003687else
3688 if test -n "$CC"; then
3689 ac_cv_prog_CC="$CC" # Let the user override the test.
3690else
Martin v. Löwis11437992002-04-12 09:54:03 +00003691as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3692for as_dir in $PATH
3693do
3694 IFS=$as_save_IFS
3695 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003696 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003697 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003698 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003699 $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 +00003700 break 2
3701 fi
3702done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003703 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003704IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003705
3706fi
3707fi
3708CC=$ac_cv_prog_CC
3709if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3711$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003712else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3714$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003715fi
3716
Martin v. Löwiseba40652007-08-30 20:10:57 +00003717
Martin v. Löwis11437992002-04-12 09:54:03 +00003718 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003719fi
3720if test -z "$CC"; then
3721 # Extract the first word of "cc", so it can be a program name with args.
3722set dummy cc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3724$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003725if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003726 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003727else
3728 if test -n "$CC"; then
3729 ac_cv_prog_CC="$CC" # Let the user override the test.
3730else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003731 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003732as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3733for as_dir in $PATH
3734do
3735 IFS=$as_save_IFS
3736 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003737 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003738 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003739 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3740 ac_prog_rejected=yes
3741 continue
3742 fi
3743 ac_cv_prog_CC="cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003744 $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 +00003745 break 2
3746 fi
3747done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003748 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003749IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003750
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003751if test $ac_prog_rejected = yes; then
3752 # We found a bogon in the path, so make sure we never use it.
3753 set dummy $ac_cv_prog_CC
3754 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003755 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003756 # We chose a different compiler from the bogus one.
3757 # However, it has the same basename, so the bogon will be chosen
3758 # first if we set CC to just the basename; use the full file name.
3759 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003760 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003761 fi
3762fi
3763fi
3764fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003765CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003766if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3768$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003769else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3771$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003772fi
3773
Martin v. Löwiseba40652007-08-30 20:10:57 +00003774
Martin v. Löwis11437992002-04-12 09:54:03 +00003775fi
3776if test -z "$CC"; then
3777 if test -n "$ac_tool_prefix"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003778 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003779 do
3780 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3781set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3783$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003784if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003785 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003786else
3787 if test -n "$CC"; then
3788 ac_cv_prog_CC="$CC" # Let the user override the test.
3789else
Martin v. Löwis11437992002-04-12 09:54:03 +00003790as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3791for as_dir in $PATH
3792do
3793 IFS=$as_save_IFS
3794 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003795 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003796 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003797 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003798 $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 +00003799 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003800 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003801done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003802 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003803IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003804
3805fi
3806fi
3807CC=$ac_cv_prog_CC
3808if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3810$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003811else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3813$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003814fi
3815
Martin v. Löwiseba40652007-08-30 20:10:57 +00003816
Martin v. Löwis11437992002-04-12 09:54:03 +00003817 test -n "$CC" && break
3818 done
3819fi
3820if test -z "$CC"; then
3821 ac_ct_CC=$CC
Martin v. Löwiseba40652007-08-30 20:10:57 +00003822 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003823do
3824 # Extract the first word of "$ac_prog", so it can be a program name with args.
3825set dummy $ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3827$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003828if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003829 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003830else
3831 if test -n "$ac_ct_CC"; then
3832 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3833else
3834as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3835for as_dir in $PATH
3836do
3837 IFS=$as_save_IFS
3838 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003839 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003840 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003841 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003842 $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 +00003843 break 2
3844 fi
3845done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003846 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003847IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003848
Martin v. Löwis11437992002-04-12 09:54:03 +00003849fi
3850fi
3851ac_ct_CC=$ac_cv_prog_ac_ct_CC
3852if test -n "$ac_ct_CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3854$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003855else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3857$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003858fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003859
Martin v. Löwiseba40652007-08-30 20:10:57 +00003860
Martin v. Löwis11437992002-04-12 09:54:03 +00003861 test -n "$ac_ct_CC" && break
3862done
Michael W. Hudson54241132001-12-07 15:38:26 +00003863
Martin v. Löwiseba40652007-08-30 20:10:57 +00003864 if test "x$ac_ct_CC" = x; then
3865 CC=""
3866 else
3867 case $cross_compiling:$ac_tool_warned in
3868yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003869{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3870$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00003871ac_tool_warned=yes ;;
3872esac
3873 CC=$ac_ct_CC
3874 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003875fi
3876
3877fi
3878
3879
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003880test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3881$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003882as_fn_error $? "no acceptable C compiler found in \$PATH
Matthias Klose3cef2a92012-03-14 23:39:33 +01003883See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003884
3885# Provide some information about the compiler.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003886$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3887set X $ac_compile
3888ac_compiler=$2
3889for ac_option in --version -v -V -qversion; do
3890 { { ac_try="$ac_compiler $ac_option >&5"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003891case "(($ac_try" in
3892 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3893 *) ac_try_echo=$ac_try;;
3894esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003895eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3896$as_echo "$ac_try_echo"; } >&5
3897 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003898 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003899 if test -s conftest.err; then
3900 sed '10a\
3901... rest of stderr output deleted ...
3902 10q' conftest.err >conftest.er1
3903 cat conftest.er1 >&5
3904 fi
3905 rm -f conftest.er1 conftest.err
3906 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3907 test $ac_status = 0; }
3908done
Martin v. Löwis11437992002-04-12 09:54:03 +00003909
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003910cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003911/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003912
Martin v. Löwis11437992002-04-12 09:54:03 +00003913int
3914main ()
3915{
3916
3917 ;
3918 return 0;
3919}
3920_ACEOF
3921ac_clean_files_save=$ac_clean_files
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003922ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003923# Try to create an executable without -o first, disregard a.out.
3924# It will help us diagnose broken compilers, and finding out an intuition
3925# of exeext.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3927$as_echo_n "checking whether the C compiler works... " >&6; }
3928ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3929
3930# The possible output files:
3931ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3932
Martin v. Löwiseba40652007-08-30 20:10:57 +00003933ac_rmfiles=
3934for ac_file in $ac_files
3935do
3936 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003937 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00003938 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3939 esac
3940done
3941rm -f $ac_rmfiles
3942
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003943if { { ac_try="$ac_link_default"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003944case "(($ac_try" in
3945 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3946 *) ac_try_echo=$ac_try;;
3947esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003948eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3949$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003950 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003951 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003952 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3953 test $ac_status = 0; }; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003954 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3955# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3956# in a Makefile. We should not override ac_cv_exeext if it was cached,
3957# so that the user can short-circuit this test for compilers unknown to
3958# Autoconf.
3959for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003960do
3961 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003962 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003963 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Skip Montanarof0d5f792004-08-15 14:08:23 +00003964 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003965 [ab].out )
Skip Montanarof0d5f792004-08-15 14:08:23 +00003966 # We found the default executable, but exeext='' is most
3967 # certainly right.
3968 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003969 *.* )
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003970 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Martin v. Löwiseba40652007-08-30 20:10:57 +00003971 then :; else
3972 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3973 fi
3974 # We set ac_cv_exeext here because the later test for it is not
3975 # safe: cross compilers may not add the suffix if given an `-o'
3976 # argument, so we may need to know it at that point already.
3977 # Even if this section looks crufty: it has the advantage of
3978 # actually working.
Skip Montanarof0d5f792004-08-15 14:08:23 +00003979 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003980 * )
Skip Montanarof0d5f792004-08-15 14:08:23 +00003981 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003982 esac
3983done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003984test "$ac_cv_exeext" = no && ac_cv_exeext=
3985
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003986else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003987 ac_file=''
3988fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003989if test -z "$ac_file"; then :
3990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3991$as_echo "no" >&6; }
3992$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003993sed 's/^/| /' conftest.$ac_ext >&5
3994
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003995{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3996$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003997as_fn_error 77 "C compiler cannot create executables
Matthias Klose3cef2a92012-03-14 23:39:33 +01003998See \`config.log' for more details" "$LINENO" 5; }
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003999else
4000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4001$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004002fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4004$as_echo_n "checking for C compiler default output file name... " >&6; }
4005{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4006$as_echo "$ac_file" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004007ac_exeext=$ac_cv_exeext
Michael W. Hudson54241132001-12-07 15:38:26 +00004008
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004009rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00004010ac_clean_files=$ac_clean_files_save
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4012$as_echo_n "checking for suffix of executables... " >&6; }
4013if { { ac_try="$ac_link"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004014case "(($ac_try" in
4015 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4016 *) ac_try_echo=$ac_try;;
4017esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004018eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4019$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00004020 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004021 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004022 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4023 test $ac_status = 0; }; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004024 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4025# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4026# work properly (i.e., refer to `conftest.exe'), while it won't with
4027# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00004028for ac_file in conftest.exe conftest conftest.*; do
4029 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00004030 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004031 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004032 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
Skip Montanarof0d5f792004-08-15 14:08:23 +00004033 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004034 * ) break;;
4035 esac
4036done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004037else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004038 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4039$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004040as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Matthias Klose3cef2a92012-03-14 23:39:33 +01004041See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004042fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004043rm -f conftest conftest$ac_cv_exeext
4044{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4045$as_echo "$ac_cv_exeext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004046
4047rm -f conftest.$ac_ext
4048EXEEXT=$ac_cv_exeext
4049ac_exeext=$EXEEXT
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004050cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4051/* end confdefs.h. */
4052#include <stdio.h>
4053int
4054main ()
4055{
4056FILE *f = fopen ("conftest.out", "w");
4057 return ferror (f) || fclose (f) != 0;
4058
4059 ;
4060 return 0;
4061}
Skip Montanaro6dead952003-09-25 14:50:04 +00004062_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004063ac_clean_files="$ac_clean_files conftest.out"
4064# Check that the compiler produces executables we can run. If not, either
4065# the compiler is broken, or we cross compile.
4066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4067$as_echo_n "checking whether we are cross compiling... " >&6; }
4068if test "$cross_compiling" != yes; then
4069 { { ac_try="$ac_link"
4070case "(($ac_try" in
4071 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4072 *) ac_try_echo=$ac_try;;
4073esac
4074eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4075$as_echo "$ac_try_echo"; } >&5
4076 (eval "$ac_link") 2>&5
4077 ac_status=$?
4078 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4079 test $ac_status = 0; }
4080 if { ac_try='./conftest$ac_cv_exeext'
4081 { { case "(($ac_try" in
4082 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4083 *) ac_try_echo=$ac_try;;
4084esac
4085eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4086$as_echo "$ac_try_echo"; } >&5
4087 (eval "$ac_try") 2>&5
4088 ac_status=$?
4089 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4090 test $ac_status = 0; }; }; then
4091 cross_compiling=no
4092 else
4093 if test "$cross_compiling" = maybe; then
4094 cross_compiling=yes
4095 else
4096 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4097$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004098as_fn_error $? "cannot run C compiled programs.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004099If you meant to cross compile, use \`--host'.
Matthias Klose3cef2a92012-03-14 23:39:33 +01004100See \`config.log' for more details" "$LINENO" 5; }
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004101 fi
4102 fi
4103fi
4104{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4105$as_echo "$cross_compiling" >&6; }
4106
4107rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4108ac_clean_files=$ac_clean_files_save
4109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4110$as_echo_n "checking for suffix of object files... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004111if ${ac_cv_objext+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004112 $as_echo_n "(cached) " >&6
4113else
4114 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004115/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004116
Martin v. Löwis11437992002-04-12 09:54:03 +00004117int
4118main ()
4119{
4120
4121 ;
4122 return 0;
4123}
4124_ACEOF
4125rm -f conftest.o conftest.obj
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004126if { { ac_try="$ac_compile"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004127case "(($ac_try" in
4128 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4129 *) ac_try_echo=$ac_try;;
4130esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004131eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4132$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00004133 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004134 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004135 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4136 test $ac_status = 0; }; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004137 for ac_file in conftest.o conftest.obj conftest.*; do
4138 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004139 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004140 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004141 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4142 break;;
4143 esac
4144done
4145else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004146 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004147sed 's/^/| /' conftest.$ac_ext >&5
4148
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004149{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4150$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004151as_fn_error $? "cannot compute suffix of object files: cannot compile
Matthias Klose3cef2a92012-03-14 23:39:33 +01004152See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004153fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004154rm -f conftest.$ac_cv_objext conftest.$ac_ext
4155fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004156{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4157$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004158OBJEXT=$ac_cv_objext
4159ac_objext=$OBJEXT
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4161$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004162if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004163 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004164else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004165 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004166/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004167
Martin v. Löwis11437992002-04-12 09:54:03 +00004168int
4169main ()
4170{
4171#ifndef __GNUC__
4172 choke me
4173#endif
4174
4175 ;
4176 return 0;
4177}
4178_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004179if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004180 ac_compiler_gnu=yes
4181else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004182 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004183fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004184rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004185ac_cv_c_compiler_gnu=$ac_compiler_gnu
4186
4187fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004188{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4189$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4190if test $ac_compiler_gnu = yes; then
4191 GCC=yes
4192else
4193 GCC=
4194fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004195ac_test_CFLAGS=${CFLAGS+set}
4196ac_save_CFLAGS=$CFLAGS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4198$as_echo_n "checking whether $CC accepts -g... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004199if ${ac_cv_prog_cc_g+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004200 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004201else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004202 ac_save_c_werror_flag=$ac_c_werror_flag
4203 ac_c_werror_flag=yes
4204 ac_cv_prog_cc_g=no
4205 CFLAGS="-g"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004206 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004207/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004208
Martin v. Löwis11437992002-04-12 09:54:03 +00004209int
4210main ()
4211{
4212
4213 ;
4214 return 0;
4215}
4216_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004217if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004218 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004219else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004220 CFLAGS=""
4221 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004222/* end confdefs.h. */
4223
4224int
4225main ()
4226{
4227
4228 ;
4229 return 0;
4230}
4231_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004232if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004233
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004234else
4235 ac_c_werror_flag=$ac_save_c_werror_flag
Martin v. Löwiseba40652007-08-30 20:10:57 +00004236 CFLAGS="-g"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004237 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004238/* end confdefs.h. */
4239
4240int
4241main ()
4242{
4243
4244 ;
4245 return 0;
4246}
4247_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004248if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004249 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004250fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004251rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004252fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004253rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4254fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004255rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4256 ac_c_werror_flag=$ac_save_c_werror_flag
4257fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004258{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4259$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004260if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004261 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004262elif test $ac_cv_prog_cc_g = yes; then
4263 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004264 CFLAGS="-g -O2"
4265 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004266 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004267 fi
4268else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004269 if test "$GCC" = yes; then
4270 CFLAGS="-O2"
4271 else
4272 CFLAGS=
4273 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004274fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004275{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4276$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004277if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004278 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004279else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004280 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004281ac_save_CC=$CC
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004282cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004283/* end confdefs.h. */
4284#include <stdarg.h>
4285#include <stdio.h>
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004286struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004287/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4288struct buf { int x; };
4289FILE * (*rcsopen) (struct buf *, struct stat *, int);
4290static char *e (p, i)
4291 char **p;
4292 int i;
4293{
4294 return p[i];
4295}
4296static char *f (char * (*g) (char **, int), char **p, ...)
4297{
4298 char *s;
4299 va_list v;
4300 va_start (v,p);
4301 s = g (p, va_arg (v,int));
4302 va_end (v);
4303 return s;
4304}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004305
4306/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4307 function prototypes and stuff, but not '\xHH' hex character constants.
4308 These don't provoke an error unfortunately, instead are silently treated
Martin v. Löwiseba40652007-08-30 20:10:57 +00004309 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004310 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4311 array size at least. It's necessary to write '\x00'==0 to get something
Martin v. Löwiseba40652007-08-30 20:10:57 +00004312 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004313int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4314
Martin v. Löwiseba40652007-08-30 20:10:57 +00004315/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4316 inside strings and character constants. */
4317#define FOO(x) 'x'
4318int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4319
Skip Montanaro6dead952003-09-25 14:50:04 +00004320int test (int i, double x);
4321struct s1 {int (*f) (int a);};
4322struct s2 {int (*f) (double a);};
4323int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4324int argc;
4325char **argv;
4326int
4327main ()
4328{
4329return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4330 ;
4331 return 0;
4332}
4333_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00004334for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4335 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004336do
4337 CC="$ac_save_CC $ac_arg"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004338 if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004339 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004340fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004341rm -f core conftest.err conftest.$ac_objext
4342 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004343done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004344rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004345CC=$ac_save_CC
4346
4347fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004348# AC_CACHE_VAL
4349case "x$ac_cv_prog_cc_c89" in
4350 x)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004351 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4352$as_echo "none needed" >&6; } ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00004353 xno)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4355$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004356 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00004357 CC="$CC $ac_cv_prog_cc_c89"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4359$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004360esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004361if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004362
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004363fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004364
Martin v. Löwis11437992002-04-12 09:54:03 +00004365ac_ext=c
4366ac_cpp='$CPP $CPPFLAGS'
4367ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4368ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4369ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004370
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00004371if test ! -z "$preset_cflags"
4372then
4373 CFLAGS=$preset_cflags
4374fi
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004375
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004376
4377
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4379$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004380
Martin v. Löwiseba40652007-08-30 20:10:57 +00004381# Check whether --with-cxx_main was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004382if test "${with_cxx_main+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004383 withval=$with_cxx_main;
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004384
4385 case $withval in
4386 no) with_cxx_main=no
4387 MAINCC='$(CC)';;
4388 yes) with_cxx_main=yes
4389 MAINCC='$(CXX)';;
4390 *) with_cxx_main=yes
4391 MAINCC=$withval
4392 if test -z "$CXX"
4393 then
4394 CXX=$withval
4395 fi;;
4396 esac
4397else
4398
4399 with_cxx_main=no
4400 MAINCC='$(CC)'
4401
Martin v. Löwiseba40652007-08-30 20:10:57 +00004402fi
4403
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004404{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4405$as_echo "$with_cxx_main" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004406
4407preset_cxx="$CXX"
4408if test -z "$CXX"
4409then
4410 case "$CC" in
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004411 gcc) if test -n "$ac_tool_prefix"; then
4412 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4413set dummy ${ac_tool_prefix}g++; ac_word=$2
4414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4415$as_echo_n "checking for $ac_word... " >&6; }
4416if ${ac_cv_path_CXX+:} false; then :
4417 $as_echo_n "(cached) " >&6
4418else
4419 case $CXX in
4420 [\\/]* | ?:[\\/]*)
4421 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4422 ;;
4423 *)
4424 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4425for as_dir in notfound
4426do
4427 IFS=$as_save_IFS
4428 test -z "$as_dir" && as_dir=.
4429 for ac_exec_ext in '' $ac_executable_extensions; do
4430 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4431 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4432 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4433 break 2
4434 fi
4435done
4436 done
4437IFS=$as_save_IFS
4438
4439 ;;
4440esac
4441fi
4442CXX=$ac_cv_path_CXX
4443if test -n "$CXX"; then
4444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4445$as_echo "$CXX" >&6; }
4446else
4447 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4448$as_echo "no" >&6; }
4449fi
4450
4451
4452fi
4453if test -z "$ac_cv_path_CXX"; then
4454 ac_pt_CXX=$CXX
4455 # Extract the first word of "g++", so it can be a program name with args.
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004456set dummy g++; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4458$as_echo_n "checking for $ac_word... " >&6; }
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004459if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004460 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004461else
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004462 case $ac_pt_CXX in
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004463 [\\/]* | ?:[\\/]*)
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004464 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 +00004465 ;;
4466 *)
4467 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4468for as_dir in notfound
4469do
4470 IFS=$as_save_IFS
4471 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004472 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004473 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004474 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004475 $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 +00004476 break 2
4477 fi
4478done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004479 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004480IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004481
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004482 ;;
4483esac
4484fi
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004485ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4486if test -n "$ac_pt_CXX"; then
4487 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4488$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004489else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004490 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4491$as_echo "no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004492fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004493
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004494 if test "x$ac_pt_CXX" = x; then
4495 CXX="g++"
4496 else
4497 case $cross_compiling:$ac_tool_warned in
4498yes:)
4499{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4500$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4501ac_tool_warned=yes ;;
4502esac
4503 CXX=$ac_pt_CXX
4504 fi
4505else
4506 CXX="$ac_cv_path_CXX"
4507fi
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004508 ;;
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004509 cc) if test -n "$ac_tool_prefix"; then
4510 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4511set dummy ${ac_tool_prefix}c++; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4513$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004514if ${ac_cv_path_CXX+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004515 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004516else
4517 case $CXX in
4518 [\\/]* | ?:[\\/]*)
4519 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4520 ;;
4521 *)
4522 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4523for as_dir in notfound
4524do
4525 IFS=$as_save_IFS
4526 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004527 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004528 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004529 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004530 $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 +00004531 break 2
4532 fi
4533done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004534 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004535IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004536
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004537 ;;
4538esac
4539fi
4540CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00004541if test -n "$CXX"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4543$as_echo "$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004544else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4546$as_echo "no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004547fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004548
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004549
4550fi
4551if test -z "$ac_cv_path_CXX"; then
4552 ac_pt_CXX=$CXX
4553 # Extract the first word of "c++", so it can be a program name with args.
4554set dummy c++; ac_word=$2
4555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4556$as_echo_n "checking for $ac_word... " >&6; }
4557if ${ac_cv_path_ac_pt_CXX+:} false; then :
4558 $as_echo_n "(cached) " >&6
4559else
4560 case $ac_pt_CXX in
4561 [\\/]* | ?:[\\/]*)
4562 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4563 ;;
4564 *)
4565 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4566for as_dir in notfound
4567do
4568 IFS=$as_save_IFS
4569 test -z "$as_dir" && as_dir=.
4570 for ac_exec_ext in '' $ac_executable_extensions; do
4571 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4572 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4573 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4574 break 2
4575 fi
4576done
4577 done
4578IFS=$as_save_IFS
4579
4580 ;;
4581esac
4582fi
4583ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4584if test -n "$ac_pt_CXX"; then
4585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4586$as_echo "$ac_pt_CXX" >&6; }
4587else
4588 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4589$as_echo "no" >&6; }
4590fi
4591
4592 if test "x$ac_pt_CXX" = x; then
4593 CXX="c++"
4594 else
4595 case $cross_compiling:$ac_tool_warned in
4596yes:)
4597{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4598$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4599ac_tool_warned=yes ;;
4600esac
4601 CXX=$ac_pt_CXX
4602 fi
4603else
4604 CXX="$ac_cv_path_CXX"
4605fi
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004606 ;;
4607 esac
4608 if test "$CXX" = "notfound"
4609 then
4610 CXX=""
4611 fi
4612fi
4613if test -z "$CXX"
4614then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004615 if test -n "$ac_tool_prefix"; then
4616 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4617 do
4618 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4619set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4621$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004622if ${ac_cv_prog_CXX+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004623 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004624else
4625 if test -n "$CXX"; then
4626 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4627else
4628as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4629for as_dir in $PATH
4630do
4631 IFS=$as_save_IFS
4632 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004633 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004634 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004635 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004636 $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 +00004637 break 2
4638 fi
4639done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004640 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004641IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004642
4643fi
4644fi
4645CXX=$ac_cv_prog_CXX
4646if test -n "$CXX"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4648$as_echo "$CXX" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004649else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4651$as_echo "no" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004652fi
4653
Martin v. Löwiseba40652007-08-30 20:10:57 +00004654
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004655 test -n "$CXX" && break
4656 done
4657fi
4658if test -z "$CXX"; then
4659 ac_ct_CXX=$CXX
4660 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4661do
4662 # Extract the first word of "$ac_prog", so it can be a program name with args.
4663set dummy $ac_prog; ac_word=$2
4664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4665$as_echo_n "checking for $ac_word... " >&6; }
4666if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4667 $as_echo_n "(cached) " >&6
4668else
4669 if test -n "$ac_ct_CXX"; then
4670 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4671else
4672as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4673for as_dir in $PATH
4674do
4675 IFS=$as_save_IFS
4676 test -z "$as_dir" && as_dir=.
4677 for ac_exec_ext in '' $ac_executable_extensions; do
4678 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4679 ac_cv_prog_ac_ct_CXX="$ac_prog"
4680 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4681 break 2
4682 fi
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004683done
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004684 done
4685IFS=$as_save_IFS
4686
4687fi
4688fi
4689ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4690if test -n "$ac_ct_CXX"; then
4691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4692$as_echo "$ac_ct_CXX" >&6; }
4693else
4694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4695$as_echo "no" >&6; }
4696fi
4697
4698
4699 test -n "$ac_ct_CXX" && break
4700done
4701
4702 if test "x$ac_ct_CXX" = x; then
4703 CXX="notfound"
4704 else
4705 case $cross_compiling:$ac_tool_warned in
4706yes:)
4707{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4708$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4709ac_tool_warned=yes ;;
4710esac
4711 CXX=$ac_ct_CXX
4712 fi
4713fi
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004714
4715 if test "$CXX" = "notfound"
4716 then
4717 CXX=""
4718 fi
4719fi
4720if test "$preset_cxx" != "$CXX"
4721then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004722 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004723
4724 By default, distutils will build C++ extension modules with \"$CXX\".
4725 If this is not intended, then set CXX on the configure command line.
4726 " >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004727$as_echo "$as_me: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004728
4729 By default, distutils will build C++ extension modules with \"$CXX\".
4730 If this is not intended, then set CXX on the configure command line.
4731 " >&2;}
4732fi
4733
doko@python.org4e63fbe2013-01-25 13:08:27 +01004734MULTIARCH=$($CC --print-multiarch 2>/dev/null)
4735
4736
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004737
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004738# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004739
4740ac_ext=c
4741ac_cpp='$CPP $CPPFLAGS'
4742ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4743ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4744ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4746$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004747# On Suns, sometimes $CPP names a directory.
4748if test -n "$CPP" && test -d "$CPP"; then
4749 CPP=
4750fi
4751if test -z "$CPP"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +01004752 if ${ac_cv_prog_CPP+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004753 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004754else
Martin v. Löwis11437992002-04-12 09:54:03 +00004755 # Double quotes because CPP needs to be expanded
4756 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4757 do
4758 ac_preproc_ok=false
4759for ac_c_preproc_warn_flag in '' yes
4760do
4761 # Use a header file that comes with gcc, so configuring glibc
4762 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004763 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4764 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004765 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004766 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004767 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004768/* end confdefs.h. */
4769#ifdef __STDC__
4770# include <limits.h>
4771#else
4772# include <assert.h>
4773#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004774 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004775_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004776if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004777
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004778else
Martin v. Löwis11437992002-04-12 09:54:03 +00004779 # Broken: fails on valid input.
4780continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004781fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004782rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004783
Martin v. Löwiseba40652007-08-30 20:10:57 +00004784 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004785 # can be detected and how.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004786 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004787/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004788#include <ac_nonexistent.h>
4789_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004790if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004791 # Broken: success on invalid input.
4792continue
4793else
Martin v. Löwis11437992002-04-12 09:54:03 +00004794 # Passes both tests.
4795ac_preproc_ok=:
4796break
4797fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004798rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004799
4800done
4801# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004802rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004803if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004804 break
4805fi
4806
4807 done
4808 ac_cv_prog_CPP=$CPP
4809
4810fi
4811 CPP=$ac_cv_prog_CPP
4812else
4813 ac_cv_prog_CPP=$CPP
4814fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004815{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4816$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004817ac_preproc_ok=false
4818for ac_c_preproc_warn_flag in '' yes
4819do
4820 # Use a header file that comes with gcc, so configuring glibc
4821 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004822 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4823 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004824 # On the NeXT, cc -E runs the code through the compiler's parser,
4825 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004826 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004827/* end confdefs.h. */
4828#ifdef __STDC__
4829# include <limits.h>
4830#else
4831# include <assert.h>
4832#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004833 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004834_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004835if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004836
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004837else
Martin v. Löwis11437992002-04-12 09:54:03 +00004838 # Broken: fails on valid input.
4839continue
4840fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004841rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004842
Martin v. Löwiseba40652007-08-30 20:10:57 +00004843 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004844 # can be detected and how.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004845 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004846/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004847#include <ac_nonexistent.h>
4848_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004849if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004850 # Broken: success on invalid input.
4851continue
4852else
Martin v. Löwis11437992002-04-12 09:54:03 +00004853 # Passes both tests.
4854ac_preproc_ok=:
4855break
4856fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004857rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004858
4859done
4860# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004861rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004862if $ac_preproc_ok; then :
4863
Martin v. Löwis11437992002-04-12 09:54:03 +00004864else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004865 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4866$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004867as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
Matthias Klose3cef2a92012-03-14 23:39:33 +01004868See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004869fi
4870
4871ac_ext=c
4872ac_cpp='$CPP $CPPFLAGS'
4873ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4874ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4875ac_compiler_gnu=$ac_cv_c_compiler_gnu
4876
4877
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4879$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004880if ${ac_cv_path_GREP+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004881 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004882else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004883 if test -z "$GREP"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004884 ac_path_GREP_found=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004885 # Loop through the user's path and test for each of PROGNAME-LIST
4886 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00004887for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4888do
4889 IFS=$as_save_IFS
4890 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004891 for ac_prog in grep ggrep; do
4892 for ac_exec_ext in '' $ac_executable_extensions; do
4893 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004894 as_fn_executable_p "$ac_path_GREP" || continue
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004895# Check for GNU ac_path_GREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004896 # Check for GNU $ac_path_GREP
4897case `"$ac_path_GREP" --version 2>&1` in
4898*GNU*)
4899 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4900*)
4901 ac_count=0
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004902 $as_echo_n 0123456789 >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004903 while :
4904 do
4905 cat "conftest.in" "conftest.in" >"conftest.tmp"
4906 mv "conftest.tmp" "conftest.in"
4907 cp "conftest.in" "conftest.nl"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004908 $as_echo 'GREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004909 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4910 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004911 as_fn_arith $ac_count + 1 && ac_count=$as_val
Martin v. Löwiseba40652007-08-30 20:10:57 +00004912 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4913 # Best one so far, save it but keep looking for a better one
4914 ac_cv_path_GREP="$ac_path_GREP"
4915 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00004916 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004917 # 10*(2^10) chars as input seems more than enough
4918 test $ac_count -gt 10 && break
4919 done
4920 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4921esac
4922
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004923 $ac_path_GREP_found && break 3
4924 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004925 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004926 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004927IFS=$as_save_IFS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004928 if test -z "$ac_cv_path_GREP"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004929 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 +00004930 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004931else
4932 ac_cv_path_GREP=$GREP
4933fi
4934
Martin v. Löwiseba40652007-08-30 20:10:57 +00004935fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004936{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4937$as_echo "$ac_cv_path_GREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00004938 GREP="$ac_cv_path_GREP"
4939
4940
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4942$as_echo_n "checking for egrep... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004943if ${ac_cv_path_EGREP+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004944 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +00004945else
4946 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4947 then ac_cv_path_EGREP="$GREP -E"
4948 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004949 if test -z "$EGREP"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004950 ac_path_EGREP_found=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004951 # Loop through the user's path and test for each of PROGNAME-LIST
4952 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00004953for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4954do
4955 IFS=$as_save_IFS
4956 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004957 for ac_prog in egrep; do
4958 for ac_exec_ext in '' $ac_executable_extensions; do
4959 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004960 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004961# Check for GNU ac_path_EGREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004962 # Check for GNU $ac_path_EGREP
4963case `"$ac_path_EGREP" --version 2>&1` in
4964*GNU*)
4965 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4966*)
4967 ac_count=0
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004968 $as_echo_n 0123456789 >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004969 while :
4970 do
4971 cat "conftest.in" "conftest.in" >"conftest.tmp"
4972 mv "conftest.tmp" "conftest.in"
4973 cp "conftest.in" "conftest.nl"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004974 $as_echo 'EGREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004975 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4976 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004977 as_fn_arith $ac_count + 1 && ac_count=$as_val
Martin v. Löwiseba40652007-08-30 20:10:57 +00004978 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4979 # Best one so far, save it but keep looking for a better one
4980 ac_cv_path_EGREP="$ac_path_EGREP"
4981 ac_path_EGREP_max=$ac_count
4982 fi
4983 # 10*(2^10) chars as input seems more than enough
4984 test $ac_count -gt 10 && break
4985 done
4986 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4987esac
4988
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004989 $ac_path_EGREP_found && break 3
4990 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004991 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004992 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004993IFS=$as_save_IFS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004994 if test -z "$ac_cv_path_EGREP"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004995 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 +00004996 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004997else
4998 ac_cv_path_EGREP=$EGREP
4999fi
5000
Martin v. Löwiseba40652007-08-30 20:10:57 +00005001 fi
5002fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005003{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5004$as_echo "$ac_cv_path_EGREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00005005 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005006
5007
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5009$as_echo_n "checking for ANSI C header files... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005010if ${ac_cv_header_stdc+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005011 $as_echo_n "(cached) " >&6
5012else
5013 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00005014/* end confdefs.h. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005015#include <stdlib.h>
5016#include <stdarg.h>
5017#include <string.h>
5018#include <float.h>
5019
5020int
5021main ()
5022{
5023
5024 ;
5025 return 0;
5026}
5027_ACEOF
5028if ac_fn_c_try_compile "$LINENO"; then :
5029 ac_cv_header_stdc=yes
5030else
5031 ac_cv_header_stdc=no
5032fi
5033rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5034
5035if test $ac_cv_header_stdc = yes; then
5036 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5037 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5038/* end confdefs.h. */
5039#include <string.h>
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00005040
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00005041_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005042if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005043 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005044
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005045else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005046 ac_cv_header_stdc=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005047fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00005048rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005049
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005050fi
5051
5052if test $ac_cv_header_stdc = yes; then
5053 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5054 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5055/* end confdefs.h. */
5056#include <stdlib.h>
5057
5058_ACEOF
5059if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5060 $EGREP "free" >/dev/null 2>&1; then :
5061
5062else
5063 ac_cv_header_stdc=no
5064fi
5065rm -f conftest*
5066
5067fi
5068
5069if test $ac_cv_header_stdc = yes; then
5070 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5071 if test "$cross_compiling" = yes; then :
5072 :
5073else
5074 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5075/* end confdefs.h. */
5076#include <ctype.h>
5077#include <stdlib.h>
5078#if ((' ' & 0x0FF) == 0x020)
5079# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5080# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5081#else
5082# define ISLOWER(c) \
5083 (('a' <= (c) && (c) <= 'i') \
5084 || ('j' <= (c) && (c) <= 'r') \
5085 || ('s' <= (c) && (c) <= 'z'))
5086# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5087#endif
5088
5089#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5090int
5091main ()
5092{
5093 int i;
5094 for (i = 0; i < 256; i++)
5095 if (XOR (islower (i), ISLOWER (i))
5096 || toupper (i) != TOUPPER (i))
5097 return 2;
5098 return 0;
5099}
5100_ACEOF
5101if ac_fn_c_try_run "$LINENO"; then :
5102
5103else
5104 ac_cv_header_stdc=no
5105fi
5106rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5107 conftest.$ac_objext conftest.beam conftest.$ac_ext
5108fi
5109
5110fi
5111fi
5112{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5113$as_echo "$ac_cv_header_stdc" >&6; }
5114if test $ac_cv_header_stdc = yes; then
5115
5116$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5117
5118fi
5119
5120# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5121for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5122 inttypes.h stdint.h unistd.h
5123do :
5124 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5125ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5126"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00005127if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005128 cat >>confdefs.h <<_ACEOF
5129#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5130_ACEOF
5131
5132fi
5133
5134done
5135
5136
5137
5138 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 +01005139if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005140 MINIX=yes
5141else
5142 MINIX=
5143fi
5144
5145
5146 if test "$MINIX" = yes; then
5147
5148$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5149
5150
5151$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5152
5153
5154$as_echo "#define _MINIX 1" >>confdefs.h
5155
5156 fi
5157
5158
5159 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5160$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005161if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005162 $as_echo_n "(cached) " >&6
5163else
5164 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5165/* end confdefs.h. */
5166
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005167# define __EXTENSIONS__ 1
5168 $ac_includes_default
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005169int
5170main ()
5171{
5172
5173 ;
5174 return 0;
5175}
5176_ACEOF
5177if ac_fn_c_try_compile "$LINENO"; then :
5178 ac_cv_safe_to_define___extensions__=yes
5179else
5180 ac_cv_safe_to_define___extensions__=no
5181fi
5182rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5183fi
5184{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5185$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5186 test $ac_cv_safe_to_define___extensions__ = yes &&
5187 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5188
5189 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5190
5191 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5192
5193 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5194
5195 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5196
5197
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005198
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005199# Check for unsupported systems
5200case $ac_sys_system/$ac_sys_release in
5201atheos*|Linux*/1*)
5202 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5203 echo See README for details.
5204 exit 1;;
5205esac
5206
5207
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5209$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005210
5211# Check whether --with-suffix was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005212if test "${with_suffix+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005213 withval=$with_suffix;
5214 case $withval in
5215 no) EXEEXT=;;
5216 yes) EXEEXT=.exe;;
5217 *) EXEEXT=$withval;;
5218 esac
5219fi
5220
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005221{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5222$as_echo "$EXEEXT" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005223
5224# Test whether we're running on a non-case-sensitive system, in which
5225# case we give a warning if no ext is given
5226
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5228$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005229if test ! -d CaseSensitiveTestDir; then
5230mkdir CaseSensitiveTestDir
5231fi
5232
5233if test -d casesensitivetestdir
5234then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5236$as_echo "yes" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005237 BUILDEXEEXT=.exe
5238else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005239 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5240$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005241 BUILDEXEEXT=$EXEEXT
5242fi
5243rmdir CaseSensitiveTestDir
5244
5245case $MACHDEP in
5246bsdos*)
5247 case $CC in
5248 gcc) CC="$CC -D_HAVE_BSDI";;
5249 esac;;
5250esac
5251
5252case $ac_sys_system in
5253hp*|HP*)
5254 case $CC in
5255 cc|*/cc) CC="$CC -Ae";;
5256 esac;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005257SunOS*)
5258 # Some functions have a prototype only with that define, e.g. confstr
5259
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005260$as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005261
5262 ;;
5263esac
5264
5265
5266
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5268$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005269if test -z "$LIBRARY"
5270then
5271 LIBRARY='libpython$(VERSION).a'
5272fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005273{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5274$as_echo "$LIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005275
5276# LDLIBRARY is the name of the library to link against (as opposed to the
5277# name of the library into which to insert object files). BLDLIBRARY is also
5278# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5279# is blank as the main program is not linked directly against LDLIBRARY.
5280# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5281# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5282# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5283# DLLLIBRARY is the shared (i.e., DLL) library.
5284#
5285# RUNSHARED is used to run shared python without installed libraries
5286#
5287# INSTSONAME is the name of the shared library that will be use to install
5288# on the system - some systems like version suffix, others don't
5289
5290
5291
5292
5293
5294
5295LDLIBRARY="$LIBRARY"
5296BLDLIBRARY='$(LDLIBRARY)'
5297INSTSONAME='$(LDLIBRARY)'
5298DLLLIBRARY=''
5299LDLIBRARYDIR=''
5300RUNSHARED=''
5301
5302# LINKCC is the command that links the python executable -- default is $(CC).
5303# If CXX is set, and if it is needed to link a main function that was
5304# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5305# python might then depend on the C++ runtime
5306# This is altered for AIX in order to build the export list before
5307# linking.
5308
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5310$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005311if test -z "$LINKCC"
5312then
5313 LINKCC='$(PURIFY) $(MAINCC)'
5314 case $ac_sys_system in
5315 AIX*)
5316 exp_extra="\"\""
5317 if test $ac_sys_release -ge 5 -o \
5318 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5319 exp_extra="."
5320 fi
5321 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005322 QNX*)
5323 # qcc must be used because the other compilers do not
5324 # support -N.
5325 LINKCC=qcc;;
5326 esac
5327fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005328{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5329$as_echo "$LINKCC" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005330
5331# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5332# make sure we default having it set to "no": this is used by
5333# distutils.unixccompiler to know if it should add --enable-new-dtags
5334# to linker command lines, and failing to detect GNU ld simply results
5335# in the same bahaviour as before.
5336
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5338$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005339ac_prog=ld
5340if test "$GCC" = yes; then
5341 ac_prog=`$CC -print-prog-name=ld`
5342fi
5343case `"$ac_prog" -V 2>&1 < /dev/null` in
5344 *GNU*)
5345 GNULD=yes;;
5346 *)
5347 GNULD=no;;
5348esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005349{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5350$as_echo "$GNULD" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005351
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5353$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005354# Check whether --enable-shared was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005355if test "${enable_shared+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005356 enableval=$enable_shared;
5357fi
5358
5359
5360if test -z "$enable_shared"
5361then
5362 case $ac_sys_system in
5363 CYGWIN* | atheos*)
5364 enable_shared="yes";;
5365 *)
5366 enable_shared="no";;
5367 esac
5368fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005369{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5370$as_echo "$enable_shared" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005371
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5373$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005374# Check whether --enable-profiling was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005375if test "${enable_profiling+set}" = set; then :
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005376 enableval=$enable_profiling;
5377fi
5378
5379if test "x$enable_profiling" = xyes; then
5380 ac_save_cc="$CC"
Benjamin Petersonb9be7bb2013-03-26 08:55:37 -04005381 CC="$CC -pg"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005382 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005383/* end confdefs.h. */
5384int main() { return 0; }
5385_ACEOF
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005386if ac_fn_c_try_link "$LINENO"; then :
5387
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005388else
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005389 enable_profiling=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005390fi
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005391rm -f core conftest.err conftest.$ac_objext \
5392 conftest$ac_exeext conftest.$ac_ext
5393 CC="$ac_save_cc"
5394else
5395 enable_profiling=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005396fi
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005397{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5398$as_echo "$enable_profiling" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005399
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005400if test "x$enable_profiling" = xyes; then
5401 BASECFLAGS="-pg $BASECFLAGS"
5402 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005403fi
5404
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5406$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005407
5408# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5409# library that we build, but we do not want to link against it (we
5410# will find it with a -framework option). For this reason there is an
5411# extra variable BLDLIBRARY against which Python and the extension
5412# modules are linked, BLDLIBRARY. This is normally the same as
5413# LDLIBRARY, but empty for MacOSX framework builds.
5414if test "$enable_framework"
5415then
5416 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005417 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005418 BLDLIBRARY=''
5419else
5420 BLDLIBRARY='$(LDLIBRARY)'
5421fi
5422
5423# Other platforms follow
5424if test $enable_shared = "yes"; then
5425
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005426$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005427
5428 case $ac_sys_system in
5429 BeOS*)
5430 LDLIBRARY='libpython$(VERSION).so'
5431 ;;
5432 CYGWIN*)
5433 LDLIBRARY='libpython$(VERSION).dll.a'
5434 DLLLIBRARY='libpython$(VERSION).dll'
5435 ;;
5436 SunOS*)
5437 LDLIBRARY='libpython$(VERSION).so'
5438 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005439 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005440 INSTSONAME="$LDLIBRARY".$SOVERSION
5441 ;;
Charles-François Natali3de8c732011-07-24 22:33:35 +02005442 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005443 LDLIBRARY='libpython$(VERSION).so'
5444 BLDLIBRARY='-L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005445 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005446 case $ac_sys_system in
5447 FreeBSD*)
5448 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
5449 ;;
5450 esac
5451 INSTSONAME="$LDLIBRARY".$SOVERSION
5452 ;;
5453 hp*|HP*)
5454 case `uname -m` in
5455 ia64)
5456 LDLIBRARY='libpython$(VERSION).so'
5457 ;;
5458 *)
5459 LDLIBRARY='libpython$(VERSION).sl'
5460 ;;
5461 esac
5462 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005463 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005464 ;;
5465 OSF*)
5466 LDLIBRARY='libpython$(VERSION).so'
5467 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005468 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005469 ;;
5470 atheos*)
5471 LDLIBRARY='libpython$(VERSION).so'
5472 BLDLIBRARY='-L. -lpython$(VERSION)'
5473 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
5474 ;;
5475 Darwin*)
5476 LDLIBRARY='libpython$(VERSION).dylib'
5477 BLDLIBRARY='-L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005478 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005479 ;;
Antoine Pitrouaabdceb2010-09-10 20:03:17 +00005480 AIX*)
5481 LDLIBRARY='libpython$(VERSION).so'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005482 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrouaabdceb2010-09-10 20:03:17 +00005483 ;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005484
5485 esac
5486else # shared is disabled
5487 case $ac_sys_system in
5488 CYGWIN*)
5489 BLDLIBRARY='$(LIBRARY)'
5490 LDLIBRARY='libpython$(VERSION).dll.a'
5491 ;;
5492 esac
5493fi
5494
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005495if test "$cross_compiling" = yes; then
5496 RUNSHARED=
5497fi
5498
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005499{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5500$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005501
5502if test -n "$ac_tool_prefix"; then
5503 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5504set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5506$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005507if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005508 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005509else
5510 if test -n "$RANLIB"; then
5511 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5512else
5513as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5514for as_dir in $PATH
5515do
5516 IFS=$as_save_IFS
5517 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005518 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005519 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005520 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005521 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005522 break 2
5523 fi
5524done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005525 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005526IFS=$as_save_IFS
5527
5528fi
5529fi
5530RANLIB=$ac_cv_prog_RANLIB
5531if test -n "$RANLIB"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5533$as_echo "$RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005534else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5536$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005537fi
5538
5539
5540fi
5541if test -z "$ac_cv_prog_RANLIB"; then
5542 ac_ct_RANLIB=$RANLIB
5543 # Extract the first word of "ranlib", so it can be a program name with args.
5544set dummy ranlib; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5546$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005547if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005548 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005549else
5550 if test -n "$ac_ct_RANLIB"; then
5551 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5552else
5553as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5554for as_dir in $PATH
5555do
5556 IFS=$as_save_IFS
5557 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005558 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005559 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005560 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005561 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005562 break 2
5563 fi
5564done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005565 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005566IFS=$as_save_IFS
5567
5568fi
5569fi
5570ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5571if test -n "$ac_ct_RANLIB"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005572 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5573$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005574else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5576$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005577fi
5578
5579 if test "x$ac_ct_RANLIB" = x; then
5580 RANLIB=":"
5581 else
5582 case $cross_compiling:$ac_tool_warned in
5583yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005584{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5585$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005586ac_tool_warned=yes ;;
5587esac
5588 RANLIB=$ac_ct_RANLIB
5589 fi
5590else
5591 RANLIB="$ac_cv_prog_RANLIB"
5592fi
5593
5594
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005595if test -n "$ac_tool_prefix"; then
5596 for ac_prog in ar aal
5597 do
5598 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5599set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5601$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005602if ${ac_cv_prog_AR+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005603 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005604else
5605 if test -n "$AR"; then
5606 ac_cv_prog_AR="$AR" # Let the user override the test.
5607else
5608as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5609for as_dir in $PATH
5610do
5611 IFS=$as_save_IFS
5612 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005613 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005614 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005615 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005616 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005617 break 2
5618 fi
5619done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005620 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005621IFS=$as_save_IFS
5622
5623fi
5624fi
5625AR=$ac_cv_prog_AR
5626if test -n "$AR"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005627 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5628$as_echo "$AR" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005629else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005630 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5631$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005632fi
5633
5634
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005635 test -n "$AR" && break
5636 done
5637fi
5638if test -z "$AR"; then
5639 ac_ct_AR=$AR
5640 for ac_prog in ar aal
5641do
5642 # Extract the first word of "$ac_prog", so it can be a program name with args.
5643set dummy $ac_prog; ac_word=$2
5644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5645$as_echo_n "checking for $ac_word... " >&6; }
5646if ${ac_cv_prog_ac_ct_AR+:} false; then :
5647 $as_echo_n "(cached) " >&6
5648else
5649 if test -n "$ac_ct_AR"; then
5650 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5651else
5652as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5653for as_dir in $PATH
5654do
5655 IFS=$as_save_IFS
5656 test -z "$as_dir" && as_dir=.
5657 for ac_exec_ext in '' $ac_executable_extensions; do
5658 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5659 ac_cv_prog_ac_ct_AR="$ac_prog"
5660 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5661 break 2
5662 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005663done
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005664 done
5665IFS=$as_save_IFS
5666
5667fi
5668fi
5669ac_ct_AR=$ac_cv_prog_ac_ct_AR
5670if test -n "$ac_ct_AR"; then
5671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5672$as_echo "$ac_ct_AR" >&6; }
5673else
5674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5675$as_echo "no" >&6; }
5676fi
5677
5678
5679 test -n "$ac_ct_AR" && break
5680done
5681
5682 if test "x$ac_ct_AR" = x; then
5683 AR="ar"
5684 else
5685 case $cross_compiling:$ac_tool_warned in
5686yes:)
5687{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5688$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5689ac_tool_warned=yes ;;
5690esac
5691 AR=$ac_ct_AR
5692 fi
5693fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005694
5695
5696# tweak ARFLAGS only if the user didn't set it on the command line
5697
5698if test -z "$ARFLAGS"
5699then
5700 ARFLAGS="rc"
5701fi
5702
5703
5704# Extract the first word of "svnversion", so it can be a program name with args.
5705set dummy svnversion; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5707$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005708if ${ac_cv_prog_SVNVERSION+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005709 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005710else
5711 if test -n "$SVNVERSION"; then
5712 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
5713else
5714as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5715for as_dir in $PATH
5716do
5717 IFS=$as_save_IFS
5718 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005719 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005720 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005721 ac_cv_prog_SVNVERSION="found"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005722 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005723 break 2
5724 fi
5725done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005726 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005727IFS=$as_save_IFS
5728
5729 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
5730fi
5731fi
5732SVNVERSION=$ac_cv_prog_SVNVERSION
5733if test -n "$SVNVERSION"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SVNVERSION" >&5
5735$as_echo "$SVNVERSION" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005736else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5738$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005739fi
5740
5741
5742if test $SVNVERSION = found
5743then
5744 SVNVERSION="svnversion \$(srcdir)"
5745else
5746 SVNVERSION="echo Unversioned directory"
5747fi
5748
Trent Nelsond86ceec2012-10-16 09:42:45 -04005749
Georg Brandl3a5508e2011-03-06 10:42:21 +01005750
5751
5752# Extract the first word of "hg", so it can be a program name with args.
5753set dummy hg; ac_word=$2
5754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5755$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005756if ${ac_cv_prog_HAS_HG+:} false; then :
Georg Brandl3a5508e2011-03-06 10:42:21 +01005757 $as_echo_n "(cached) " >&6
5758else
5759 if test -n "$HAS_HG"; then
5760 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
5761else
5762as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5763for as_dir in $PATH
5764do
5765 IFS=$as_save_IFS
5766 test -z "$as_dir" && as_dir=.
5767 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005768 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Georg Brandl3a5508e2011-03-06 10:42:21 +01005769 ac_cv_prog_HAS_HG="found"
5770 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5771 break 2
5772 fi
5773done
5774 done
5775IFS=$as_save_IFS
5776
5777 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
5778fi
5779fi
5780HAS_HG=$ac_cv_prog_HAS_HG
5781if test -n "$HAS_HG"; then
5782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
5783$as_echo "$HAS_HG" >&6; }
5784else
5785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5786$as_echo "no" >&6; }
5787fi
5788
5789
5790if test $HAS_HG = found
5791then
5792 HGVERSION="hg id -i \$(srcdir)"
5793 HGTAG="hg id -t \$(srcdir)"
5794 HGBRANCH="hg id -b \$(srcdir)"
5795else
5796 HGVERSION=""
5797 HGTAG=""
5798 HGBRANCH=""
5799fi
5800
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005801case $MACHDEP in
5802bsdos*|hp*|HP*)
5803 # install -d does not work on BSDI or HP-UX
5804 if test -z "$INSTALL"
5805 then
5806 INSTALL="${srcdir}/install-sh -c"
5807 fi
5808esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005809# Find a good install program. We prefer a C program (faster),
5810# so one script is as good as another. But avoid the broken or
5811# incompatible versions:
5812# SysV /etc/install, /usr/sbin/install
5813# SunOS /usr/etc/install
5814# IRIX /sbin/install
5815# AIX /bin/install
5816# AmigaOS /C/install, which installs bootblocks on floppy discs
5817# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5818# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5819# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5820# OS/2's system install, which has a completely different semantic
5821# ./install, which can be erroneously created by make from ./install.sh.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005822# Reject install programs that cannot install multiple files.
5823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5824$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005825if test -z "$INSTALL"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +01005826if ${ac_cv_path_install+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005827 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005828else
5829 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5830for as_dir in $PATH
5831do
5832 IFS=$as_save_IFS
5833 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005834 # Account for people who put trailing slashes in PATH elements.
5835case $as_dir/ in #((
5836 ./ | .// | /[cC]/* | \
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005837 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005838 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005839 /usr/ucb/* ) ;;
5840 *)
5841 # OSF1 and SCO ODT 3.0 have their own names for install.
5842 # Don't use installbsd from OSF since it installs stuff as root
5843 # by default.
5844 for ac_prog in ginstall scoinst install; do
5845 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005846 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005847 if test $ac_prog = install &&
5848 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5849 # AIX install. It has an incompatible calling convention.
5850 :
5851 elif test $ac_prog = install &&
5852 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5853 # program-specific install script used by HP pwplus--don't use.
5854 :
5855 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005856 rm -rf conftest.one conftest.two conftest.dir
5857 echo one > conftest.one
5858 echo two > conftest.two
5859 mkdir conftest.dir
5860 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5861 test -s conftest.one && test -s conftest.two &&
5862 test -s conftest.dir/conftest.one &&
5863 test -s conftest.dir/conftest.two
5864 then
5865 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5866 break 3
5867 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005868 fi
5869 fi
5870 done
5871 done
5872 ;;
5873esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005874
5875 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005876IFS=$as_save_IFS
5877
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005878rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005879
5880fi
5881 if test "${ac_cv_path_install+set}" = set; then
5882 INSTALL=$ac_cv_path_install
5883 else
5884 # As a last resort, use the slow shell script. Don't cache a
5885 # value for INSTALL within a source directory, because that will
5886 # break other packages using the cache if that directory is
5887 # removed, or if the value is a relative name.
5888 INSTALL=$ac_install_sh
5889 fi
5890fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005891{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5892$as_echo "$INSTALL" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005893
5894# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5895# It thinks the first close brace ends the variable substitution.
5896test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5897
5898test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5899
5900test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5901
Trent Nelsonf6407a12012-08-30 14:56:13 +00005902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
5903$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
5904if test -z "$MKDIR_P"; then
5905 if ${ac_cv_path_mkdir+:} false; then :
5906 $as_echo_n "(cached) " >&6
5907else
5908 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5909for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
5910do
5911 IFS=$as_save_IFS
5912 test -z "$as_dir" && as_dir=.
5913 for ac_prog in mkdir gmkdir; do
5914 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005915 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Trent Nelsonf6407a12012-08-30 14:56:13 +00005916 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
5917 'mkdir (GNU coreutils) '* | \
5918 'mkdir (coreutils) '* | \
5919 'mkdir (fileutils) '4.1*)
5920 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
5921 break 3;;
5922 esac
5923 done
5924 done
5925 done
5926IFS=$as_save_IFS
5927
5928fi
5929
5930 test -d ./--version && rmdir ./--version
5931 if test "${ac_cv_path_mkdir+set}" = set; then
5932 MKDIR_P="$ac_cv_path_mkdir -p"
5933 else
5934 # As a last resort, use the slow shell script. Don't cache a
5935 # value for MKDIR_P within a source directory, because that will
5936 # break other packages using the cache if that directory is
5937 # removed, or if the value is a relative name.
5938 MKDIR_P="$ac_install_sh -d"
5939 fi
5940fi
5941{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
5942$as_echo "$MKDIR_P" >&6; }
5943
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005944
5945# Not every filesystem supports hard links
5946
5947if test -z "$LN" ; then
5948 case $ac_sys_system in
5949 BeOS*) LN="ln -s";;
5950 CYGWIN*) LN="ln -s";;
5951 atheos*) LN="ln -s";;
5952 *) LN=ln;;
5953 esac
5954fi
5955
5956# Check for --with-pydebug
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
5958$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005959
5960# Check whether --with-pydebug was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005961if test "${with_pydebug+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005962 withval=$with_pydebug;
5963if test "$withval" != no
5964then
5965
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005966$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005967
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5969$as_echo "yes" >&6; };
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005970 Py_DEBUG='true'
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005971else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5972$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005973fi
5974else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5976$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005977fi
5978
5979
5980# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5981# merged with this chunk of code?
5982
5983# Optimizer/debugger flags
5984# ------------------------
5985# (The following bit of code is complicated enough - please keep things
5986# indented properly. Just pretend you're editing Python code. ;-)
5987
5988# There are two parallel sets of case statements below, one that checks to
5989# see if OPT was set and one that does BASECFLAGS setting based upon
5990# compiler and platform. BASECFLAGS tweaks need to be made even if the
5991# user set OPT.
5992
5993# tweak OPT based on compiler and platform, only if the user didn't set
5994# it on the command line
5995
Benjamin Petersond4b721b2010-03-23 20:58:37 +00005996if test "${OPT-unset}" = "unset"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005997then
5998 case $GCC in
5999 yes)
6000 if test "$CC" != 'g++' ; then
6001 STRICT_PROTO="-Wstrict-prototypes"
6002 fi
6003 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6004 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6005 WRAP="-fwrapv"
6006 fi
Stefan Krah503e5e12011-09-14 15:19:42 +02006007
6008 # Clang also needs -fwrapv
Stefan Krah2bc1e8f2011-12-08 22:26:06 +01006009 case $CC in
6010 *clang*) WRAP="-fwrapv"
6011 ;;
6012 esac
Stefan Krah503e5e12011-09-14 15:19:42 +02006013
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006014 case $ac_cv_prog_cc_g in
6015 yes)
6016 if test "$Py_DEBUG" = 'true' ; then
6017 # Optimization messes up debuggers, so turn it off for
6018 # debug builds.
Mark Dickinsond2f3e3f2010-05-05 22:23:58 +00006019 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006020 else
6021 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
6022 fi
6023 ;;
6024 *)
6025 OPT="-O3 -Wall $STRICT_PROTO"
6026 ;;
6027 esac
6028 case $ac_sys_system in
6029 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6030 ;;
6031 esac
6032 ;;
6033
6034 *)
6035 OPT="-O"
6036 ;;
6037 esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006038fi
6039
6040
6041
6042# The -arch flags for universal builds on OSX
6043UNIVERSAL_ARCH_FLAGS=
6044
6045
6046# tweak BASECFLAGS based on compiler and platform
6047case $GCC in
6048yes)
6049 # Python violates C99 rules, by casting between incompatible
6050 # pointer types. GCC may generate bad code as a result of that,
6051 # so use -fno-strict-aliasing if supported.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006052 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -fno-strict-aliasing" >&5
6053$as_echo_n "checking whether $CC accepts -fno-strict-aliasing... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006054 ac_save_cc="$CC"
6055 CC="$CC -fno-strict-aliasing"
Matthias Klose3cef2a92012-03-14 23:39:33 +01006056 if ${ac_cv_no_strict_aliasing_ok+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006057 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00006058else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006059 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006060/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00006061
6062int
6063main ()
6064{
Mark Dickinson5e13e292010-05-11 08:55:06 +00006065
Gregory P. Smith373469a2009-11-01 21:03:38 +00006066 ;
6067 return 0;
6068}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006069_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006070if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006071 ac_cv_no_strict_aliasing_ok=yes
6072else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006073 ac_cv_no_strict_aliasing_ok=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006074fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00006075rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00006076fi
6077
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006078 CC="$ac_save_cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing_ok" >&5
6080$as_echo "$ac_cv_no_strict_aliasing_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006081 if test $ac_cv_no_strict_aliasing_ok = yes
6082 then
6083 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6084 fi
6085
6086 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
6087 # support. Without this, treatment of subnormals doesn't follow
6088 # the standard.
doko@python.orgd65e2ba2013-01-31 23:52:03 +01006089 case $host in
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006090 alpha*)
6091 BASECFLAGS="$BASECFLAGS -mieee"
6092 ;;
6093 esac
6094
6095 case $ac_sys_system in
6096 SCO_SV*)
6097 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
6098 ;;
6099 # is there any other compiler on Darwin besides gcc?
6100 Darwin*)
6101 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
6102 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006103 if test "${CC}" = gcc
6104 then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006105 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
6106$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006107 case "${UNIVERSALSDK}" in
6108 */MacOSX10.4u.sdk)
6109 # Build using 10.4 SDK, force usage of gcc when the
6110 # compiler is gcc, otherwise the user will get very
6111 # confusing error messages when building on OSX 10.6
6112 CC=gcc-4.0
6113 CPP=cpp-4.0
6114 ;;
6115 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
6117$as_echo "$CC" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006118 fi
6119
6120 # Calculate the right deployment target for this build.
6121 #
Ned Deilyc40b9032014-06-25 13:48:46 -07006122 cur_target_major=`sw_vers -productVersion | \
6123 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
6124 cur_target_minor=`sw_vers -productVersion | \
6125 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
6126 cur_target="${cur_target_major}.${cur_target_minor}"
6127 if test ${cur_target_major} -eq 10 && \
6128 test ${cur_target_minor} -ge 3
6129 then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006130 cur_target=10.3
Ronald Oussoren25967582009-09-06 10:00:26 +00006131 if test ${enable_universalsdk}; then
6132 if test "${UNIVERSAL_ARCHS}" = "all"; then
6133 # Ensure that the default platform for a
6134 # 4-way universal build is OSX 10.5,
6135 # that's the first OS release where
6136 # 4-way builds make sense.
6137 cur_target='10.5'
Ronald Oussoren23d92532009-09-07 06:12:00 +00006138
6139 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
6140 cur_target='10.5'
6141
6142 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
6143 cur_target='10.5'
6144
6145 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
6146 cur_target='10.5'
Ronald Oussoren25967582009-09-06 10:00:26 +00006147 fi
6148 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00006149 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren25967582009-09-06 10:00:26 +00006150 # On Intel macs default to a deployment
6151 # target of 10.4, that's the first OSX
6152 # release with Intel support.
6153 cur_target="10.4"
6154 fi
6155 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006156 fi
6157 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
6158
6159 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
6160 # environment with a value that is the same as what we'll use
6161 # in the Makefile to ensure that we'll get the same compiler
6162 # environment during configure and build time.
6163 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
6164 export MACOSX_DEPLOYMENT_TARGET
6165 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
6166
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006167 if test "${enable_universalsdk}"; then
6168 UNIVERSAL_ARCH_FLAGS=""
6169 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
6170 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
6171 ARCH_RUN_32BIT=""
Ronald Oussoren75912852010-04-08 08:13:31 +00006172 LIPO_32BIT_FLAGS=""
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006173
6174 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
6175 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
6176 LIPO_32BIT_FLAGS=""
6177 ARCH_RUN_32BIT="true"
6178
6179 elif test "$UNIVERSAL_ARCHS" = "all" ; then
6180 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
6181 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren92397ce2010-01-17 19:32:00 +00006182 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006183
6184 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
6185 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
6186 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren92397ce2010-01-17 19:32:00 +00006187 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006188
6189 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
6190 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
6191 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren9922f172010-02-11 13:19:34 +00006192 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006193
6194 else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006195 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 +00006196
6197 fi
6198
6199
Ronald Oussoren974eb5e2010-04-18 17:59:37 +00006200 CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
6201 if test "${UNIVERSALSDK}" != "/"
6202 then
6203 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
6204 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
6205 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006206 fi
6207
6208 fi
6209
6210
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006211 ;;
6212 OSF*)
6213 BASECFLAGS="$BASECFLAGS -mieee"
6214 ;;
6215 esac
6216 ;;
6217
6218*)
6219 case $ac_sys_system in
6220 OpenUNIX*|UnixWare*)
6221 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
6222 ;;
6223 OSF*)
6224 BASECFLAGS="$BASECFLAGS -ieee -std"
6225 ;;
6226 SCO_SV*)
6227 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
6228 ;;
6229 esac
6230 ;;
6231esac
6232
Zachary Ware6ed42ea2015-12-21 11:43:03 -06006233# ICC needs -fp-model strict or floats behave badly
6234case "$CC" in
6235*icc*)
6236 BASECFLAGS="$BASECFLAGS -fp-model strict"
6237 ;;
6238esac
6239
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006240if test "$Py_DEBUG" = 'true'; then
6241 :
6242else
6243 OPT="-DNDEBUG $OPT"
6244fi
6245
6246if test "$ac_arch_flags"
6247then
6248 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
6249fi
6250
6251# disable check for icc since it seems to pass, but generates a warning
6252if test "$CC" = icc
6253then
6254 ac_cv_opt_olimit_ok=no
6255fi
6256
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -OPT:Olimit=0" >&5
6258$as_echo_n "checking whether $CC accepts -OPT:Olimit=0... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006259if ${ac_cv_opt_olimit_ok+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006260 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006261else
6262 ac_save_cc="$CC"
6263CC="$CC -OPT:Olimit=0"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006264cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006265/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00006266
6267int
6268main ()
6269{
Mark Dickinson5e13e292010-05-11 08:55:06 +00006270
Gregory P. Smith373469a2009-11-01 21:03:38 +00006271 ;
6272 return 0;
6273}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006274_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006275if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006276 ac_cv_opt_olimit_ok=yes
6277else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006278 ac_cv_opt_olimit_ok=no
Matthias Klosec511b472010-05-08 11:01:39 +00006279
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006280fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00006281rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006282CC="$ac_save_cc"
6283fi
6284
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006285{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_opt_olimit_ok" >&5
6286$as_echo "$ac_cv_opt_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006287if test $ac_cv_opt_olimit_ok = yes; then
6288 case $ac_sys_system in
6289 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
6290 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
6291 # environment?
6292 Darwin*)
6293 ;;
Trent Nelson34562e12012-10-17 18:01:12 -04006294 # XXX thankfully this useless troublemaker of a flag has been
6295 # eradicated in the 3.x line. For now, make sure it isn't picked
6296 # up by any of our other platforms that use CC.
6297 AIX*|SunOS*|HP-UX*|IRIX*)
6298 ;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006299 *)
6300 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
6301 ;;
6302 esac
6303else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006304 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Olimit 1500" >&5
6305$as_echo_n "checking whether $CC accepts -Olimit 1500... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006306 if ${ac_cv_olimit_ok+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006307 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006308else
6309 ac_save_cc="$CC"
6310 CC="$CC -Olimit 1500"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006311 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006312/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00006313
6314int
6315main ()
6316{
Mark Dickinson5e13e292010-05-11 08:55:06 +00006317
Gregory P. Smith373469a2009-11-01 21:03:38 +00006318 ;
6319 return 0;
6320}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006321_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006322if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006323 ac_cv_olimit_ok=yes
6324else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006325 ac_cv_olimit_ok=no
Matthias Klosec511b472010-05-08 11:01:39 +00006326
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006327fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00006328rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006329 CC="$ac_save_cc"
6330fi
6331
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_olimit_ok" >&5
6333$as_echo "$ac_cv_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006334 if test $ac_cv_olimit_ok = yes; then
Stefan Krah67473262012-11-29 00:17:05 +01006335 case $ac_sys_system in
6336 # Issue #16534: On HP-UX ac_cv_olimit_ok=yes is a false positive.
6337 HP-UX*)
6338 ;;
6339 *)
6340 BASECFLAGS="$BASECFLAGS -Olimit 1500"
6341 ;;
6342 esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006343 fi
6344fi
6345
6346# Check whether GCC supports PyArg_ParseTuple format
6347if test "$GCC" = "yes"
6348then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006349 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
6350$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006351 save_CFLAGS=$CFLAGS
Benjamin Petersonc8759662013-05-11 13:00:05 -05006352 CFLAGS="$CFLAGS -Werror -Wformat"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006353 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006354/* end confdefs.h. */
6355
6356 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006357int
6358main ()
6359{
6360
6361 ;
6362 return 0;
6363}
Matthias Klosec511b472010-05-08 11:01:39 +00006364
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006365_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006366if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006367
Matthias Klosec511b472010-05-08 11:01:39 +00006368
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006369$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006370
Matthias Klosec511b472010-05-08 11:01:39 +00006371 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006372$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00006373
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006374else
Matthias Klosec511b472010-05-08 11:01:39 +00006375
6376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006377$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006378
6379fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006380rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6381 CFLAGS=$save_CFLAGS
6382fi
6383
Brett Cannon4ff151a2015-09-18 15:09:42 -07006384
Gregory P. Smith6d8fdfc2016-09-07 23:28:23 -07006385# Enable optimization flags
6386
6387
6388Py_OPT='false'
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)b9999152016-11-20 21:19:36 +00006389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-optimizations" >&5
6390$as_echo_n "checking for --enable-optimizations... " >&6; }
6391# Check whether --enable-optimizations was given.
6392if test "${enable_optimizations+set}" = set; then :
6393 enableval=$enable_optimizations;
Gregory P. Smith6d8fdfc2016-09-07 23:28:23 -07006394if test "$withval" != no
6395then
6396 Py_OPT='true'
6397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6398$as_echo "yes" >&6; };
6399else
6400 Py_OPT='false'
6401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6402$as_echo "no" >&6; };
6403fi
6404else
6405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6406$as_echo "no" >&6; }
6407fi
6408
6409if test "$Py_OPT" = 'true' ; then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)9cbfa792016-09-08 22:44:44 +00006410 # Intentionally not forcing Py_LTO='true' here. Too many toolchains do not
6411 # compile working code using it and both test_distutils and test_gdb are
6412 # broken when you do managed to get a toolchain that works with it. People
6413 # who want LTO need to use --with-lto themselves.
Gregory P. Smith6d8fdfc2016-09-07 23:28:23 -07006414 Py_LTO='true'
6415 DEF_MAKE_ALL_RULE="profile-opt"
Gregory P. Smith794b2912016-09-08 00:07:40 -07006416 REQUIRE_PGO="yes"
Gregory P. Smith6d8fdfc2016-09-07 23:28:23 -07006417 DEF_MAKE_RULE="build_all"
6418else
6419 DEF_MAKE_ALL_RULE="build_all"
Gregory P. Smith794b2912016-09-08 00:07:40 -07006420 REQUIRE_PGO="no"
Gregory P. Smith6d8fdfc2016-09-07 23:28:23 -07006421 DEF_MAKE_RULE="all"
6422fi
6423
6424
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)c543a0f2016-06-02 23:44:40 +00006425# Enable LTO flags
6426
6427{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6428$as_echo_n "checking for --with-lto... " >&6; }
6429
6430# Check whether --with-lto was given.
6431if test "${with_lto+set}" = set; then :
6432 withval=$with_lto;
6433if test "$withval" != no
6434then
6435 Py_LTO='true'
6436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6437$as_echo "yes" >&6; };
6438else
6439 Py_LTO='false'
6440 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6441$as_echo "no" >&6; };
6442fi
6443else
6444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6445$as_echo "no" >&6; }
6446fi
6447
6448if test "$Py_LTO" = 'true' ; then
6449 case $CC in
6450 *clang*)
6451 # Any changes made here should be reflected in the GCC+Darwin case below
6452 LTOFLAGS="-flto"
6453 ;;
6454 *gcc*)
6455 case $ac_sys_system in
6456 Darwin*)
6457 LTOFLAGS="-flto"
6458 ;;
6459 *)
6460 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6461 ;;
6462 esac
6463 ;;
6464 esac
6465fi
6466
6467
Brett Cannon4ff151a2015-09-18 15:09:42 -07006468# Enable PGO flags.
Zachary Ware6ed42ea2015-12-21 11:43:03 -06006469
6470
6471
6472
6473
Gregory P. Smith794b2912016-09-08 00:07:40 -07006474# Make this work on systems where llvm tools are not installed with their
6475# normal names in the default $PATH (ie: Ubuntu). They exist under the
6476# non-suffixed name in their versioned llvm directory.
6477llvm_bin_dir=''
6478llvm_path="${PATH}"
6479if test "${CC}" = "clang"
6480then
6481 clang_bin=`which clang`
6482 # Some systems install clang elsewhere as a symlink to the real path
6483 # which is where the related llvm tools are located.
6484 if test -L "${clang_bin}"
6485 then
6486 clang_dir=`dirname "${clang_bin}"`
6487 clang_bin=`readlink "${clang_bin}"`
6488 llvm_bin_dir="${clang_dir}/"`dirname "${clang_bin}"`
6489 llvm_path="${llvm_path}${PATH_SEPARATOR}${llvm_bin_dir}"
6490 fi
6491fi
Zachary Ware6ed42ea2015-12-21 11:43:03 -06006492
Gregory P. Smith794b2912016-09-08 00:07:40 -07006493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6494$as_echo_n "checking target system type... " >&6; }
6495if ${ac_cv_target+:} false; then :
Brett Cannon4ff151a2015-09-18 15:09:42 -07006496 $as_echo_n "(cached) " >&6
6497else
Gregory P. Smith794b2912016-09-08 00:07:40 -07006498 if test "x$target_alias" = x; then
6499 ac_cv_target=$ac_cv_host
Brett Cannon4ff151a2015-09-18 15:09:42 -07006500else
Gregory P. Smith794b2912016-09-08 00:07:40 -07006501 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6502 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6503fi
6504
6505fi
6506{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6507$as_echo "$ac_cv_target" >&6; }
6508case $ac_cv_target in
6509*-*-*) ;;
6510*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6511esac
6512target=$ac_cv_target
6513ac_save_IFS=$IFS; IFS='-'
6514set x $ac_cv_target
6515shift
6516target_cpu=$1
6517target_vendor=$2
6518shift; shift
6519# Remember, the first character of IFS is used to create $*,
6520# except with old shells:
6521target_os=$*
6522IFS=$ac_save_IFS
6523case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6524
6525
6526# The aliases save the names the user supplied, while $host etc.
6527# will get canonicalized.
6528test -n "$target_alias" &&
6529 test "$program_prefix$program_suffix$program_transform_name" = \
6530 NONENONEs,x,x, &&
6531 program_prefix=${target_alias}-
6532# Extract the first word of "$target_alias-llvm-profdata", so it can be a program name with args.
6533set dummy $target_alias-llvm-profdata; ac_word=$2
6534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6535$as_echo_n "checking for $ac_word... " >&6; }
6536if ${ac_cv_path_LLVM_PROFDATA+:} false; then :
6537 $as_echo_n "(cached) " >&6
6538else
6539 case $LLVM_PROFDATA in
6540 [\\/]* | ?:[\\/]*)
6541 ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path.
6542 ;;
6543 *)
6544 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6545for as_dir in ${llvm_path}
Brett Cannon4ff151a2015-09-18 15:09:42 -07006546do
6547 IFS=$as_save_IFS
6548 test -z "$as_dir" && as_dir=.
6549 for ac_exec_ext in '' $ac_executable_extensions; do
6550 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Gregory P. Smith794b2912016-09-08 00:07:40 -07006551 ac_cv_path_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
Brett Cannon4ff151a2015-09-18 15:09:42 -07006552 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6553 break 2
6554 fi
6555done
6556 done
6557IFS=$as_save_IFS
6558
Gregory P. Smith794b2912016-09-08 00:07:40 -07006559 ;;
6560esac
Brett Cannon4ff151a2015-09-18 15:09:42 -07006561fi
Gregory P. Smith794b2912016-09-08 00:07:40 -07006562LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA
6563if test -n "$LLVM_PROFDATA"; then
6564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5
6565$as_echo "$LLVM_PROFDATA" >&6; }
Brett Cannon4ff151a2015-09-18 15:09:42 -07006566else
6567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6568$as_echo "no" >&6; }
6569fi
6570
6571
Gregory P. Smith794b2912016-09-08 00:07:40 -07006572if test -z "$ac_cv_path_LLVM_PROFDATA"; then
6573 if test "$build" = "$target"; then
6574 ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA
6575 # Extract the first word of "llvm-profdata", so it can be a program name with args.
6576set dummy llvm-profdata; ac_word=$2
6577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6578$as_echo_n "checking for $ac_word... " >&6; }
6579if ${ac_cv_path_ac_pt_LLVM_PROFDATA+:} false; then :
6580 $as_echo_n "(cached) " >&6
6581else
6582 case $ac_pt_LLVM_PROFDATA in
6583 [\\/]* | ?:[\\/]*)
6584 ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path.
6585 ;;
6586 *)
6587 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6588for as_dir in ${llvm_path}
6589do
6590 IFS=$as_save_IFS
6591 test -z "$as_dir" && as_dir=.
6592 for ac_exec_ext in '' $ac_executable_extensions; do
6593 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6594 ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
6595 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6596 break 2
6597 fi
6598done
6599 done
6600IFS=$as_save_IFS
6601
6602 test -z "$ac_cv_path_ac_pt_LLVM_PROFDATA" && ac_cv_path_ac_pt_LLVM_PROFDATA="''"
6603 ;;
6604esac
6605fi
6606ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA
6607if test -n "$ac_pt_LLVM_PROFDATA"; then
6608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5
6609$as_echo "$ac_pt_LLVM_PROFDATA" >&6; }
6610else
6611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6612$as_echo "no" >&6; }
6613fi
6614
6615 LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA
6616 else
6617 LLVM_PROFDATA="''"
6618 fi
6619else
6620 LLVM_PROFDATA="$ac_cv_path_LLVM_PROFDATA"
6621fi
6622
6623
6624if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
6625then
6626 LLVM_PROF_FOUND="found"
6627else
6628 LLVM_PROF_FOUND="not-found"
6629fi
6630if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
6631then
6632 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
6633 if test -n "${found_llvm_profdata}"
6634 then
6635 # llvm-profdata isn't directly in $PATH in some cases.
6636 # https://apple.stackexchange.com/questions/197053/
6637 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
6638 LLVM_PROF_FOUND=found
6639 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5
6640$as_echo "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;}
6641 fi
6642fi
Brett Cannon4ff151a2015-09-18 15:09:42 -07006643LLVM_PROF_ERR=no
6644case $CC in
6645 *clang*)
6646 # Any changes made here should be reflected in the GCC+Darwin case below
6647 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6648 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith794b2912016-09-08 00:07:40 -07006649 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon4ff151a2015-09-18 15:09:42 -07006650 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6651 if test $LLVM_PROF_FOUND = not-found
6652 then
6653 LLVM_PROF_ERR=yes
Gregory P. Smith794b2912016-09-08 00:07:40 -07006654 if test "${REQUIRE_PGO}" = "yes"
6655 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)b9999152016-11-20 21:19:36 +00006656 as_fn_error $? "llvm-profdata is required for a --enable-optimizations build but could not be found." "$LINENO" 5
Gregory P. Smith794b2912016-09-08 00:07:40 -07006657 fi
Brett Cannon4ff151a2015-09-18 15:09:42 -07006658 fi
6659 ;;
6660 *gcc*)
6661 case $ac_sys_system in
6662 Darwin*)
6663 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6664 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith794b2912016-09-08 00:07:40 -07006665 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon4ff151a2015-09-18 15:09:42 -07006666 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
Gregory P. Smith794b2912016-09-08 00:07:40 -07006667 if test "${LLVM_PROF_FOUND}" = "not-found"
Brett Cannon4ff151a2015-09-18 15:09:42 -07006668 then
6669 LLVM_PROF_ERR=yes
Gregory P. Smith794b2912016-09-08 00:07:40 -07006670 if test "${REQUIRE_PGO}" = "yes"
6671 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)b9999152016-11-20 21:19:36 +00006672 as_fn_error $? "llvm-profdata is required for a --enable-optimizations build but could not be found." "$LINENO" 5
Gregory P. Smith794b2912016-09-08 00:07:40 -07006673 fi
Brett Cannon4ff151a2015-09-18 15:09:42 -07006674 fi
6675 ;;
6676 *)
6677 PGO_PROF_GEN_FLAG="-fprofile-generate"
6678 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6679 LLVM_PROF_MERGER="true"
6680 LLVM_PROF_FILE=""
6681 ;;
6682 esac
6683 ;;
Zachary Ware6ed42ea2015-12-21 11:43:03 -06006684 *icc*)
6685 PGO_PROF_GEN_FLAG="-prof-gen"
6686 PGO_PROF_USE_FLAG="-prof-use"
6687 LLVM_PROF_MERGER="true"
6688 LLVM_PROF_FILE=""
6689 ;;
Brett Cannon4ff151a2015-09-18 15:09:42 -07006690esac
6691
6692
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006693# On some compilers, pthreads are available without further options
6694# (e.g. MacOS X). On some of these systems, the compiler will not
6695# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
6696# So we have to see first whether pthreads are available without
6697# options before we can check whether -Kpthread improves anything.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
6699$as_echo_n "checking whether pthreads are available without options... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006700if ${ac_cv_pthread_is_default+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006701 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006702else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006703 if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006704 ac_cv_pthread_is_default=no
6705else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006706 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006707/* end confdefs.h. */
6708
Stefan Krahae66ca62012-11-22 22:36:57 +01006709#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006710#include <pthread.h>
6711
6712void* routine(void* p){return NULL;}
6713
6714int main(){
6715 pthread_t p;
6716 if(pthread_create(&p,NULL,routine,NULL)!=0)
6717 return 1;
6718 (void)pthread_detach(p);
6719 return 0;
6720}
6721
6722_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006723if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006724
6725 ac_cv_pthread_is_default=yes
6726 ac_cv_kthread=no
6727 ac_cv_pthread=no
6728
6729else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006730 ac_cv_pthread_is_default=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006731fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006732rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6733 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006734fi
6735
6736
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006737fi
6738
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006739{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
6740$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006741
6742
6743if test $ac_cv_pthread_is_default = yes
6744then
6745 ac_cv_kpthread=no
6746else
6747# -Kpthread, if available, provides the right #defines
6748# and linker options to make pthread_create available
6749# Some compilers won't report that they do not support -Kpthread,
6750# so we need to run a program to see whether it really made the
6751# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
6753$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006754if ${ac_cv_kpthread+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006755 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006756else
6757 ac_save_cc="$CC"
6758CC="$CC -Kpthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006759if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006760 ac_cv_kpthread=no
6761else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006762 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006763/* end confdefs.h. */
6764
Stefan Krahae66ca62012-11-22 22:36:57 +01006765#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006766#include <pthread.h>
6767
6768void* routine(void* p){return NULL;}
6769
6770int main(){
6771 pthread_t p;
6772 if(pthread_create(&p,NULL,routine,NULL)!=0)
6773 return 1;
6774 (void)pthread_detach(p);
6775 return 0;
6776}
6777
6778_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006779if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006780 ac_cv_kpthread=yes
6781else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006782 ac_cv_kpthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006783fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006784rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6785 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006786fi
6787
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006788CC="$ac_save_cc"
6789fi
6790
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006791{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
6792$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006793fi
6794
6795if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
6796then
6797# -Kthread, if available, provides the right #defines
6798# and linker options to make pthread_create available
6799# Some compilers won't report that they do not support -Kthread,
6800# so we need to run a program to see whether it really made the
6801# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
6803$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006804if ${ac_cv_kthread+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006805 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006806else
6807 ac_save_cc="$CC"
6808CC="$CC -Kthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006809if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006810 ac_cv_kthread=no
6811else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006812 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006813/* end confdefs.h. */
6814
Stefan Krahae66ca62012-11-22 22:36:57 +01006815#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006816#include <pthread.h>
6817
6818void* routine(void* p){return NULL;}
6819
6820int main(){
6821 pthread_t p;
6822 if(pthread_create(&p,NULL,routine,NULL)!=0)
6823 return 1;
6824 (void)pthread_detach(p);
6825 return 0;
6826}
6827
6828_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006829if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006830 ac_cv_kthread=yes
6831else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006832 ac_cv_kthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006833fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006834rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6835 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006836fi
6837
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006838CC="$ac_save_cc"
6839fi
6840
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006841{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
6842$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006843fi
6844
6845if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
6846then
6847# -pthread, if available, provides the right #defines
6848# and linker options to make pthread_create available
6849# Some compilers won't report that they do not support -pthread,
6850# so we need to run a program to see whether it really made the
6851# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
6853$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.orgfa3f9a32013-01-25 15:32:31 +01006854if ${ac_cv_pthread+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006855 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006856else
6857 ac_save_cc="$CC"
6858CC="$CC -pthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006859if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006860 ac_cv_pthread=no
6861else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006862 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006863/* end confdefs.h. */
6864
Stefan Krahae66ca62012-11-22 22:36:57 +01006865#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006866#include <pthread.h>
6867
6868void* routine(void* p){return NULL;}
6869
6870int main(){
6871 pthread_t p;
6872 if(pthread_create(&p,NULL,routine,NULL)!=0)
6873 return 1;
6874 (void)pthread_detach(p);
6875 return 0;
6876}
6877
6878_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006879if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006880 ac_cv_pthread=yes
6881else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006882 ac_cv_pthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006883fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006884rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6885 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006886fi
6887
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006888CC="$ac_save_cc"
6889fi
6890
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006891{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
6892$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006893fi
6894
6895# If we have set a CC compiler flag for thread support then
6896# check if it works for CXX, too.
6897ac_cv_cxx_thread=no
6898if test ! -z "$CXX"
6899then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
6901$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006902ac_save_cxx="$CXX"
6903
6904if test "$ac_cv_kpthread" = "yes"
6905then
6906 CXX="$CXX -Kpthread"
6907 ac_cv_cxx_thread=yes
6908elif test "$ac_cv_kthread" = "yes"
6909then
6910 CXX="$CXX -Kthread"
6911 ac_cv_cxx_thread=yes
6912elif test "$ac_cv_pthread" = "yes"
6913then
6914 CXX="$CXX -pthread"
6915 ac_cv_cxx_thread=yes
6916fi
6917
6918if test $ac_cv_cxx_thread = yes
6919then
6920 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
6921 $CXX -c conftest.$ac_ext 2>&5
6922 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
6923 && test -s conftest$ac_exeext && ./conftest$ac_exeext
6924 then
6925 ac_cv_cxx_thread=yes
6926 else
6927 ac_cv_cxx_thread=no
6928 fi
6929 rm -fr conftest*
6930fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006931{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
6932$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006933fi
6934CXX="$ac_save_cxx"
6935
6936
6937# checks for header files
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6939$as_echo_n "checking for ANSI C header files... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006940if ${ac_cv_header_stdc+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006941 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006942else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006943 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006944/* end confdefs.h. */
6945#include <stdlib.h>
6946#include <stdarg.h>
6947#include <string.h>
6948#include <float.h>
6949
6950int
6951main ()
6952{
6953
6954 ;
6955 return 0;
6956}
6957_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006958if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006959 ac_cv_header_stdc=yes
6960else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006961 ac_cv_header_stdc=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006962fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006963rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6964
6965if test $ac_cv_header_stdc = yes; then
6966 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006967 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006968/* end confdefs.h. */
6969#include <string.h>
6970
6971_ACEOF
6972if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006973 $EGREP "memchr" >/dev/null 2>&1; then :
6974
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006975else
6976 ac_cv_header_stdc=no
6977fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006978rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006979
6980fi
6981
6982if test $ac_cv_header_stdc = yes; then
6983 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006984 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006985/* end confdefs.h. */
6986#include <stdlib.h>
6987
6988_ACEOF
6989if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006990 $EGREP "free" >/dev/null 2>&1; then :
6991
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006992else
6993 ac_cv_header_stdc=no
6994fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006995rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006996
6997fi
6998
6999if test $ac_cv_header_stdc = yes; then
7000 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007001 if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007002 :
7003else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007004 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007005/* end confdefs.h. */
7006#include <ctype.h>
7007#include <stdlib.h>
7008#if ((' ' & 0x0FF) == 0x020)
7009# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7010# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7011#else
7012# define ISLOWER(c) \
7013 (('a' <= (c) && (c) <= 'i') \
7014 || ('j' <= (c) && (c) <= 'r') \
7015 || ('s' <= (c) && (c) <= 'z'))
7016# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7017#endif
7018
7019#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7020int
7021main ()
7022{
7023 int i;
7024 for (i = 0; i < 256; i++)
7025 if (XOR (islower (i), ISLOWER (i))
7026 || toupper (i) != TOUPPER (i))
7027 return 2;
7028 return 0;
7029}
7030_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007031if ac_fn_c_try_run "$LINENO"; then :
7032
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007033else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007034 ac_cv_header_stdc=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007035fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007036rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7037 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007038fi
7039
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007040fi
7041fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007042{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7043$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007044if test $ac_cv_header_stdc = yes; then
7045
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007046$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007047
7048fi
7049
doko@ubuntu.comf27ec3e2014-04-17 20:11:19 +02007050for ac_header in asm/types.h conio.h direct.h dlfcn.h errno.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00007051fcntl.h grp.h \
doko@ubuntu.comf27ec3e2014-04-17 20:11:19 +02007052ieeefp.h io.h langinfo.h libintl.h poll.h process.h pthread.h \
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00007053shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00007054unistd.h utime.h \
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00007055sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
7056sys/lock.h sys/mkdev.h sys/modem.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00007057sys/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 +00007058sys/termio.h sys/time.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00007059sys/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 +00007060sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimes3aa138f2013-06-18 13:25:24 +02007061bluetooth/bluetooth.h linux/tipc.h spawn.h util.h alloca.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007062do :
7063 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7064ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007065if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007066 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007067#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007068_ACEOF
7069
7070fi
7071
Guido van Rossum627b2d71993-12-24 10:39:16 +00007072done
7073
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007074ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007075for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007076 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7078$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007079if eval \${$as_ac_Header+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007080 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007081else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007082 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007083/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007084#include <sys/types.h>
7085#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007086
Martin v. Löwis11437992002-04-12 09:54:03 +00007087int
7088main ()
7089{
7090if ((DIR *) 0)
7091return 0;
7092 ;
7093 return 0;
7094}
7095_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007096if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007097 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007098else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007099 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007100fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007101rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007102fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007103eval ac_res=\$$as_ac_Header
7104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7105$as_echo "$ac_res" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007106if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007107 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007108#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007109_ACEOF
7110
7111ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007112fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007113
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007114done
7115# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7116if test $ac_header_dirent = dirent.h; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007117 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7118$as_echo_n "checking for library containing opendir... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007119if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007120 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007121else
Martin v. Löwis11437992002-04-12 09:54:03 +00007122 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007123cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007124/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007125
Martin v. Löwiseba40652007-08-30 20:10:57 +00007126/* Override any GCC internal prototype to avoid an error.
7127 Use char because int might match the return type of a GCC
7128 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007129#ifdef __cplusplus
7130extern "C"
7131#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007132char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007133int
7134main ()
7135{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007136return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007137 ;
7138 return 0;
7139}
7140_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007141for ac_lib in '' dir; do
7142 if test -z "$ac_lib"; then
7143 ac_res="none required"
7144 else
7145 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00007146 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00007147 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007148 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007149 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00007150fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007151rm -f core conftest.err conftest.$ac_objext \
7152 conftest$ac_exeext
Matthias Klose3cef2a92012-03-14 23:39:33 +01007153 if ${ac_cv_search_opendir+:} false; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007154 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00007155fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007156done
Matthias Klose3cef2a92012-03-14 23:39:33 +01007157if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007158
Martin v. Löwiseba40652007-08-30 20:10:57 +00007159else
7160 ac_cv_search_opendir=no
7161fi
7162rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007163LIBS=$ac_func_search_save_LIBS
7164fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007165{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7166$as_echo "$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007167ac_res=$ac_cv_search_opendir
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007168if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007169 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007170
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007171fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007172
Michael W. Hudson54241132001-12-07 15:38:26 +00007173else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007174 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7175$as_echo_n "checking for library containing opendir... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007176if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007177 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007178else
7179 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007180cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007181/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007182
Martin v. Löwiseba40652007-08-30 20:10:57 +00007183/* Override any GCC internal prototype to avoid an error.
7184 Use char because int might match the return type of a GCC
7185 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007186#ifdef __cplusplus
7187extern "C"
7188#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007189char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007190int
7191main ()
7192{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007193return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007194 ;
7195 return 0;
7196}
7197_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007198for ac_lib in '' x; do
7199 if test -z "$ac_lib"; then
7200 ac_res="none required"
7201 else
7202 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00007203 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00007204 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007205 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007206 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00007207fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007208rm -f core conftest.err conftest.$ac_objext \
7209 conftest$ac_exeext
Matthias Klose3cef2a92012-03-14 23:39:33 +01007210 if ${ac_cv_search_opendir+:} false; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007211 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00007212fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007213done
Matthias Klose3cef2a92012-03-14 23:39:33 +01007214if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007215
Martin v. Löwiseba40652007-08-30 20:10:57 +00007216else
7217 ac_cv_search_opendir=no
7218fi
7219rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007220LIBS=$ac_func_search_save_LIBS
7221fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007222{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7223$as_echo "$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007224ac_res=$ac_cv_search_opendir
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007225if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007226 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007227
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007228fi
7229
7230fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007231
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007232{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7233$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007234if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007235 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007236else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007237 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007238/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007239#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007240int
7241main ()
7242{
7243return makedev(0, 0);
7244 ;
7245 return 0;
7246}
7247_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007248if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007249 ac_cv_header_sys_types_h_makedev=yes
7250else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007251 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007252fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007253rm -f core conftest.err conftest.$ac_objext \
7254 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007255
7256fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007257{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7258$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007259
7260if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007261ac_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 +01007262if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007263
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007264$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007265
7266fi
7267
7268
7269
7270 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007271 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 +01007272if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007273
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007274$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007275
7276fi
7277
7278
7279 fi
7280fi
7281
Michael W. Hudson54241132001-12-07 15:38:26 +00007282
Martin v. Löwis11017b12006-01-14 18:12:57 +00007283# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00007284for ac_header in linux/netlink.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007285do :
7286 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 +00007287#ifdef HAVE_ASM_TYPES_H
7288#include <asm/types.h>
7289#endif
7290#ifdef HAVE_SYS_SOCKET_H
7291#include <sys/socket.h>
7292#endif
7293
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007294"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007295if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00007296 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007297#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007298_ACEOF
7299
7300fi
7301
7302done
7303
7304
Guido van Rossum627b2d71993-12-24 10:39:16 +00007305# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00007306was_it_defined=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
7308$as_echo_n "checking for clock_t in time.h... " >&6; }
7309cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007310/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007311#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007312
7313_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007314if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007315 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00007316 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007317else
Martin v. Löwis11437992002-04-12 09:54:03 +00007318
7319
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007320$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00007321
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007322
Guido van Rossum627b2d71993-12-24 10:39:16 +00007323fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00007324rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007325
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007326{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
7327$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00007328
Neal Norwitz11690112002-07-30 01:08:28 +00007329# Check whether using makedev requires defining _OSF_SOURCE
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
7331$as_echo_n "checking for makedev... " >&6; }
7332cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007333/* end confdefs.h. */
Jesus Cea616de772010-04-28 10:32:30 +00007334
7335#if defined(MAJOR_IN_MKDEV)
7336#include <sys/mkdev.h>
7337#elif defined(MAJOR_IN_SYSMACROS)
7338#include <sys/sysmacros.h>
7339#else
Neal Norwitz6eb37f02003-02-23 23:28:15 +00007340#include <sys/types.h>
Jesus Cea616de772010-04-28 10:32:30 +00007341#endif
Neal Norwitz11690112002-07-30 01:08:28 +00007342int
7343main ()
7344{
7345 makedev(0, 0)
7346 ;
7347 return 0;
7348}
7349_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007350if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007351 ac_cv_has_makedev=yes
7352else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007353 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007354fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007355rm -f core conftest.err conftest.$ac_objext \
7356 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00007357if test "$ac_cv_has_makedev" = "no"; then
7358 # we didn't link, try if _OSF_SOURCE will allow us to link
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007359 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007360/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00007361
Neal Norwitz6eb37f02003-02-23 23:28:15 +00007362#define _OSF_SOURCE 1
7363#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00007364
Neal Norwitz11690112002-07-30 01:08:28 +00007365int
7366main ()
7367{
7368 makedev(0, 0)
7369 ;
7370 return 0;
7371}
7372_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007373if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007374 ac_cv_has_makedev=yes
7375else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007376 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007377fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007378rm -f core conftest.err conftest.$ac_objext \
7379 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00007380 if test "$ac_cv_has_makedev" = "yes"; then
7381
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007382$as_echo "#define _OSF_SOURCE 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007383
7384 fi
7385fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007386{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
7387$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007388if test "$ac_cv_has_makedev" = "yes"; then
7389
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007390$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007391
7392fi
7393
Martin v. Löwis399a6892002-10-04 10:22:02 +00007394# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
7395# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
7396# defined, but the compiler does not support pragma redefine_extname,
7397# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
7398# structures (such as rlimit64) without declaring them. As a
7399# work-around, disable LFS on such configurations
7400
7401use_lfs=yes
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007402{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
7403$as_echo_n "checking Solaris LFS bug... " >&6; }
7404cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007405/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00007406
7407#define _LARGEFILE_SOURCE 1
7408#define _FILE_OFFSET_BITS 64
7409#include <sys/resource.h>
7410
Martin v. Löwis399a6892002-10-04 10:22:02 +00007411int
7412main ()
7413{
7414struct rlimit foo;
7415 ;
7416 return 0;
7417}
7418_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007419if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00007420 sol_lfs_bug=no
7421else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007422 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00007423fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007424rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007425{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
7426$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00007427if test "$sol_lfs_bug" = "yes"; then
7428 use_lfs=no
7429fi
7430
7431if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00007432# Two defines needed to enable largefile support on various platforms
7433# These may affect some typedefs
Georg Brandl94800df2011-02-25 11:09:02 +00007434case $ac_sys_system/$ac_sys_release in
7435AIX*)
7436
7437$as_echo "#define _LARGE_FILES 1" >>confdefs.h
7438
7439 ;;
7440esac
Guido van Rossum810cc512001-09-09 23:51:39 +00007441
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007442$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007443
7444
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007445$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00007446
Martin v. Löwis399a6892002-10-04 10:22:02 +00007447fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007448
Guido van Rossum84e7b241996-08-19 21:59:00 +00007449# Add some code to confdefs.h so that the test for off_t works on SCO
7450cat >> confdefs.h <<\EOF
7451#if defined(SCO_DS)
7452#undef _OFF_T
7453#endif
7454EOF
7455
Guido van Rossumef2255b2000-03-10 22:30:29 +00007456# Type availability checks
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007457ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007458if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007459
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007460else
Martin v. Löwis11437992002-04-12 09:54:03 +00007461
7462cat >>confdefs.h <<_ACEOF
7463#define mode_t int
7464_ACEOF
7465
7466fi
7467
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007468ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007469if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007470
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007471else
Martin v. Löwis11437992002-04-12 09:54:03 +00007472
7473cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007474#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00007475_ACEOF
7476
7477fi
7478
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007479ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007480if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007481
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007482else
Martin v. Löwis11437992002-04-12 09:54:03 +00007483
7484cat >>confdefs.h <<_ACEOF
7485#define pid_t int
7486_ACEOF
7487
7488fi
7489
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007490
Martin v. Löwis11437992002-04-12 09:54:03 +00007491cat >>confdefs.h <<_ACEOF
Matthias Klosecbf54b12010-05-08 11:04:18 +00007492#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00007493_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007494
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007495ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007496if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007497
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007498else
Martin v. Löwis11437992002-04-12 09:54:03 +00007499
7500cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007501#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007502_ACEOF
7503
7504fi
7505
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
7507$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007508if ${ac_cv_type_uid_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007509 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007510else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007511 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007512/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007513#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007514
7515_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007516if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007517 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007518 ac_cv_type_uid_t=yes
7519else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007520 ac_cv_type_uid_t=no
7521fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00007522rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007523
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007524fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007525{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
7526$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007527if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007528
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007529$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007530
7531
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007532$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007533
7534fi
7535
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007536
7537# There are two separate checks for each of the exact-width integer types we
7538# need. First we check whether the type is available using the usual
7539# AC_CHECK_TYPE macro with the default includes (which includes <inttypes.h>
7540# and <stdint.h> where available). We then also use the special type checks of
7541# the form AC_TYPE_UINT32_T, which in the case that uint32_t is not available
7542# directly, #define's uint32_t to be a suitable type.
7543
7544ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
7545if test "x$ac_cv_type_uint32_t" = xyes; then :
7546
7547$as_echo "#define HAVE_UINT32_T 1" >>confdefs.h
7548
7549fi
7550
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007551ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
7552case $ac_cv_c_uint32_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007553 no|yes) ;; #(
7554 *)
7555
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007556$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007557
7558
7559cat >>confdefs.h <<_ACEOF
7560#define uint32_t $ac_cv_c_uint32_t
7561_ACEOF
7562;;
7563 esac
7564
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007565
7566ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
7567if test "x$ac_cv_type_uint64_t" = xyes; then :
7568
7569$as_echo "#define HAVE_UINT64_T 1" >>confdefs.h
7570
7571fi
7572
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007573ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
7574case $ac_cv_c_uint64_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007575 no|yes) ;; #(
7576 *)
7577
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007578$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007579
7580
7581cat >>confdefs.h <<_ACEOF
7582#define uint64_t $ac_cv_c_uint64_t
7583_ACEOF
7584;;
7585 esac
7586
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007587
7588ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
7589if test "x$ac_cv_type_int32_t" = xyes; then :
7590
7591$as_echo "#define HAVE_INT32_T 1" >>confdefs.h
7592
7593fi
7594
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007595ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
7596case $ac_cv_c_int32_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007597 no|yes) ;; #(
7598 *)
7599
7600cat >>confdefs.h <<_ACEOF
7601#define int32_t $ac_cv_c_int32_t
7602_ACEOF
7603;;
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007604esac
7605
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007606
7607ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
7608if test "x$ac_cv_type_int64_t" = xyes; then :
7609
7610$as_echo "#define HAVE_INT64_T 1" >>confdefs.h
7611
7612fi
7613
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007614ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
7615case $ac_cv_c_int64_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007616 no|yes) ;; #(
7617 *)
7618
7619cat >>confdefs.h <<_ACEOF
7620#define int64_t $ac_cv_c_int64_t
7621_ACEOF
7622;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007623esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00007624
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007625
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007626ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007627if test "x$ac_cv_type_ssize_t" = xyes; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007628
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007629$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00007630
7631fi
7632
Jack Jansendd19cf82001-12-06 22:36:17 +00007633
Michael W. Hudson54241132001-12-07 15:38:26 +00007634# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007635# ANSI C requires sizeof(char) == 1, so no need to check it
Martin v. Löwiseba40652007-08-30 20:10:57 +00007636# The cast to long int works around a bug in the HP C Compiler
7637# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7638# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7639# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
7641$as_echo_n "checking size of int... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007642if ${ac_cv_sizeof_int+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007643 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007644else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007645 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 +00007646
Martin v. Löwis11437992002-04-12 09:54:03 +00007647else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007648 if test "$ac_cv_type_int" = yes; then
7649 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7650$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007651as_fn_error 77 "cannot compute sizeof (int)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007652See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007653 else
7654 ac_cv_sizeof_int=0
7655 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007656fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007657
Martin v. Löwis11437992002-04-12 09:54:03 +00007658fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007659{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
7660$as_echo "$ac_cv_sizeof_int" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007661
7662
7663
Martin v. Löwis11437992002-04-12 09:54:03 +00007664cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007665#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007666_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007667
7668
Martin v. Löwiseba40652007-08-30 20:10:57 +00007669# The cast to long int works around a bug in the HP C Compiler
7670# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7671# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7672# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
7674$as_echo_n "checking size of long... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007675if ${ac_cv_sizeof_long+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007676 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007677else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007678 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 +00007679
Martin v. Löwis11437992002-04-12 09:54:03 +00007680else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007681 if test "$ac_cv_type_long" = yes; then
7682 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7683$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007684as_fn_error 77 "cannot compute sizeof (long)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007685See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007686 else
7687 ac_cv_sizeof_long=0
7688 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007689fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007690
Martin v. Löwis11437992002-04-12 09:54:03 +00007691fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007692{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
7693$as_echo "$ac_cv_sizeof_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007694
7695
7696
Martin v. Löwis11437992002-04-12 09:54:03 +00007697cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007698#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007699_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007700
7701
Martin v. Löwiseba40652007-08-30 20:10:57 +00007702# The cast to long int works around a bug in the HP C Compiler
7703# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7704# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7705# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
7707$as_echo_n "checking size of void *... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007708if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007709 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007710else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007711 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 +00007712
Martin v. Löwis11437992002-04-12 09:54:03 +00007713else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007714 if test "$ac_cv_type_void_p" = yes; then
7715 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7716$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007717as_fn_error 77 "cannot compute sizeof (void *)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007718See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007719 else
7720 ac_cv_sizeof_void_p=0
7721 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007722fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007723
Martin v. Löwis11437992002-04-12 09:54:03 +00007724fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007725{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
7726$as_echo "$ac_cv_sizeof_void_p" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007727
7728
7729
Martin v. Löwis11437992002-04-12 09:54:03 +00007730cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007731#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00007732_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007733
7734
Martin v. Löwiseba40652007-08-30 20:10:57 +00007735# The cast to long int works around a bug in the HP C Compiler
7736# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7737# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7738# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
7740$as_echo_n "checking size of short... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007741if ${ac_cv_sizeof_short+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007742 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007743else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007744 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 +00007745
Martin v. Löwis11437992002-04-12 09:54:03 +00007746else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007747 if test "$ac_cv_type_short" = yes; then
7748 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7749$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007750as_fn_error 77 "cannot compute sizeof (short)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007751See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007752 else
7753 ac_cv_sizeof_short=0
7754 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007755fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007756
Martin v. Löwis11437992002-04-12 09:54:03 +00007757fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007758{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
7759$as_echo "$ac_cv_sizeof_short" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007760
7761
7762
Martin v. Löwis11437992002-04-12 09:54:03 +00007763cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007764#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007765_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007766
7767
Martin v. Löwiseba40652007-08-30 20:10:57 +00007768# The cast to long int works around a bug in the HP C Compiler
7769# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7770# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7771# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
7773$as_echo_n "checking size of float... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007774if ${ac_cv_sizeof_float+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007775 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007776else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007777 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 +00007778
Martin v. Löwis11437992002-04-12 09:54:03 +00007779else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007780 if test "$ac_cv_type_float" = yes; then
7781 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7782$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007783as_fn_error 77 "cannot compute sizeof (float)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007784See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007785 else
7786 ac_cv_sizeof_float=0
7787 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007788fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007789
Martin v. Löwis11437992002-04-12 09:54:03 +00007790fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007791{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
7792$as_echo "$ac_cv_sizeof_float" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007793
7794
7795
Martin v. Löwis11437992002-04-12 09:54:03 +00007796cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007797#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007798_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007799
7800
Martin v. Löwiseba40652007-08-30 20:10:57 +00007801# The cast to long int works around a bug in the HP C Compiler
7802# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7803# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7804# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
7806$as_echo_n "checking size of double... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007807if ${ac_cv_sizeof_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007808 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007809else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007810 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 +00007811
Martin v. Löwis11437992002-04-12 09:54:03 +00007812else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007813 if test "$ac_cv_type_double" = yes; then
7814 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7815$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007816as_fn_error 77 "cannot compute sizeof (double)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007817See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007818 else
7819 ac_cv_sizeof_double=0
7820 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007821fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007822
Martin v. Löwis11437992002-04-12 09:54:03 +00007823fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007824{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
7825$as_echo "$ac_cv_sizeof_double" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007826
7827
7828
Martin v. Löwis11437992002-04-12 09:54:03 +00007829cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007830#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007831_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007832
7833
Martin v. Löwiseba40652007-08-30 20:10:57 +00007834# The cast to long int works around a bug in the HP C Compiler
7835# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7836# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7837# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
7839$as_echo_n "checking size of fpos_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007840if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007841 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007842else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007843 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 +00007844
Martin v. Löwis11437992002-04-12 09:54:03 +00007845else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007846 if test "$ac_cv_type_fpos_t" = yes; then
7847 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7848$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007849as_fn_error 77 "cannot compute sizeof (fpos_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007850See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007851 else
7852 ac_cv_sizeof_fpos_t=0
7853 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007854fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007855
Martin v. Löwis11437992002-04-12 09:54:03 +00007856fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007857{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
7858$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007859
7860
7861
Martin v. Löwis11437992002-04-12 09:54:03 +00007862cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007863#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007864_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007865
Michael W. Hudson54241132001-12-07 15:38:26 +00007866
Martin v. Löwiseba40652007-08-30 20:10:57 +00007867# The cast to long int works around a bug in the HP C Compiler
7868# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7869# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7870# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
7872$as_echo_n "checking size of size_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007873if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007874 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007875else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007876 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 +00007877
Martin v. Löwis18e16552006-02-15 17:27:45 +00007878else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007879 if test "$ac_cv_type_size_t" = yes; then
7880 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7881$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007882as_fn_error 77 "cannot compute sizeof (size_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007883See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007884 else
7885 ac_cv_sizeof_size_t=0
7886 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00007887fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007888
Martin v. Löwis18e16552006-02-15 17:27:45 +00007889fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007890{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
7891$as_echo "$ac_cv_sizeof_size_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007892
7893
7894
Martin v. Löwis18e16552006-02-15 17:27:45 +00007895cat >>confdefs.h <<_ACEOF
7896#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
7897_ACEOF
7898
7899
Christian Heimes951cc0f2008-01-31 23:08:23 +00007900# The cast to long int works around a bug in the HP C Compiler
7901# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7902# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7903# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
7905$as_echo_n "checking size of pid_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007906if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007907 $as_echo_n "(cached) " >&6
Christian Heimes951cc0f2008-01-31 23:08:23 +00007908else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007909 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 +00007910
Christian Heimes951cc0f2008-01-31 23:08:23 +00007911else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007912 if test "$ac_cv_type_pid_t" = yes; then
7913 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7914$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007915as_fn_error 77 "cannot compute sizeof (pid_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007916See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes951cc0f2008-01-31 23:08:23 +00007917 else
7918 ac_cv_sizeof_pid_t=0
7919 fi
7920fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007921
Christian Heimes951cc0f2008-01-31 23:08:23 +00007922fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007923{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
7924$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes951cc0f2008-01-31 23:08:23 +00007925
7926
7927
7928cat >>confdefs.h <<_ACEOF
7929#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
7930_ACEOF
7931
7932
Michael W. Hudson54241132001-12-07 15:38:26 +00007933
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
7935$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007936have_long_long=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007937cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007938/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007939
Martin v. Löwis11437992002-04-12 09:54:03 +00007940int
7941main ()
7942{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007943long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007944 ;
7945 return 0;
7946}
7947_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007948if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007949
7950
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007951$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007952
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007953 have_long_long=yes
7954
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007955fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007956rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007957{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
7958$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007959if test "$have_long_long" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00007960# The cast to long int works around a bug in the HP C Compiler
7961# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7962# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7963# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
7965$as_echo_n "checking size of long long... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007966if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007967 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007968else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007969 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 +00007970
Martin v. Löwis11437992002-04-12 09:54:03 +00007971else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007972 if test "$ac_cv_type_long_long" = yes; then
7973 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7974$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007975as_fn_error 77 "cannot compute sizeof (long long)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007976See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007977 else
7978 ac_cv_sizeof_long_long=0
7979 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007980fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007981
Martin v. Löwis11437992002-04-12 09:54:03 +00007982fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007983{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
7984$as_echo "$ac_cv_sizeof_long_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007985
7986
7987
Martin v. Löwis11437992002-04-12 09:54:03 +00007988cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007989#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007990_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007991
Michael W. Hudson54241132001-12-07 15:38:26 +00007992
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007993fi
7994
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
7996$as_echo_n "checking for long double support... " >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007997have_long_double=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007998cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007999/* end confdefs.h. */
8000
8001int
8002main ()
8003{
Matthias Klosec511b472010-05-08 11:01:39 +00008004long double x; x = (long double)0;
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008005 ;
8006 return 0;
8007}
8008_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008009if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008010
8011
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008012$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008013
8014 have_long_double=yes
8015
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008016fi
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008017rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008018{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
8019$as_echo "$have_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008020if test "$have_long_double" = yes ; then
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008021# The cast to long int works around a bug in the HP C Compiler
8022# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8023# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8024# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8026$as_echo_n "checking size of long double... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008027if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008028 $as_echo_n "(cached) " >&6
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008029else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008030 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 +00008031
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008032else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008033 if test "$ac_cv_type_long_double" = yes; then
8034 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8035$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008036as_fn_error 77 "cannot compute sizeof (long double)
Matthias Klose3cef2a92012-03-14 23:39:33 +01008037See \`config.log' for more details" "$LINENO" 5; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008038 else
8039 ac_cv_sizeof_long_double=0
8040 fi
8041fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008042
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008043fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008044{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8045$as_echo "$ac_cv_sizeof_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008046
8047
8048
8049cat >>confdefs.h <<_ACEOF
8050#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8051_ACEOF
8052
8053
8054fi
8055
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
8057$as_echo_n "checking for _Bool support... " >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00008058have_c99_bool=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008059cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00008060/* end confdefs.h. */
8061
8062int
8063main ()
8064{
8065_Bool x; x = (_Bool)0;
8066 ;
8067 return 0;
8068}
8069_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008070if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00008071
8072
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008073$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00008074
8075 have_c99_bool=yes
8076
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00008077fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008078rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008079{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
8080$as_echo "$have_c99_bool" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00008081if test "$have_c99_bool" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00008082# The cast to long int works around a bug in the HP C Compiler
8083# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8084# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8085# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8087$as_echo_n "checking size of _Bool... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008088if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008089 $as_echo_n "(cached) " >&6
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00008090else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008091 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 +00008092
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00008093else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008094 if test "$ac_cv_type__Bool" = yes; then
8095 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8096$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008097as_fn_error 77 "cannot compute sizeof (_Bool)
Matthias Klose3cef2a92012-03-14 23:39:33 +01008098See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008099 else
8100 ac_cv_sizeof__Bool=0
8101 fi
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00008102fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008103
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00008104fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008105{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8106$as_echo "$ac_cv_sizeof__Bool" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008107
8108
8109
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00008110cat >>confdefs.h <<_ACEOF
8111#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8112_ACEOF
8113
8114
8115fi
8116
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008117ac_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 +00008118 #include <stdint.h>
8119 #endif
Antoine Pitrou7be5a652010-10-10 08:14:41 +00008120 #ifdef HAVE_INTTYPES_H
8121 #include <inttypes.h>
8122 #endif
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008123"
Matthias Klose3cef2a92012-03-14 23:39:33 +01008124if test "x$ac_cv_type_uintptr_t" = xyes; then :
Martin v. Löwisebe26702006-10-02 14:55:51 +00008125
8126cat >>confdefs.h <<_ACEOF
8127#define HAVE_UINTPTR_T 1
8128_ACEOF
8129
Martin v. Löwiseba40652007-08-30 20:10:57 +00008130# The cast to long int works around a bug in the HP C Compiler
8131# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8132# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8133# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8135$as_echo_n "checking size of uintptr_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008136if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008137 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008138else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008139 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 +00008140
Martin v. Löwis11437992002-04-12 09:54:03 +00008141else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008142 if test "$ac_cv_type_uintptr_t" = yes; then
8143 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8144$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008145as_fn_error 77 "cannot compute sizeof (uintptr_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01008146See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008147 else
8148 ac_cv_sizeof_uintptr_t=0
8149 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008150fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008151
Martin v. Löwis11437992002-04-12 09:54:03 +00008152fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008153{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8154$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008155
8156
8157
Martin v. Löwis11437992002-04-12 09:54:03 +00008158cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008159#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008160_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008161
Michael W. Hudson54241132001-12-07 15:38:26 +00008162
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008163fi
8164
Martin v. Löwisebe26702006-10-02 14:55:51 +00008165
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008166# The cast to long int works around a bug in the HP C Compiler
8167# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8168# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8169# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8171$as_echo_n "checking size of off_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008172if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008173 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008174else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008175 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008176#ifdef HAVE_SYS_TYPES_H
8177#include <sys/types.h>
8178#endif
8179
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008180"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008181
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008182else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008183 if test "$ac_cv_type_off_t" = yes; then
8184 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8185$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008186as_fn_error 77 "cannot compute sizeof (off_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01008187See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008188 else
8189 ac_cv_sizeof_off_t=0
8190 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008191fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008192
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008193fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008194{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8195$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008196
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008197
8198
Martin v. Löwis11437992002-04-12 09:54:03 +00008199cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008200#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008201_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008202
Michael W. Hudson54241132001-12-07 15:38:26 +00008203
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008204
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8206$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson0ef0b912009-12-31 21:11:48 +00008207if test "$have_long_long" = yes
8208then
8209if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008210 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008211
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008212$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008213
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8215$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008216else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008217 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8218$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008219fi
Mark Dickinson0ef0b912009-12-31 21:11:48 +00008220else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008221 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8222$as_echo "no" >&6; }
Mark Dickinson0ef0b912009-12-31 21:11:48 +00008223fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008224
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008225# The cast to long int works around a bug in the HP C Compiler
8226# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8227# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8228# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008229{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8230$as_echo_n "checking size of time_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008231if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008232 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008233else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008234 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008235#ifdef HAVE_SYS_TYPES_H
8236#include <sys/types.h>
8237#endif
8238#ifdef HAVE_TIME_H
8239#include <time.h>
8240#endif
8241
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008242"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008243
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008244else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008245 if test "$ac_cv_type_time_t" = yes; then
8246 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8247$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008248as_fn_error 77 "cannot compute sizeof (time_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01008249See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008250 else
8251 ac_cv_sizeof_time_t=0
8252 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008253fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008254
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008255fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008256{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8257$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008258
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008259
8260
Martin v. Löwis11437992002-04-12 09:54:03 +00008261cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008262#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008263_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008264
Michael W. Hudson54241132001-12-07 15:38:26 +00008265
8266
Trent Mick635f6fb2000-08-23 21:33:05 +00008267# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008268ac_save_cc="$CC"
8269if test "$ac_cv_kpthread" = "yes"
8270then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008271elif test "$ac_cv_kthread" = "yes"
8272then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008273elif test "$ac_cv_pthread" = "yes"
8274then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008275fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8277$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008278have_pthread_t=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008279cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008280/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00008281
8282 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008283int
8284main ()
8285{
Guido van Rossum12580492000-09-24 16:47:19 +00008286pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008287 ;
8288 return 0;
8289}
Matthias Klosec511b472010-05-08 11:01:39 +00008290
Martin v. Löwis11437992002-04-12 09:54:03 +00008291_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008292if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008293 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008294fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008295rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008296{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8297$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008298if test "$have_pthread_t" = yes ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008299 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008300# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8301# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8302# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008303{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8304$as_echo_n "checking size of pthread_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008305if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008306 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008307else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008308 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008309#ifdef HAVE_PTHREAD_H
8310#include <pthread.h>
8311#endif
8312
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008313"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008314
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008315else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008316 if test "$ac_cv_type_pthread_t" = yes; then
8317 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8318$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008319as_fn_error 77 "cannot compute sizeof (pthread_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01008320See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008321 else
8322 ac_cv_sizeof_pthread_t=0
8323 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008324fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008325
Trent Mick635f6fb2000-08-23 21:33:05 +00008326fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008327{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8328$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008329
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008330
8331
Martin v. Löwis11437992002-04-12 09:54:03 +00008332cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008333#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008334_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008335
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008336
Trent Mick635f6fb2000-08-23 21:33:05 +00008337fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008338CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008339
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-toolbox-glue" >&5
8341$as_echo_n "checking for --enable-toolbox-glue... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008342# Check whether --enable-toolbox-glue was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008343if test "${enable_toolbox_glue+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008344 enableval=$enable_toolbox_glue;
8345fi
Jack Jansene578a632001-08-15 01:27:14 +00008346
8347
8348if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +00008349then
Jack Jansene578a632001-08-15 01:27:14 +00008350 case $ac_sys_system/$ac_sys_release in
8351 Darwin/*)
8352 enable_toolbox_glue="yes";;
8353 *)
8354 enable_toolbox_glue="no";;
8355 esac
8356fi
8357case "$enable_toolbox_glue" in
8358yes)
Jack Jansene578a632001-08-15 01:27:14 +00008359 extra_machdep_objs="Python/mactoolboxglue.o"
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008360 extra_undefs="-u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +00008361
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008362$as_echo "#define USE_TOOLBOX_OBJECT_GLUE 1" >>confdefs.h
Jack Jansene578a632001-08-15 01:27:14 +00008363
8364 ;;
8365*)
Jack Jansene578a632001-08-15 01:27:14 +00008366 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00008367 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00008368 ;;
8369esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008370{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_toolbox_glue" >&5
8371$as_echo "$enable_toolbox_glue" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008372
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008373
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00008374
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008375case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +00008376 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008377 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8378 ;;
8379 Darwin/*)
8380 OTHER_LIBTOOL_OPT=""
8381 ;;
8382esac
8383
8384
Ronald Oussoren25967582009-09-06 10:00:26 +00008385
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008386case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +00008387 Darwin/[01567]\..*)
Ronald Oussoren988117f2006-04-29 11:31:35 +00008388 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8389 if test "${enable_universalsdk}"; then
8390 :
8391 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00008392 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Ronald Oussoren988117f2006-04-29 11:31:35 +00008393 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008394 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008395 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008396 Darwin/*)
Ronald Oussorena55af9a2010-01-17 16:25:57 +00008397 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008398 if test ${gcc_version} '<' 4.0
8399 then
8400 LIBTOOL_CRUFT="-lcc_dynamic"
8401 else
8402 LIBTOOL_CRUFT=""
8403 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008404 if test "$cross_compiling" = yes; then :
Ronald Oussoren23d92532009-09-07 06:12:00 +00008405 ac_osx_32bit=yes
Ronald Oussoren25967582009-09-06 10:00:26 +00008406else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008407 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren25967582009-09-06 10:00:26 +00008408/* end confdefs.h. */
Ronald Oussoren23d92532009-09-07 06:12:00 +00008409
Ronald Oussoren25967582009-09-06 10:00:26 +00008410 #include <unistd.h>
8411 int main(int argc, char*argv[])
8412 {
8413 if (sizeof(long) == 4) {
8414 return 0;
8415 } else {
8416 return 1;
8417 }
Ronald Oussoren84ddd722009-09-08 07:17:10 +00008418 }
Ronald Oussoren23d92532009-09-07 06:12:00 +00008419
Ronald Oussoren25967582009-09-06 10:00:26 +00008420_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008421if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren25967582009-09-06 10:00:26 +00008422 ac_osx_32bit=yes
8423else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008424 ac_osx_32bit=no
Ronald Oussoren25967582009-09-06 10:00:26 +00008425fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008426rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8427 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren25967582009-09-06 10:00:26 +00008428fi
8429
8430
Ronald Oussoren25967582009-09-06 10:00:26 +00008431 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00008432 case `/usr/bin/arch` in
Ronald Oussoren25967582009-09-06 10:00:26 +00008433 i386)
8434 MACOSX_DEFAULT_ARCH="i386"
8435 ;;
8436 ppc)
8437 MACOSX_DEFAULT_ARCH="ppc"
8438 ;;
8439 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008440 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren25967582009-09-06 10:00:26 +00008441 ;;
8442 esac
8443 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00008444 case `/usr/bin/arch` in
Ronald Oussoren25967582009-09-06 10:00:26 +00008445 i386)
8446 MACOSX_DEFAULT_ARCH="x86_64"
8447 ;;
8448 ppc)
8449 MACOSX_DEFAULT_ARCH="ppc64"
8450 ;;
8451 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008452 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren25967582009-09-06 10:00:26 +00008453 ;;
8454 esac
8455
8456 #ARCH_RUN_32BIT="true"
8457 fi
8458
8459 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00008460 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008461 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008462esac
8463
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
8465$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008466if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008467then
Skip Montanarodecc6a42003-01-01 20:07:49 +00008468 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00008469 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008470 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008471
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008472$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008473
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8475$as_echo "yes" >&6; }
Ronald Oussoren450d5612009-06-08 21:12:41 +00008476 if test $enable_shared = "yes"
8477 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008478 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 +00008479 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008480else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008481 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8482$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008483fi
8484
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
8486$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008487case $ac_sys_system/$ac_sys_release in
8488 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008489
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008490$as_echo "#define WITH_DYLD 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: always on for Darwin" >&5
8493$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008494 ;;
8495 *)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8497$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008498 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008499esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008500
Guido van Rossum0a516c91994-09-12 10:58:40 +00008501# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008502
Michael W. Hudson54241132001-12-07 15:38:26 +00008503
8504
8505
8506
Ronald Oussoren75912852010-04-08 08:13:31 +00008507
Guido van Rossum0a516c91994-09-12 10:58:40 +00008508# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00008509# -- usually .so, .sl on HP-UX, .dll on Cygwin
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
8511$as_echo_n "checking SO... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008512if test -z "$SO"
8513then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008514 case $ac_sys_system in
Neal Norwitz58e28882006-05-19 07:00:58 +00008515 hp*|HP*)
8516 case `uname -m` in
8517 ia64) SO=.so;;
8518 *) SO=.sl;;
8519 esac
8520 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00008521 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00008522 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008523 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +00008524else
8525 # this might also be a termcap variable, see #610332
8526 echo
8527 echo '====================================================================='
8528 echo '+ +'
8529 echo '+ WARNING: You have set SO in your environment. +'
8530 echo '+ Do you really mean to change the extension for shared libraries? +'
8531 echo '+ Continuing in 10 seconds to let you to ponder. +'
8532 echo '+ +'
8533 echo '====================================================================='
8534 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +00008535fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008536{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
8537$as_echo "$SO" >&6; }
Neal Norwitz58e28882006-05-19 07:00:58 +00008538
Ronald Oussoren79f90492009-01-02 10:44:46 +00008539
Neal Norwitz58e28882006-05-19 07:00:58 +00008540cat >>confdefs.h <<_ACEOF
8541#define SHLIB_EXT "$SO"
8542_ACEOF
8543
Guido van Rossum0a516c91994-09-12 10:58:40 +00008544# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00008545# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008546# (Shared libraries in this instance are shared modules to be loaded into
8547# Python, as opposed to building Python itself as a shared library.)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
8549$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008550if test -z "$LDSHARED"
8551then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008552 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008553 AIX*)
Martin Panterf75a2eb2016-11-20 09:31:41 +00008554 BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00008555 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008556 ;;
8557 BeOS*)
8558 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +00008559 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008560 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00008561 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00008562 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008563 SunOS/5*)
Ronald Oussoren75912852010-04-08 08:13:31 +00008564 if test "$GCC" = "yes" ; then
8565 LDSHARED='$(CC) -shared'
8566 LDCXXSHARED='$(CXX) -shared'
8567 else
8568 LDSHARED='$(CC) -G'
8569 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a662000-05-26 12:22:54 +00008570 fi ;;
Thomas Hellerdc96a772008-04-04 10:07:55 +00008571 hp*|HP*)
Ronald Oussoren75912852010-04-08 08:13:31 +00008572 if test "$GCC" = "yes" ; then
8573 LDSHARED='$(CC) -shared'
8574 LDCXXSHARED='$(CXX) -shared'
8575 else
8576 LDSHARED='ld -b'
Thomas Hellerdc96a772008-04-04 10:07:55 +00008577 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +00008578 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +00008579 Darwin/1.3*)
Stefan Krah3a3e2032010-11-28 15:30:05 +00008580 LDSHARED='$(CC) -bundle'
8581 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00008582 if test "$enable_framework" ; then
8583 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008584 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8585 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008586 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008587 else
8588 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00008589 LDSHARED="$LDSHARED -undefined suppress"
Ronald Oussoren75912852010-04-08 08:13:31 +00008590 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00008591 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008592 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Stefan Krah3a3e2032010-11-28 15:30:05 +00008593 LDSHARED='$(CC) -bundle'
8594 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00008595 if test "$enable_framework" ; then
8596 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008597 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8598 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008599 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008600 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00008601 # No framework, use the Python app as bundle-loader
8602 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00008603 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008604 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008605 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008606 Darwin/*)
8607 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
8608 # This allows an extension to be used in any Python
Ronald Oussoren38f1b982007-09-02 09:46:07 +00008609
Ned Deilyc40b9032014-06-25 13:48:46 -07008610 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
8611 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
8612 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
8613 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
8614 if test ${dep_target_major} -eq 10 && \
8615 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00008616 then
Ned Deilyc40b9032014-06-25 13:48:46 -07008617 # building for OS X 10.0 through 10.2
Stefan Krah3a3e2032010-11-28 15:30:05 +00008618 LDSHARED='$(CC) -bundle'
8619 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00008620 if test "$enable_framework" ; then
8621 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008622 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8623 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008624 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008625 else
8626 # No framework, use the Python app as bundle-loader
8627 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
8628 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008629 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008630 fi
Ned Deilyc40b9032014-06-25 13:48:46 -07008631 else
8632 # building for OS X 10.3 and later
8633 if test "${enable_universalsdk}"; then
8634 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
8635 fi
8636 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
8637 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
8638 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00008639 fi
8640 ;;
Ronald Oussoren75912852010-04-08 08:13:31 +00008641 Linux*|GNU*|QNX*)
8642 LDSHARED='$(CC) -shared'
8643 LDCXXSHARED='$(CXX) -shared';;
8644 BSD/OS*/4*)
8645 LDSHARED="gcc -shared"
8646 LDCXXSHARED="g++ -shared";;
Martin v. Löwis222c5152006-06-03 07:37:13 +00008647 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00008648 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00008649 then
Stefan Krah3a3e2032010-11-28 15:30:05 +00008650 LDSHARED='$(CC) -shared'
8651 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00008652 else
Stefan Krah3a3e2032010-11-28 15:30:05 +00008653 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00008654 fi;;
Martin v. Löwis222c5152006-06-03 07:37:13 +00008655 OpenBSD*)
8656 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8657 then
Stefan Krah3a3e2032010-11-28 15:30:05 +00008658 LDSHARED='$(CC) -shared $(CCSHARED)'
8659 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Martin v. Löwis222c5152006-06-03 07:37:13 +00008660 else
8661 case `uname -r` in
8662 [01].* | 2.[0-7] | 2.[0-7].*)
8663 LDSHARED="ld -Bshareable ${LDFLAGS}"
8664 ;;
8665 *)
Stefan Krah3a3e2032010-11-28 15:30:05 +00008666 LDSHARED='$(CC) -shared $(CCSHARED)'
8667 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Martin v. Löwis222c5152006-06-03 07:37:13 +00008668 ;;
8669 esac
8670 fi;;
Ronald Oussoren75912852010-04-08 08:13:31 +00008671 NetBSD*|DragonFly*)
Antoine Pitroucb402772011-01-02 20:51:34 +00008672 LDSHARED='$(CC) -shared'
8673 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008674 OpenUNIX*|UnixWare*)
Ronald Oussoren75912852010-04-08 08:13:31 +00008675 if test "$GCC" = "yes" ; then
8676 LDSHARED='$(CC) -shared'
8677 LDCXXSHARED='$(CXX) -shared'
8678 else
8679 LDSHARED='$(CC) -G'
8680 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00008681 fi;;
Ronald Oussoren75912852010-04-08 08:13:31 +00008682 SCO_SV*)
8683 LDSHARED='$(CC) -Wl,-G,-Bexport'
8684 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
8685 CYGWIN*)
8686 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
8687 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
8688 atheos*)
8689 LDSHARED="gcc -shared"
8690 LDCXXSHARED="g++ -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008691 *) LDSHARED="ld";;
8692 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008693fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008694{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
8695$as_echo "$LDSHARED" >&6; }
Ronald Oussoren75912852010-04-08 08:13:31 +00008696LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008697BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00008698# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008699# library (module) -- this is only needed for a few systems
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
8701$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008702if test -z "$CCSHARED"
8703then
Guido van Rossum07397971997-04-29 21:49:50 +00008704 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008705 SunOS*) if test "$GCC" = yes;
Martin v. Löwiseb623572007-03-12 10:50:39 +00008706 then CCSHARED="-fPIC";
8707 elif test `uname -p` = sparc;
8708 then CCSHARED="-xcode=pic32";
8709 else CCSHARED="-Kpic";
8710 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00008711 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00008712 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00008713 else CCSHARED="+z";
8714 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008715 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008716 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008717 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008718 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008719 if test "$GCC" = "yes"
8720 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008721 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008722 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008723 SCO_SV*)
8724 if test "$GCC" = "yes"
8725 then CCSHARED="-fPIC"
8726 else CCSHARED="-Kpic -belf"
8727 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008728 IRIX*/6*) case $CC in
8729 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00008730 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008731 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008732 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008733 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008734fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008735{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
8736$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008737# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008738# the python executable -- this is only needed for a few systems
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
8740$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008741if test -z "$LINKFORSHARED"
8742then
Guido van Rossum07397971997-04-29 21:49:50 +00008743 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008744 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008745 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00008746 LINKFORSHARED="-Wl,-E -Wl,+s";;
8747# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008748 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008749 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008750 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00008751 Darwin/*)
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008752 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
8753 # which is
Jack Jansene578a632001-08-15 01:27:14 +00008754 # not used by the core itself but which needs to be in the core so
8755 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +00008756 # -prebind is no longer used, because it actually seems to give a
8757 # slowdown in stead of a speedup, maybe due to the large number of
8758 # dynamic loads Python does.
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008759
8760 LINKFORSHARED="$extra_undefs"
Jack Jansene578a632001-08-15 01:27:14 +00008761 if test "$enable_framework"
8762 then
Jack Jansenda49e192005-01-07 13:08:22 +00008763 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008764 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008765 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008766 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008767 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00008768 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008769 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00008770 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8771 then
8772 LINKFORSHARED="-Wl,--export-dynamic"
8773 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008774 SunOS/5*) case $CC in
8775 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00008776 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00008777 then
8778 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008779 fi;;
8780 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00008781 CYGWIN*)
8782 if test $enable_shared = "no"
8783 then
8784 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
8785 fi;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00008786 QNX*)
8787 # -Wl,-E causes the symbols to be added to the dynamic
8788 # symbol table so that they can be found when a module
8789 # is loaded. -N 2048K causes the stack size to be set
8790 # to 2048 kilobytes so that the stack doesn't overflow
8791 # when running test_compile.py.
8792 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008793 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008794fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008795{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
8796$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008797
Michael W. Hudson54241132001-12-07 15:38:26 +00008798
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00008799
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
8801$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008802if test ! "$LIBRARY" = "$LDLIBRARY"
8803then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00008804 case $ac_sys_system in
8805 CYGWIN*)
8806 # Cygwin needs CCSHARED when building extension DLLs
8807 # but not when building the interpreter DLL.
8808 CFLAGSFORSHARED='';;
8809 *)
8810 CFLAGSFORSHARED='$(CCSHARED)'
8811 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008812fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008813{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
8814$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008815
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008816# SHLIBS are libraries (except -lc and -lm) to link to the python shared
8817# library (with --enable-shared).
8818# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008819# symbols, this must be set to $(LIBS) (expanded by make). We do this even
8820# if it is not required, since it creates a dependency of the shared library
8821# to LIBS. This, in turn, means that applications linking the shared libpython
8822# don't need to link LIBS explicitly. The default should be only changed
8823# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008824
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
8826$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008827case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008828 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008829 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008830esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008831{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
8832$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008833
8834
Guido van Rossum627b2d71993-12-24 10:39:16 +00008835# checks for libraries
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
8837$as_echo_n "checking for dlopen in -ldl... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008838if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008839 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008840else
Martin v. Löwis11437992002-04-12 09:54:03 +00008841 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008842LIBS="-ldl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008843cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008844/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008845
Martin v. Löwiseba40652007-08-30 20:10:57 +00008846/* Override any GCC internal prototype to avoid an error.
8847 Use char because int might match the return type of a GCC
8848 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008849#ifdef __cplusplus
8850extern "C"
8851#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008852char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008853int
8854main ()
8855{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008856return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008857 ;
8858 return 0;
8859}
8860_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008861if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008862 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008863else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008864 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008865fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008866rm -f core conftest.err conftest.$ac_objext \
8867 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008868LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008869fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008870{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
8871$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008872if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008873 cat >>confdefs.h <<_ACEOF
8874#define HAVE_LIBDL 1
8875_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008876
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008877 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00008878
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008879fi
8880 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
8882$as_echo_n "checking for shl_load in -ldld... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008883if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008884 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008885else
Martin v. Löwis11437992002-04-12 09:54:03 +00008886 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008887LIBS="-ldld $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008888cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008889/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008890
Martin v. Löwiseba40652007-08-30 20:10:57 +00008891/* Override any GCC internal prototype to avoid an error.
8892 Use char because int might match the return type of a GCC
8893 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008894#ifdef __cplusplus
8895extern "C"
8896#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008897char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008898int
8899main ()
8900{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008901return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008902 ;
8903 return 0;
8904}
8905_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008906if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008907 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008908else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008909 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008910fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008911rm -f core conftest.err conftest.$ac_objext \
8912 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008913LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008914fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008915{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
8916$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008917if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008918 cat >>confdefs.h <<_ACEOF
8919#define HAVE_LIBDLD 1
8920_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008921
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008922 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008923
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008924fi
8925 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00008926
Ronald Oussoren79f90492009-01-02 10:44:46 +00008927# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00008928if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008929 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
8930$as_echo_n "checking for library containing sem_init... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008931if ${ac_cv_search_sem_init+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008932 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008933else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008934 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008935cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008936/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008937
Martin v. Löwiseba40652007-08-30 20:10:57 +00008938/* Override any GCC internal prototype to avoid an error.
8939 Use char because int might match the return type of a GCC
8940 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008941#ifdef __cplusplus
8942extern "C"
8943#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008944char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008945int
8946main ()
8947{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008948return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008949 ;
8950 return 0;
8951}
8952_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00008953for ac_lib in '' pthread rt posix4; do
8954 if test -z "$ac_lib"; then
8955 ac_res="none required"
8956 else
8957 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00008958 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00008959 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008960 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008961 ac_cv_search_sem_init=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00008962fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008963rm -f core conftest.err conftest.$ac_objext \
8964 conftest$ac_exeext
Matthias Klose3cef2a92012-03-14 23:39:33 +01008965 if ${ac_cv_search_sem_init+:} false; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008966 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00008967fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008968done
Matthias Klose3cef2a92012-03-14 23:39:33 +01008969if ${ac_cv_search_sem_init+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008970
Martin v. Löwiseba40652007-08-30 20:10:57 +00008971else
8972 ac_cv_search_sem_init=no
8973fi
8974rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008975LIBS=$ac_func_search_save_LIBS
8976fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008977{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
8978$as_echo "$ac_cv_search_sem_init" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008979ac_res=$ac_cv_search_sem_init
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008980if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008981 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008982
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008983fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00008984 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00008985 # posix4 on Solaris 2.6
8986 # pthread (first!) on Linux
8987fi
8988
Martin v. Löwis19d17342003-06-14 21:03:05 +00008989# check if we need libintl for locale functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
8991$as_echo_n "checking for textdomain in -lintl... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008992if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008993 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00008994else
8995 ac_check_lib_save_LIBS=$LIBS
8996LIBS="-lintl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008997cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008998/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008999
Martin v. Löwiseba40652007-08-30 20:10:57 +00009000/* Override any GCC internal prototype to avoid an error.
9001 Use char because int might match the return type of a GCC
9002 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009003#ifdef __cplusplus
9004extern "C"
9005#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009006char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009007int
9008main ()
9009{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009010return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009011 ;
9012 return 0;
9013}
9014_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009015if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009016 ac_cv_lib_intl_textdomain=yes
9017else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009018 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009019fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009020rm -f core conftest.err conftest.$ac_objext \
9021 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009022LIBS=$ac_check_lib_save_LIBS
9023fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009024{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9025$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009026if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009027
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009028$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009029
9030fi
9031
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009032
9033# checks for system dependent C++ extensions support
9034case "$ac_sys_system" in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009035 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9036$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9037 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009038/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00009039
Georg Brandl94800df2011-02-25 11:09:02 +00009040 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009041int
9042main ()
9043{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009044loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009045 ;
9046 return 0;
9047}
Matthias Klosec511b472010-05-08 11:01:39 +00009048
Martin v. Löwis11437992002-04-12 09:54:03 +00009049_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009050if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009051
Matthias Klosec511b472010-05-08 11:01:39 +00009052
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009053$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009054
Matthias Klosec511b472010-05-08 11:01:39 +00009055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009056$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00009057
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009058else
Matthias Klosec511b472010-05-08 11:01:39 +00009059
9060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009061$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00009062
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009063fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009064rm -f core conftest.err conftest.$ac_objext \
9065 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009066 *) ;;
9067esac
9068
Guido van Rossum70c7f481998-03-26 18:44:10 +00009069# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009070# BeOS' sockets are stashed in libnet.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9072$as_echo_n "checking for t_open in -lnsl... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009073if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009074 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009075else
Martin v. Löwis11437992002-04-12 09:54:03 +00009076 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009077LIBS="-lnsl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009078cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009079/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009080
Martin v. Löwiseba40652007-08-30 20:10:57 +00009081/* Override any GCC internal prototype to avoid an error.
9082 Use char because int might match the return type of a GCC
9083 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009084#ifdef __cplusplus
9085extern "C"
9086#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009087char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009088int
9089main ()
9090{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009091return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009092 ;
9093 return 0;
9094}
9095_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009096if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009097 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009098else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009099 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009100fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009101rm -f core conftest.err conftest.$ac_objext \
9102 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009103LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009104fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009105{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9106$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009107if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009108 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009109fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009110 # SVR4
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9112$as_echo_n "checking for socket in -lsocket... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009113if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009114 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009115else
Martin v. Löwis11437992002-04-12 09:54:03 +00009116 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009117LIBS="-lsocket $LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009118cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009119/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009120
Martin v. Löwiseba40652007-08-30 20:10:57 +00009121/* Override any GCC internal prototype to avoid an error.
9122 Use char because int might match the return type of a GCC
9123 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009124#ifdef __cplusplus
9125extern "C"
9126#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009127char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009128int
9129main ()
9130{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009131return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009132 ;
9133 return 0;
9134}
9135_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009136if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009137 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009138else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009139 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009140fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009141rm -f core conftest.err conftest.$ac_objext \
9142 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009143LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009144fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009145{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9146$as_echo "$ac_cv_lib_socket_socket" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009147if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009148 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009149fi
9150 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009151
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +00009152case "$ac_sys_system" in
9153BeOS*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lnet" >&5
9155$as_echo_n "checking for socket in -lnet... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009156if ${ac_cv_lib_net_socket+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009157 $as_echo_n "(cached) " >&6
Guido van Rossumad678af1998-10-02 14:42:15 +00009158else
Martin v. Löwis11437992002-04-12 09:54:03 +00009159 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00009160LIBS="-lnet $LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009161cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009162/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009163
Martin v. Löwiseba40652007-08-30 20:10:57 +00009164/* Override any GCC internal prototype to avoid an error.
9165 Use char because int might match the return type of a GCC
9166 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009167#ifdef __cplusplus
9168extern "C"
9169#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009170char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009171int
9172main ()
9173{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009174return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009175 ;
9176 return 0;
9177}
9178_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009179if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009180 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +00009181else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009182 ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +00009183fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009184rm -f core conftest.err conftest.$ac_objext \
9185 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009186LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00009187fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009188{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_net_socket" >&5
9189$as_echo "$ac_cv_lib_net_socket" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009190if test "x$ac_cv_lib_net_socket" = xyes; then :
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009191 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009192fi
9193 # BeOS
9194;;
9195esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00009196
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9198$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009199
Martin v. Löwiseba40652007-08-30 20:10:57 +00009200# Check whether --with-libs was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009201if test "${with_libs+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009202 withval=$with_libs;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009203{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9204$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009205LIBS="$withval $LIBS"
9206
9207else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009208 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9209$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009210fi
9211
Guido van Rossum7f43da71994-08-01 12:15:30 +00009212
Benjamin Peterson64e8f6e2014-12-15 00:00:23 -05009213
9214
9215
9216
9217
9218
9219
9220if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9221 if test -n "$ac_tool_prefix"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009222 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9223set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9225$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009226if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009227 $as_echo_n "(cached) " >&6
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009228else
9229 case $PKG_CONFIG in
9230 [\\/]* | ?:[\\/]*)
9231 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9232 ;;
9233 *)
9234 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9235for as_dir in $PATH
9236do
9237 IFS=$as_save_IFS
9238 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009239 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009240 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009241 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009242 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009243 break 2
9244 fi
9245done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009246 done
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009247IFS=$as_save_IFS
9248
9249 ;;
9250esac
9251fi
9252PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9253if test -n "$PKG_CONFIG"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009254 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9255$as_echo "$PKG_CONFIG" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009256else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009257 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9258$as_echo "no" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009259fi
9260
9261
9262fi
9263if test -z "$ac_cv_path_PKG_CONFIG"; then
9264 ac_pt_PKG_CONFIG=$PKG_CONFIG
9265 # Extract the first word of "pkg-config", so it can be a program name with args.
9266set dummy pkg-config; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9268$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009269if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009270 $as_echo_n "(cached) " >&6
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009271else
9272 case $ac_pt_PKG_CONFIG in
9273 [\\/]* | ?:[\\/]*)
9274 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9275 ;;
9276 *)
9277 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9278for as_dir in $PATH
9279do
9280 IFS=$as_save_IFS
9281 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009282 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009283 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009284 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009285 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009286 break 2
9287 fi
9288done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009289 done
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009290IFS=$as_save_IFS
9291
9292 ;;
9293esac
9294fi
9295ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9296if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9298$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009299else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9301$as_echo "no" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009302fi
9303
9304 if test "x$ac_pt_PKG_CONFIG" = x; then
9305 PKG_CONFIG=""
9306 else
9307 case $cross_compiling:$ac_tool_warned in
9308yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009309{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9310$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009311ac_tool_warned=yes ;;
9312esac
9313 PKG_CONFIG=$ac_pt_PKG_CONFIG
9314 fi
9315else
9316 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9317fi
9318
Benjamin Peterson64e8f6e2014-12-15 00:00:23 -05009319fi
9320if test -n "$PKG_CONFIG"; then
9321 _pkg_min_version=0.9.0
9322 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
9323$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
9324 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9326$as_echo "yes" >&6; }
9327 else
9328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9329$as_echo "no" >&6; }
9330 PKG_CONFIG=""
9331 fi
9332fi
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009333
9334# Check for use of the system expat library
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
9336$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009337
9338# Check whether --with-system_expat was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009339if test "${with_system_expat+set}" = set; then :
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009340 withval=$with_system_expat;
Benjamin Petersonf2d1b2a2010-10-31 16:53:53 +00009341else
9342 with_system_expat="no"
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009343fi
9344
9345
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009346{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
9347$as_echo "$with_system_expat" >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009348
9349# Check for use of the system libffi library
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
9351$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009352
9353# Check whether --with-system_ffi was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009354if test "${with_system_ffi+set}" = set; then :
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009355 withval=$with_system_ffi;
Benjamin Petersonf2d1b2a2010-10-31 16:53:53 +00009356else
9357 with_system_ffi="no"
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009358fi
9359
9360
9361if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009362 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
9363else
9364 LIBFFI_INCLUDEDIR=""
9365fi
9366
9367
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009368{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
9369$as_echo "$with_system_ffi" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +00009370
Ned Deilya2a9f572013-10-25 00:30:10 -07009371# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
9372
9373
9374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
9375$as_echo_n "checking for --with-tcltk-includes... " >&6; }
9376
9377# Check whether --with-tcltk-includes was given.
9378if test "${with_tcltk_includes+set}" = set; then :
9379 withval=$with_tcltk_includes;
9380else
9381 with_tcltk_includes="default"
9382fi
9383
9384{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
9385$as_echo "$with_tcltk_includes" >&6; }
9386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
9387$as_echo_n "checking for --with-tcltk-libs... " >&6; }
9388
9389# Check whether --with-tcltk-libs was given.
9390if test "${with_tcltk_libs+set}" = set; then :
9391 withval=$with_tcltk_libs;
9392else
9393 with_tcltk_libs="default"
9394fi
9395
9396{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
9397$as_echo "$with_tcltk_libs" >&6; }
9398if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
9399then
9400 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
9401 then
9402 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
9403 fi
9404 TCLTK_INCLUDES=""
9405 TCLTK_LIBS=""
9406else
9407 TCLTK_INCLUDES="$with_tcltk_includes"
9408 TCLTK_LIBS="$with_tcltk_libs"
9409fi
9410
Benjamin Peterson867475c2009-04-29 20:36:25 +00009411# Check for --with-dbmliborder
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
9413$as_echo_n "checking for --with-dbmliborder... " >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +00009414
9415# Check whether --with-dbmliborder was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009416if test "${with_dbmliborder+set}" = set; then :
Benjamin Peterson867475c2009-04-29 20:36:25 +00009417 withval=$with_dbmliborder;
9418if test x$with_dbmliborder = xyes
9419then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009420as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Benjamin Peterson867475c2009-04-29 20:36:25 +00009421else
9422 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
9423 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
9424 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009425 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Benjamin Peterson867475c2009-04-29 20:36:25 +00009426 fi
9427 done
9428fi
9429fi
9430
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009431{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
9432$as_echo "$with_dbmliborder" >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +00009433
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009434# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009435
9436
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
9438$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009439
Martin v. Löwiseba40652007-08-30 20:10:57 +00009440# Check whether --with-signal-module was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009441if test "${with_signal_module+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009442 withval=$with_signal_module;
9443fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009444
9445
9446if test -z "$with_signal_module"
9447then with_signal_module="yes"
9448fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009449{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
9450$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009451
9452if test "${with_signal_module}" = "yes"; then
9453 USE_SIGNAL_MODULE=""
9454 SIGNAL_OBJS=""
9455else
9456 USE_SIGNAL_MODULE="#"
9457 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9458fi
9459
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009460# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009461
Barry Warsawc0d24d82000-06-29 16:12:00 +00009462USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009463
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dec-threads" >&5
9465$as_echo_n "checking for --with-dec-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009466
Guido van Rossumec2f0731997-01-22 20:54:01 +00009467
Martin v. Löwiseba40652007-08-30 20:10:57 +00009468# Check whether --with-dec-threads was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009469if test "${with_dec_threads+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009470 withval=$with_dec_threads;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009471{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9472$as_echo "$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +00009473LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00009474if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00009475 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00009476fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009477else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9479$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009480fi
9481
Martin v. Löwis11437992002-04-12 09:54:03 +00009482
9483# Templates for things AC_DEFINEd more than once.
9484# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009485
9486
Martin v. Löwis11437992002-04-12 09:54:03 +00009487
9488
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
9490$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009491
Martin v. Löwiseba40652007-08-30 20:10:57 +00009492# Check whether --with-threads was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009493if test "${with_threads+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009494 withval=$with_threads;
9495fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009496
9497
Barry Warsawc0d24d82000-06-29 16:12:00 +00009498# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009499
Martin v. Löwiseba40652007-08-30 20:10:57 +00009500# Check whether --with-thread was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009501if test "${with_thread+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009502 withval=$with_thread; with_threads=$with_thread
9503fi
9504
Barry Warsawc0d24d82000-06-29 16:12:00 +00009505
9506if test -z "$with_threads"
9507then with_threads="yes"
9508fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009509{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
9510$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d82000-06-29 16:12:00 +00009511
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009512
Barry Warsawc0d24d82000-06-29 16:12:00 +00009513if test "$with_threads" = "no"
9514then
9515 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009516elif test "$ac_cv_pthread_is_default" = yes
9517then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009518 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009519
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009520 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009521 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009522
9523 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009524 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009525elif test "$ac_cv_kpthread" = "yes"
9526then
9527 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009528 if test "$ac_cv_cxx_thread" = "yes"; then
9529 CXX="$CXX -Kpthread"
9530 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009531 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009532
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009533 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009534 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009535elif test "$ac_cv_kthread" = "yes"
9536then
9537 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009538 if test "$ac_cv_cxx_thread" = "yes"; then
9539 CXX="$CXX -Kthread"
9540 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009541 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009542
9543 posix_threads=yes
9544 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009545elif test "$ac_cv_pthread" = "yes"
9546then
9547 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009548 if test "$ac_cv_cxx_thread" = "yes"; then
9549 CXX="$CXX -pthread"
9550 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009551 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009552
9553 posix_threads=yes
9554 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009555else
9556 if test ! -z "$with_threads" -a -d "$with_threads"
9557 then LDFLAGS="$LDFLAGS -L$with_threads"
9558 fi
9559 if test ! -z "$withval" -a -d "$withval"
9560 then LDFLAGS="$LDFLAGS -L$withval"
9561 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009562
9563 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00009564 # define _POSIX_THREADS in unistd.h. Some apparently don't
9565 # (e.g. gnu pth with pthread emulation)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009566 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
9567$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
9568 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009569/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009570
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009571#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009572#ifdef _POSIX_THREADS
9573yes
9574#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009575
9576_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009577if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009578 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009579 unistd_defines_pthreads=yes
9580else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009581 unistd_defines_pthreads=no
9582fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009583rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009584
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
9586$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009587
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009588 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009589
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009590 ac_fn_c_check_header_mongrel "$LINENO" "cthreads.h" "ac_cv_header_cthreads_h" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01009591if test "x$ac_cv_header_cthreads_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009592 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00009593
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009594 $as_echo "#define C_THREADS 1" >>confdefs.h
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009595
Martin v. Löwis11437992002-04-12 09:54:03 +00009596
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009597$as_echo "#define HURD_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009598
9599 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009600 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009601else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009602
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009603 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 +01009604if test "x$ac_cv_header_mach_cthreads_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009605 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00009606
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009607 $as_echo "#define C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009608
Martin v. Löwis11437992002-04-12 09:54:03 +00009609
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009610$as_echo "#define MACH_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009611
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009612 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009613else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009614
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009615 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pth" >&5
9616$as_echo_n "checking for --with-pth... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009617
Martin v. Löwiseba40652007-08-30 20:10:57 +00009618# Check whether --with-pth was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009619if test "${with_pth+set}" = set; then :
9620 withval=$with_pth; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9621$as_echo "$withval" >&6; }
9622 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009623
9624
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009625$as_echo "#define HAVE_PTH 1" >>confdefs.h
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009626
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009627 LIBS="-lpth $LIBS"
9628 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009629else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009630 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9631$as_echo "no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009632
9633 # Just looking for pthread_create in libpthread is not enough:
9634 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
9635 # So we really have to include pthread.h, and then link.
9636 _libs=$LIBS
9637 LIBS="$LIBS -lpthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009638 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
9639$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
9640 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009641/* end confdefs.h. */
Stefan Krahae66ca62012-11-22 22:36:57 +01009642
9643#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009644#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00009645
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009646void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00009647int
9648main ()
9649{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009650
9651pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00009652 ;
9653 return 0;
9654}
9655_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009656if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009657
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9659$as_echo "yes" >&6; }
9660 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00009661
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009662 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009663 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009664else
Martin v. Löwis11437992002-04-12 09:54:03 +00009665
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009666 LIBS=$_libs
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009667 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Matthias Klose3cef2a92012-03-14 23:39:33 +01009668if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009669 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00009670
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009671 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009672 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00009673else
Guido van Rossumad678af1998-10-02 14:42:15 +00009674
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009675 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 +01009676if test "x$ac_cv_header_atheos_threads_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009677 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009678
9679
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009680$as_echo "#define ATHEOS_THREADS 1" >>confdefs.h
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009681
9682 THREADOBJ="Python/thread.o"
9683else
9684
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009685 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 +01009686if test "x$ac_cv_header_kernel_OS_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009687 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009688
9689
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009690$as_echo "#define BEOS_THREADS 1" >>confdefs.h
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009691
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009692 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009693else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009694
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009695 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
9696$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009697if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009698 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009699else
Martin v. Löwis11437992002-04-12 09:54:03 +00009700 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009701LIBS="-lpthreads $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009702cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009703/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009704
Martin v. Löwiseba40652007-08-30 20:10:57 +00009705/* Override any GCC internal prototype to avoid an error.
9706 Use char because int might match the return type of a GCC
9707 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009708#ifdef __cplusplus
9709extern "C"
9710#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009711char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009712int
9713main ()
9714{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009715return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009716 ;
9717 return 0;
9718}
9719_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009720if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009721 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00009722else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009723 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00009724fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009725rm -f core conftest.err conftest.$ac_objext \
9726 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009727LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009728fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009729{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
9730$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009731if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009732 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00009733
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009734 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009735 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009736 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00009737else
Greg Steinadf63d62000-07-05 10:38:09 +00009738
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009739 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
9740$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009741if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009742 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00009743else
Martin v. Löwis11437992002-04-12 09:54:03 +00009744 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009745LIBS="-lc_r $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009746cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009747/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009748
Martin v. Löwiseba40652007-08-30 20:10:57 +00009749/* Override any GCC internal prototype to avoid an error.
9750 Use char because int might match the return type of a GCC
9751 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009752#ifdef __cplusplus
9753extern "C"
9754#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009755char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009756int
9757main ()
9758{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009759return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009760 ;
9761 return 0;
9762}
9763_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009764if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009765 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00009766else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009767 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00009768fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009769rm -f core conftest.err conftest.$ac_objext \
9770 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009771LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00009772fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009773{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
9774$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009775if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009776 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00009777
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009778 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009779 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009780 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009781else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009782
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009783 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
9784$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009785if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009786 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009787else
Martin v. Löwis11437992002-04-12 09:54:03 +00009788 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009789LIBS="-lpthread $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009790cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009791/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009792
Martin v. Löwiseba40652007-08-30 20:10:57 +00009793/* Override any GCC internal prototype to avoid an error.
9794 Use char because int might match the return type of a GCC
9795 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009796#ifdef __cplusplus
9797extern "C"
9798#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009799char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009800int
9801main ()
9802{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009803return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009804 ;
9805 return 0;
9806}
9807_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009808if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009809 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009810else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009811 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009812fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009813rm -f core conftest.err conftest.$ac_objext \
9814 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009815LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009816fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
9818$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009819if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009820 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009821
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009822 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009823 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009824 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009825else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009826
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009827 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
9828$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009829if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009830 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00009831else
Martin v. Löwis11437992002-04-12 09:54:03 +00009832 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009833LIBS="-lcma $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009834cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009835/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009836
Martin v. Löwiseba40652007-08-30 20:10:57 +00009837/* Override any GCC internal prototype to avoid an error.
9838 Use char because int might match the return type of a GCC
9839 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009840#ifdef __cplusplus
9841extern "C"
9842#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009843char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009844int
9845main ()
9846{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009847return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009848 ;
9849 return 0;
9850}
9851_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009852if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009853 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00009854else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009855 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00009856fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009857rm -f core conftest.err conftest.$ac_objext \
9858 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009859LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009860fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009861{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
9862$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009863if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009864 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00009865
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009866 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009867 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009868 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00009869else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00009870
Martin v. Löwis130fb172001-07-19 11:00:41 +00009871 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00009872fi
9873
Guido van Rossum627b2d71993-12-24 10:39:16 +00009874
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009875fi
9876
Guido van Rossum0be3e491997-05-22 20:33:33 +00009877fi
9878
Guido van Rossum49545951997-12-02 19:28:29 +00009879fi
9880
Guido van Rossumb93a8621998-05-07 13:27:32 +00009881fi
9882
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009883
Michael W. Hudson54241132001-12-07 15:38:26 +00009884fi
9885
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009886
9887fi
9888
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009889fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009890rm -f core conftest.err conftest.$ac_objext \
9891 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009892fi
9893
Martin v. Löwis11437992002-04-12 09:54:03 +00009894fi
9895
9896
9897fi
9898
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009899
Michael W. Hudson54241132001-12-07 15:38:26 +00009900
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009901 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
9902$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009903if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009904 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009905else
Martin v. Löwis11437992002-04-12 09:54:03 +00009906 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009907LIBS="-lmpc $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009908cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009909/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009910
Martin v. Löwiseba40652007-08-30 20:10:57 +00009911/* Override any GCC internal prototype to avoid an error.
9912 Use char because int might match the return type of a GCC
9913 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009914#ifdef __cplusplus
9915extern "C"
9916#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009917char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009918int
9919main ()
9920{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009921return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009922 ;
9923 return 0;
9924}
9925_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009926if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009927 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009928else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009929 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009930fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009931rm -f core conftest.err conftest.$ac_objext \
9932 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009933LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009934fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009935{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
9936$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009937if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009938 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009939
Martin v. Löwis130fb172001-07-19 11:00:41 +00009940 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009941 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009942 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009943fi
9944
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009945
Neal Norwitza978ab02002-11-02 16:58:05 +00009946 if test "$posix_threads" != "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009947 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
9948$as_echo_n "checking for thr_create in -lthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009949if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009950 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009951else
Martin v. Löwis11437992002-04-12 09:54:03 +00009952 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009953LIBS="-lthread $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009954cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009955/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009956
Martin v. Löwiseba40652007-08-30 20:10:57 +00009957/* Override any GCC internal prototype to avoid an error.
9958 Use char because int might match the return type of a GCC
9959 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009960#ifdef __cplusplus
9961extern "C"
9962#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009963char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009964int
9965main ()
9966{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009967return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009968 ;
9969 return 0;
9970}
9971_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009972if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009973 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009974else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009975 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009976fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009977rm -f core conftest.err conftest.$ac_objext \
9978 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009979LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009980fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009981{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
9982$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009983if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009984 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009985
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009986 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009987 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009988 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009989fi
9990
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009991 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009992
Martin v. Löwis130fb172001-07-19 11:00:41 +00009993 if test "$USE_THREAD_MODULE" != "#"
9994 then
9995 # If the above checks didn't disable threads, (at least) OSF1
9996 # needs this '-threads' argument during linking.
9997 case $ac_sys_system in
9998 OSF1) LDLAST=-threads;;
9999 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000010000 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010001fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010002
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010003if test "$posix_threads" = "yes"; then
10004 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010005
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010006$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010007
10008 fi
10009
10010 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10011 case $ac_sys_system/$ac_sys_release in
Charles-François Natali4929eb92011-07-21 19:41:04 +020010012 SunOS/5.6)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010013$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010014
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010015 ;;
10016 SunOS/5.8)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010017$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010018
10019 ;;
Charles-François Natali4929eb92011-07-21 19:41:04 +020010020 AIX/*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010021$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimescba36bb2008-01-30 22:54:18 +000010022
10023 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010024 esac
10025
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010026 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10027$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010028 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010029 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010030else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010031 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010032 ac_cv_pthread_system_supported=no
10033else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010034 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010035/* end confdefs.h. */
Stefan Krahae66ca62012-11-22 22:36:57 +010010036
10037 #include <stdio.h>
10038 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010039 void *foo(void *parm) {
10040 return NULL;
10041 }
10042 main() {
10043 pthread_attr_t attr;
10044 pthread_t id;
10045 if (pthread_attr_init(&attr)) exit(-1);
10046 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10047 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10048 exit(0);
10049 }
10050_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010051if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010052 ac_cv_pthread_system_supported=yes
10053else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010054 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010055fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010056rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10057 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010058fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010059
Martin v. Löwiseba40652007-08-30 20:10:57 +000010060
Guido van Rossum627b2d71993-12-24 10:39:16 +000010061fi
10062
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10064$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010065 if test "$ac_cv_pthread_system_supported" = "yes"; then
10066
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010067$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010068
10069 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010070 for ac_func in pthread_sigmask
10071do :
10072 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010073if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010074 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010075#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010076_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010077 case $ac_sys_system in
10078 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010079
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010080$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010081
10082 ;;
10083 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010084fi
10085done
10086
Christian Heimes0d604cf2013-08-21 13:26:05 +020010087 for ac_func in pthread_atfork
10088do :
10089 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
10090if test "x$ac_cv_func_pthread_atfork" = xyes; then :
10091 cat >>confdefs.h <<_ACEOF
10092#define HAVE_PTHREAD_ATFORK 1
10093_ACEOF
10094
10095fi
10096done
10097
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010098fi
10099
10100
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010101# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010102
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10104$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010105# Check whether --enable-ipv6 was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010106if test "${enable_ipv6+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000010107 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010108 no)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10110$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010111 ipv6=no
10112 ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010113 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10114$as_echo "yes" >&6; }
10115 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010116
10117 ipv6=yes
10118 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010119 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010120else
Martin v. Löwis11437992002-04-12 09:54:03 +000010121
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010122 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010123/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010124 /* AF_INET6 available check */
10125#include <sys/types.h>
10126#include <sys/socket.h>
Charles-François Natalibe2b9072013-01-08 19:47:00 +010010127int
10128main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010129{
Charles-François Natalibe2b9072013-01-08 19:47:00 +010010130int domain = AF_INET6;
10131 ;
10132 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010133}
Martin v. Löwis11437992002-04-12 09:54:03 +000010134_ACEOF
Charles-François Natalibe2b9072013-01-08 19:47:00 +010010135if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +000010136
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10138$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010139 ipv6=yes
Matthias Klosec511b472010-05-08 11:01:39 +000010140
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010141else
Matthias Klosec511b472010-05-08 11:01:39 +000010142
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10144$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010145 ipv6=no
Matthias Klosec511b472010-05-08 11:01:39 +000010146
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010147fi
Charles-François Natalibe2b9072013-01-08 19:47:00 +010010148rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010149
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010150if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010151 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10152$as_echo_n "checking if RFC2553 API is available... " >&6; }
10153 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010154/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +000010155
10156 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010157#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010158int
10159main ()
10160{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010161struct sockaddr_in6 x;
Matthias Klosec511b472010-05-08 11:01:39 +000010162 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010163 ;
10164 return 0;
10165}
Matthias Klosec511b472010-05-08 11:01:39 +000010166
Martin v. Löwis11437992002-04-12 09:54:03 +000010167_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010168if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +000010169
10170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010171$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000010172 ipv6=yes
10173
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010174else
Matthias Klosec511b472010-05-08 11:01:39 +000010175
10176 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010177$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000010178 ipv6=no
10179
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010180fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010181rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010182fi
10183
10184if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010185 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010186
10187fi
10188
Martin v. Löwiseba40652007-08-30 20:10:57 +000010189fi
10190
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010191
10192ipv6type=unknown
10193ipv6lib=none
10194ipv6trylibc=no
10195
10196if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010197 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10198$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010199 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10200 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010201 case $i in
10202 inria)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010203 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010204/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010205
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010206#include <netinet/in.h>
10207#ifdef IPV6_INRIA_VERSION
10208yes
10209#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010210_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010211if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010212 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010213 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010214fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000010215rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010216
10217 ;;
10218 kame)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010219 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010220/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010221
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010222#include <netinet/in.h>
10223#ifdef __KAME__
10224yes
10225#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010226_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010227if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010228 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010229 ipv6type=$i;
10230 ipv6lib=inet6
10231 ipv6libdir=/usr/local/v6/lib
10232 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010233fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000010234rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010235
10236 ;;
10237 linux-glibc)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010238 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010239/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010240
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010241#include <features.h>
10242#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10243yes
10244#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010245_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010246if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010247 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010248 ipv6type=$i;
10249 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010250fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000010251rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010252
10253 ;;
10254 linux-inet6)
10255 if test -d /usr/inet6; then
10256 ipv6type=$i
10257 ipv6lib=inet6
10258 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010259 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010260 fi
10261 ;;
10262 solaris)
10263 if test -f /etc/netconfig; then
Antoine Pitrou31e85952011-01-03 18:57:14 +000010264 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010265 ipv6type=$i
10266 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010267 fi
10268 fi
10269 ;;
10270 toshiba)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010271 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010272/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010273
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010274#include <sys/param.h>
10275#ifdef _TOSHIBA_INET6
10276yes
10277#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010278_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010279if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010280 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010281 ipv6type=$i;
10282 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010283 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010284fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000010285rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010286
10287 ;;
10288 v6d)
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 </usr/local/v6/include/sys/v6config.h>
10293#ifdef __V6D__
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=v6;
10301 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010302 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010303fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000010304rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010305
10306 ;;
10307 zeta)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010308 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010309/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010310
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010311#include <sys/param.h>
10312#ifdef _ZETA_MINAMI_INET6
10313yes
10314#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010315_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010316if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010317 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010318 ipv6type=$i;
10319 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010320 ipv6libdir=/usr/local/v6/lib
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 esac
10326 if test "$ipv6type" != "unknown"; then
10327 break
10328 fi
10329 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10331$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010332fi
10333
10334if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10335 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10336 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10337 echo "using lib$ipv6lib"
10338 else
10339 if test $ipv6trylibc = "yes"; then
10340 echo "using libc"
10341 else
10342 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10343 echo "You need to fetch lib$ipv6lib.a from appropriate"
10344 echo 'ipv6 kit and compile beforehand.'
10345 exit 1
10346 fi
10347 fi
10348fi
10349
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
10351$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
10352cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010353/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +000010354
10355 #include <Carbon/Carbon.h>
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010356int
10357main ()
10358{
10359FSIORefNum fRef = 0
10360 ;
10361 return 0;
10362}
Mark Dickinson0712b562010-05-08 19:13:21 +000010363
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010364_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010365if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +000010366
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010367
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010368$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010369
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10371$as_echo "yes" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010372
Mark Dickinson0712b562010-05-08 19:13:21 +000010373else
10374
10375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10376$as_echo "no" >&6; }
10377
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010378fi
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010379rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10380
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010381# Check for --with-doc-strings
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10383$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010384
Martin v. Löwiseba40652007-08-30 20:10:57 +000010385# Check whether --with-doc-strings was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010386if test "${with_doc_strings+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000010387 withval=$with_doc_strings;
10388fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010389
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010390
10391if test -z "$with_doc_strings"
10392then with_doc_strings="yes"
10393fi
10394if test "$with_doc_strings" != "no"
10395then
10396
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010397$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010398
10399fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010400{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10401$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010402
Neil Schemenauera35c6882001-02-27 04:45:05 +000010403# Check for Python-specific malloc support
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010404{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
10405$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010406
Martin v. Löwiseba40652007-08-30 20:10:57 +000010407# Check whether --with-tsc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010408if test "${with_tsc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000010409 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010410if test "$withval" != no
10411then
10412
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010413$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010414
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10416$as_echo "yes" >&6; }
10417else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10418$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010419fi
10420else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10422$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010423fi
10424
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010425
10426# Check for Python-specific malloc support
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010427{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10428$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010429
Martin v. Löwiseba40652007-08-30 20:10:57 +000010430# Check whether --with-pymalloc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010431if test "${with_pymalloc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000010432 withval=$with_pymalloc;
10433fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010434
Neil Schemenauera35c6882001-02-27 04:45:05 +000010435
Neil Schemenauer16c22972002-03-22 15:34:49 +000010436if test -z "$with_pymalloc"
10437then with_pymalloc="yes"
10438fi
10439if test "$with_pymalloc" != "no"
10440then
Martin v. Löwis11437992002-04-12 09:54:03 +000010441
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010442$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000010443
10444fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010445{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
10446$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000010447
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010448# Check for Valgrind support
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
10450$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010451
10452# Check whether --with-valgrind was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010453if test "${with_valgrind+set}" = set; then :
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010454 withval=$with_valgrind;
10455else
10456 with_valgrind=no
10457fi
10458
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010459{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
10460$as_echo "$with_valgrind" >&6; }
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010461if test "$with_valgrind" != no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010462 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 +010010463if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010464
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010465$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010466
10467else
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010468 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010469
10470fi
10471
10472
10473fi
10474
Barry Warsawef82cd72000-06-30 16:21:01 +000010475# Check for --with-wctype-functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010476{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-wctype-functions" >&5
10477$as_echo_n "checking for --with-wctype-functions... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010478
Martin v. Löwiseba40652007-08-30 20:10:57 +000010479# Check whether --with-wctype-functions was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010480if test "${with_wctype_functions+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000010481 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000010482if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000010483then
10484
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010485$as_echo "#define WANT_WCTYPE_FUNCTIONS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010486
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010487 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10488$as_echo "yes" >&6; }
10489else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10490$as_echo "no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000010491fi
10492else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10494$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010495fi
10496
Barry Warsawef82cd72000-06-30 16:21:01 +000010497
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010498# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000010499
Guido van Rossum98935bf2001-09-05 19:13:16 +000010500DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000010501
Guido van Rossume97ee181999-12-20 21:27:22 +000010502# the dlopen() function means we might want to use dynload_shlib.o. some
10503# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000010504for ac_func in dlopen
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010505do :
10506 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010507if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010508 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010509#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010510_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000010511
Guido van Rossume97ee181999-12-20 21:27:22 +000010512fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010513done
Guido van Rossume97ee181999-12-20 21:27:22 +000010514
Michael W. Hudson54241132001-12-07 15:38:26 +000010515
Guido van Rossume97ee181999-12-20 21:27:22 +000010516# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
10517# loading of modules.
10518
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
10520$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010521if test -z "$DYNLOADFILE"
10522then
10523 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000010524 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
10525 if test "$ac_cv_func_dlopen" = yes
10526 then DYNLOADFILE="dynload_shlib.o"
10527 else DYNLOADFILE="dynload_aix.o"
10528 fi
10529 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000010530 BeOS*) DYNLOADFILE="dynload_beos.o";;
10531 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Anthony Baxter82201742006-04-09 15:07:40 +000010532 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
10533 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010534 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000010535 *)
10536 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
10537 # out any dynamic loading
10538 if test "$ac_cv_func_dlopen" = yes
10539 then DYNLOADFILE="dynload_shlib.o"
10540 else DYNLOADFILE="dynload_stub.o"
10541 fi
10542 ;;
10543 esac
10544fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010545{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
10546$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010547if test "$DYNLOADFILE" != "dynload_stub.o"
10548then
Martin v. Löwis11437992002-04-12 09:54:03 +000010549
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010550$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000010551
10552fi
10553
Neil Schemenauer4e425612001-06-19 15:44:15 +000010554# MACHDEP_OBJS can be set to platform-specific object files needed by Python
10555
Michael W. Hudson54241132001-12-07 15:38:26 +000010556
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
10558$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010559if test -z "$MACHDEP_OBJS"
10560then
Jack Jansene578a632001-08-15 01:27:14 +000010561 MACHDEP_OBJS=$extra_machdep_objs
10562else
10563 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000010564fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010565{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
10566$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010567
Guido van Rossum627b2d71993-12-24 10:39:16 +000010568# checks for library functions
Martin v. Löwisaef18b12008-03-24 13:31:16 +000010569for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
10570 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
doko@ubuntu.coma50b0de2015-04-13 21:55:59 +020010571 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
10572 getentropy \
Martin v. Löwis50ea4562009-11-27 13:56:01 +000010573 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Benjamin Petersond16e01c2014-02-04 10:20:26 -050010574 initgroups kill killpg lchmod lchown lstat mkfifo mknod mktime mmap \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000010575 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000010576 putenv readlink realpath \
Jesse Noller355b1262009-04-02 00:03:28 +000010577 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
10578 setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000010579 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Martin v. Löwis50ea4562009-11-27 13:56:01 +000010580 setlocale setregid setreuid setresuid setresgid \
10581 setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +000010582 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000010583 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Neal Norwitz05a45592006-03-20 06:30:08 +000010584 truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010585do :
10586 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10587ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010588if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010589 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010590#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010591_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010592
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010593fi
10594done
10595
Michael W. Hudson54241132001-12-07 15:38:26 +000010596
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010597# For some functions, having a definition is not sufficient, since
10598# we want to take their address.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
10600$as_echo_n "checking for chroot... " >&6; }
10601cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010602/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010603#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010604int
10605main ()
10606{
10607void *x=chroot
10608 ;
10609 return 0;
10610}
10611_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010612if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010613
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010614$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010615
Matthias Klosec511b472010-05-08 11:01:39 +000010616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010617$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010618else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10620$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010621
10622fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010623rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
10625$as_echo_n "checking for link... " >&6; }
10626cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010627/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010628#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010629int
10630main ()
10631{
10632void *x=link
10633 ;
10634 return 0;
10635}
10636_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010637if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010638
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010639$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010640
Matthias Klosec511b472010-05-08 11:01:39 +000010641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010642$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010643else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10645$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010646
10647fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010648rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
10650$as_echo_n "checking for symlink... " >&6; }
10651cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010652/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010653#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010654int
10655main ()
10656{
10657void *x=symlink
10658 ;
10659 return 0;
10660}
10661_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010662if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010663
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010664$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010665
Matthias Klosec511b472010-05-08 11:01:39 +000010666 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010667$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010668else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10670$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010671
10672fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010673rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
10675$as_echo_n "checking for fchdir... " >&6; }
10676cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010677/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010678#include <unistd.h>
10679int
10680main ()
10681{
10682void *x=fchdir
10683 ;
10684 return 0;
10685}
10686_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010687if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010688
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010689$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010690
Matthias Klosec511b472010-05-08 11:01:39 +000010691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010692$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010693else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10695$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010696
10697fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010698rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
10700$as_echo_n "checking for fsync... " >&6; }
10701cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010702/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010703#include <unistd.h>
10704int
10705main ()
10706{
10707void *x=fsync
10708 ;
10709 return 0;
10710}
10711_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010712if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010713
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010714$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010715
Matthias Klosec511b472010-05-08 11:01:39 +000010716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010717$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010718else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10720$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010721
10722fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010723rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
10725$as_echo_n "checking for fdatasync... " >&6; }
10726cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010727/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010728#include <unistd.h>
10729int
10730main ()
10731{
10732void *x=fdatasync
10733 ;
10734 return 0;
10735}
10736_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010737if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010738
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010739$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010740
Matthias Klosec511b472010-05-08 11:01:39 +000010741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010742$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010743else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10745$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010746
10747fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010748rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
10750$as_echo_n "checking for epoll... " >&6; }
10751cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010752/* end confdefs.h. */
10753#include <sys/epoll.h>
10754int
10755main ()
10756{
10757void *x=epoll_create
10758 ;
10759 return 0;
10760}
10761_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010762if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010763
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010764$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010765
Matthias Klosec511b472010-05-08 11:01:39 +000010766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010767$as_echo "yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010768else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10770$as_echo "no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010771
10772fi
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010773rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
10775$as_echo_n "checking for kqueue... " >&6; }
10776cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010777/* end confdefs.h. */
10778
10779#include <sys/types.h>
10780#include <sys/event.h>
10781
10782int
10783main ()
10784{
10785int x=kqueue()
10786 ;
10787 return 0;
10788}
10789_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010790if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010791
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010792$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010793
Matthias Klosec511b472010-05-08 11:01:39 +000010794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010795$as_echo "yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010796else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10798$as_echo "no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010799
10800fi
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010801rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010802# On some systems (eg. FreeBSD 5), we would find a definition of the
10803# functions ctermid_r, setgroups in the library, but no prototype
10804# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
10805# address to avoid compiler warnings and potential miscompilations
10806# because of the missing prototypes.
10807
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
10809$as_echo_n "checking for ctermid_r... " >&6; }
10810cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010811/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010812
Martin v. Löwisd5843682002-11-21 20:41:28 +000010813#include <stdio.h>
10814
Martin v. Löwisd5843682002-11-21 20:41:28 +000010815int
10816main ()
10817{
10818void* p = ctermid_r
10819 ;
10820 return 0;
10821}
10822_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010823if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010824
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010825$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010826
Matthias Klosec511b472010-05-08 11:01:39 +000010827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010828$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010829else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10831$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010832
10833fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010834rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10835
Antoine Pitroub170f172010-09-10 18:47:36 +000010836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
10837$as_echo_n "checking for flock declaration... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010838if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010839 $as_echo_n "(cached) " >&6
10840else
10841 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010842/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010843#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010844int
10845main ()
10846{
10847void* p = flock
Antoine Pitroub170f172010-09-10 18:47:36 +000010848
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010849 ;
10850 return 0;
10851}
10852_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010853if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010854 ac_cv_flock_decl=yes
10855else
10856 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010857
10858fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010859rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitrou85729812010-09-07 14:55:24 +000010860
Antoine Pitroub170f172010-09-10 18:47:36 +000010861fi
10862{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
10863$as_echo "$ac_cv_flock_decl" >&6; }
10864if test "x${ac_cv_flock_decl}" = xyes; then
10865 for ac_func in flock
10866do :
10867 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010868if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010869 cat >>confdefs.h <<_ACEOF
10870#define HAVE_FLOCK 1
Antoine Pitrou85729812010-09-07 14:55:24 +000010871_ACEOF
Antoine Pitroub170f172010-09-10 18:47:36 +000010872
Antoine Pitrou85729812010-09-07 14:55:24 +000010873else
Antoine Pitroub170f172010-09-10 18:47:36 +000010874 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitrou85729812010-09-07 14:55:24 +000010875$as_echo_n "checking for flock in -lbsd... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010876if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitrou85729812010-09-07 14:55:24 +000010877 $as_echo_n "(cached) " >&6
10878else
10879 ac_check_lib_save_LIBS=$LIBS
10880LIBS="-lbsd $LIBS"
10881cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10882/* end confdefs.h. */
10883
10884/* Override any GCC internal prototype to avoid an error.
10885 Use char because int might match the return type of a GCC
10886 builtin and then its argument prototype would still apply. */
10887#ifdef __cplusplus
10888extern "C"
10889#endif
10890char flock ();
10891int
10892main ()
10893{
10894return flock ();
10895 ;
10896 return 0;
10897}
10898_ACEOF
10899if ac_fn_c_try_link "$LINENO"; then :
10900 ac_cv_lib_bsd_flock=yes
10901else
10902 ac_cv_lib_bsd_flock=no
10903fi
10904rm -f core conftest.err conftest.$ac_objext \
10905 conftest$ac_exeext conftest.$ac_ext
10906LIBS=$ac_check_lib_save_LIBS
10907fi
10908{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
10909$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010910if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010911 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitrou85729812010-09-07 14:55:24 +000010912
10913
10914$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
10915
10916
10917fi
10918
10919
10920fi
Antoine Pitroub170f172010-09-10 18:47:36 +000010921done
10922
Antoine Pitrou85729812010-09-07 14:55:24 +000010923fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010924
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
10926$as_echo_n "checking for getpagesize... " >&6; }
10927cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010928/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010929
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010930#include <unistd.h>
10931
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010932int
10933main ()
10934{
10935void* p = getpagesize
10936 ;
10937 return 0;
10938}
10939_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010940if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010941
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010942$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010943
Matthias Klosec511b472010-05-08 11:01:39 +000010944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010945$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010946else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10948$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010949
10950fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010951rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010952
Charles-François Natali93a11752011-11-27 13:01:35 +010010953{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
10954$as_echo_n "checking for broken unsetenv... " >&6; }
10955cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10956/* end confdefs.h. */
10957
10958#include <stdlib.h>
10959
10960int
10961main ()
10962{
10963int res = unsetenv("DUMMY")
10964 ;
10965 return 0;
10966}
10967_ACEOF
10968if ac_fn_c_try_compile "$LINENO"; then :
10969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10970$as_echo "no" >&6; }
10971else
10972
10973$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
10974
10975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10976$as_echo "yes" >&6; }
10977
10978fi
10979rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10980
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010981for ac_prog in true
10982do
10983 # Extract the first word of "$ac_prog", so it can be a program name with args.
10984set dummy $ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10986$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010987if ${ac_cv_prog_TRUE+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010988 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010989else
10990 if test -n "$TRUE"; then
10991 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
10992else
10993as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10994for as_dir in $PATH
10995do
10996 IFS=$as_save_IFS
10997 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010998 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +010010999 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011000 ac_cv_prog_TRUE="$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011001 $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 +000011002 break 2
11003 fi
11004done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011005 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000011006IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011007
11008fi
11009fi
11010TRUE=$ac_cv_prog_TRUE
11011if test -n "$TRUE"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11013$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011014else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11016$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011017fi
11018
Martin v. Löwiseba40652007-08-30 20:10:57 +000011019
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011020 test -n "$TRUE" && break
11021done
11022test -n "$TRUE" || TRUE="/bin/true"
11023
11024
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11026$as_echo_n "checking for inet_aton in -lc... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011027if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011028 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011029else
11030 ac_check_lib_save_LIBS=$LIBS
11031LIBS="-lc $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011032cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011033/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011034
Martin v. Löwiseba40652007-08-30 20:10:57 +000011035/* Override any GCC internal prototype to avoid an error.
11036 Use char because int might match the return type of a GCC
11037 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011038#ifdef __cplusplus
11039extern "C"
11040#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011041char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011042int
11043main ()
11044{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011045return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011046 ;
11047 return 0;
11048}
11049_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011050if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011051 ac_cv_lib_c_inet_aton=yes
11052else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011053 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011054fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011055rm -f core conftest.err conftest.$ac_objext \
11056 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011057LIBS=$ac_check_lib_save_LIBS
11058fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011059{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11060$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011061if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011062 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011063else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011064 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11065$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011066if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011067 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011068else
11069 ac_check_lib_save_LIBS=$LIBS
11070LIBS="-lresolv $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011071cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011072/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011073
Martin v. Löwiseba40652007-08-30 20:10:57 +000011074/* Override any GCC internal prototype to avoid an error.
11075 Use char because int might match the return type of a GCC
11076 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011077#ifdef __cplusplus
11078extern "C"
11079#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011080char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011081int
11082main ()
11083{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011084return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011085 ;
11086 return 0;
11087}
11088_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011089if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011090 ac_cv_lib_resolv_inet_aton=yes
11091else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011092 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011093fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011094rm -f core conftest.err conftest.$ac_objext \
11095 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011096LIBS=$ac_check_lib_save_LIBS
11097fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011098{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11099$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011100if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011101 cat >>confdefs.h <<_ACEOF
11102#define HAVE_LIBRESOLV 1
11103_ACEOF
11104
11105 LIBS="-lresolv $LIBS"
11106
11107fi
11108
11109
11110fi
11111
11112
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011113# On Tru64, chflags seems to be present, but calling it will
11114# exit Python
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11116$as_echo_n "checking for chflags... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011117if ${ac_cv_have_chflags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011118 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011119else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011120 if test "$cross_compiling" = yes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000011121 ac_cv_have_chflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011122else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011123 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011124/* end confdefs.h. */
Ned Deily43e10542011-06-27 23:41:53 -070011125
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011126#include <sys/stat.h>
11127#include <unistd.h>
11128int main(int argc, char*argv[])
11129{
11130 if(chflags(argv[0], 0) != 0)
11131 return 1;
11132 return 0;
11133}
Ned Deily43e10542011-06-27 23:41:53 -070011134
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011135_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011136if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011137 ac_cv_have_chflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011138else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011139 ac_cv_have_chflags=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011140fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011141rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11142 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000011143fi
11144
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011145
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011146fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011147{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11148$as_echo "$ac_cv_have_chflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000011149if test "$ac_cv_have_chflags" = cross ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011150 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011151if test "x$ac_cv_func_chflags" = xyes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000011152 ac_cv_have_chflags="yes"
11153else
11154 ac_cv_have_chflags="no"
11155fi
11156
11157fi
11158if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011159
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011160$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011161
11162fi
11163
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11165$as_echo_n "checking for lchflags... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011166if ${ac_cv_have_lchflags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011167 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011168else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011169 if test "$cross_compiling" = yes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000011170 ac_cv_have_lchflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011171else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011172 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011173/* end confdefs.h. */
Ned Deily43e10542011-06-27 23:41:53 -070011174
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011175#include <sys/stat.h>
11176#include <unistd.h>
11177int main(int argc, char*argv[])
11178{
11179 if(lchflags(argv[0], 0) != 0)
11180 return 1;
11181 return 0;
11182}
Ned Deily43e10542011-06-27 23:41:53 -070011183
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011184_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011185if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011186 ac_cv_have_lchflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011187else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011188 ac_cv_have_lchflags=no
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011189fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011190rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11191 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011192fi
11193
11194
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011195fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011196{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11197$as_echo "$ac_cv_have_lchflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000011198if test "$ac_cv_have_lchflags" = cross ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011199 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011200if test "x$ac_cv_func_lchflags" = xyes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000011201 ac_cv_have_lchflags="yes"
11202else
11203 ac_cv_have_lchflags="no"
11204fi
11205
11206fi
11207if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011208
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011209$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011210
11211fi
11212
Ronald Oussorenf8752642006-07-06 10:13:35 +000011213case $ac_sys_system/$ac_sys_release in
11214Darwin/*)
11215 _CUR_CFLAGS="${CFLAGS}"
11216 _CUR_LDFLAGS="${LDFLAGS}"
11217 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11218 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11219 ;;
11220esac
11221
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11223$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011224if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011225 $as_echo_n "(cached) " >&6
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011226else
11227 ac_check_lib_save_LIBS=$LIBS
11228LIBS="-lz $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011229cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011230/* end confdefs.h. */
11231
Martin v. Löwiseba40652007-08-30 20:10:57 +000011232/* Override any GCC internal prototype to avoid an error.
11233 Use char because int might match the return type of a GCC
11234 builtin and then its argument prototype would still apply. */
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011235#ifdef __cplusplus
11236extern "C"
11237#endif
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011238char inflateCopy ();
11239int
11240main ()
11241{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011242return inflateCopy ();
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011243 ;
11244 return 0;
11245}
11246_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011247if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011248 ac_cv_lib_z_inflateCopy=yes
11249else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011250 ac_cv_lib_z_inflateCopy=no
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011251fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011252rm -f core conftest.err conftest.$ac_objext \
11253 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011254LIBS=$ac_check_lib_save_LIBS
11255fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011256{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
11257$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011258if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011259
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011260$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011261
11262fi
11263
11264
Ronald Oussorenf8752642006-07-06 10:13:35 +000011265case $ac_sys_system/$ac_sys_release in
11266Darwin/*)
11267 CFLAGS="${_CUR_CFLAGS}"
11268 LDFLAGS="${_CUR_LDFLAGS}"
11269 ;;
11270esac
11271
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
11273$as_echo_n "checking for hstrerror... " >&6; }
11274cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011275/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011276
Martin v. Löwise9416172003-05-03 10:12:45 +000011277#include <netdb.h>
11278
Martin v. Löwise9416172003-05-03 10:12:45 +000011279int
11280main ()
11281{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011282void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011283 ;
11284 return 0;
11285}
11286_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011287if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011288
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011289$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011290
Matthias Klosec511b472010-05-08 11:01:39 +000011291 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011292$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011293else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11295$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011296
11297fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011298rm -f core conftest.err conftest.$ac_objext \
11299 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011300
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
11302$as_echo_n "checking for inet_aton... " >&6; }
11303cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011304/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011305
Martin v. Löwis86d66262006-02-17 08:40:11 +000011306#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011307#include <sys/socket.h>
11308#include <netinet/in.h>
11309#include <arpa/inet.h>
11310
Martin v. Löwise9416172003-05-03 10:12:45 +000011311int
11312main ()
11313{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011314void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011315 ;
11316 return 0;
11317}
11318_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011319if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011320
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011321$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011322
Matthias Klosec511b472010-05-08 11:01:39 +000011323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011324$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011325else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11327$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011328
11329fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011330rm -f core conftest.err conftest.$ac_objext \
11331 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011332
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
11334$as_echo_n "checking for inet_pton... " >&6; }
11335cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011336/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011337
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011338#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011339#include <sys/socket.h>
11340#include <netinet/in.h>
11341#include <arpa/inet.h>
11342
Martin v. Löwise9416172003-05-03 10:12:45 +000011343int
11344main ()
11345{
11346void* p = inet_pton
11347 ;
11348 return 0;
11349}
11350_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011351if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011352
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011353$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011354
Matthias Klosec511b472010-05-08 11:01:39 +000011355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011356$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011357else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11359$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011360
11361fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011362rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000011363
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011364# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
11366$as_echo_n "checking for setgroups... " >&6; }
11367cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011368/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011369
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011370#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011371#ifdef HAVE_GRP_H
11372#include <grp.h>
11373#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000011374
Martin v. Löwisd5843682002-11-21 20:41:28 +000011375int
11376main ()
11377{
11378void* p = setgroups
11379 ;
11380 return 0;
11381}
11382_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011383if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011384
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011385$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011386
Matthias Klosec511b472010-05-08 11:01:39 +000011387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011388$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011389else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11391$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011392
11393fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011394rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000011395
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011396# check for openpty and forkpty
11397
11398for ac_func in openpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011399do :
11400 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011401if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011402 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011403#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011404_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011405
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011406else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011407 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
11408$as_echo_n "checking for openpty in -lutil... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011409if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011410 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011411else
Martin v. Löwis11437992002-04-12 09:54:03 +000011412 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011413LIBS="-lutil $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011414cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011415/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011416
Martin v. Löwiseba40652007-08-30 20:10:57 +000011417/* Override any GCC internal prototype to avoid an error.
11418 Use char because int might match the return type of a GCC
11419 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011420#ifdef __cplusplus
11421extern "C"
11422#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011423char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011424int
11425main ()
11426{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011427return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011428 ;
11429 return 0;
11430}
11431_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011432if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011433 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011434else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011435 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011436fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011437rm -f core conftest.err conftest.$ac_objext \
11438 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011439LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011440fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011441{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
11442$as_echo "$ac_cv_lib_util_openpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011443if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011444 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011445 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011446else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011447 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
11448$as_echo_n "checking for openpty in -lbsd... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011449if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011450 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011451else
11452 ac_check_lib_save_LIBS=$LIBS
11453LIBS="-lbsd $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011454cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011455/* end confdefs.h. */
11456
Martin v. Löwiseba40652007-08-30 20:10:57 +000011457/* Override any GCC internal prototype to avoid an error.
11458 Use char because int might match the return type of a GCC
11459 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011460#ifdef __cplusplus
11461extern "C"
11462#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011463char openpty ();
11464int
11465main ()
11466{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011467return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011468 ;
11469 return 0;
11470}
11471_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011472if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011473 ac_cv_lib_bsd_openpty=yes
11474else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011475 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011476fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011477rm -f core conftest.err conftest.$ac_objext \
11478 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011479LIBS=$ac_check_lib_save_LIBS
11480fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011481{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
11482$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011483if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011484 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011485 LIBS="$LIBS -lbsd"
11486fi
11487
11488
11489fi
11490
Fred Drake8cef4cf2000-06-28 16:40:38 +000011491
11492fi
11493done
11494
11495for ac_func in forkpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011496do :
11497 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011498if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011499 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011500#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011501_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011502
Fred Drake8cef4cf2000-06-28 16:40:38 +000011503else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011504 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
11505$as_echo_n "checking for forkpty in -lutil... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011506if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011507 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011508else
Martin v. Löwis11437992002-04-12 09:54:03 +000011509 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011510LIBS="-lutil $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011511cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011512/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011513
Martin v. Löwiseba40652007-08-30 20:10:57 +000011514/* Override any GCC internal prototype to avoid an error.
11515 Use char because int might match the return type of a GCC
11516 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011517#ifdef __cplusplus
11518extern "C"
11519#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011520char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011521int
11522main ()
11523{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011524return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011525 ;
11526 return 0;
11527}
11528_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011529if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011530 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011531else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011532 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011533fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011534rm -f core conftest.err conftest.$ac_objext \
11535 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011536LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011537fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011538{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
11539$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011540if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011541 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011542 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011543else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011544 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
11545$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011546if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011547 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011548else
11549 ac_check_lib_save_LIBS=$LIBS
11550LIBS="-lbsd $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011551cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011552/* end confdefs.h. */
11553
Martin v. Löwiseba40652007-08-30 20:10:57 +000011554/* Override any GCC internal prototype to avoid an error.
11555 Use char because int might match the return type of a GCC
11556 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011557#ifdef __cplusplus
11558extern "C"
11559#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011560char forkpty ();
11561int
11562main ()
11563{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011564return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011565 ;
11566 return 0;
11567}
11568_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011569if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011570 ac_cv_lib_bsd_forkpty=yes
11571else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011572 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011573fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011574rm -f core conftest.err conftest.$ac_objext \
11575 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011576LIBS=$ac_check_lib_save_LIBS
11577fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011578{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
11579$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011580if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011581 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011582 LIBS="$LIBS -lbsd"
11583fi
11584
11585
11586fi
11587
Fred Drake8cef4cf2000-06-28 16:40:38 +000011588
11589fi
11590done
11591
Jack Jansendd19cf82001-12-06 22:36:17 +000011592
Brett Cannonaa5778d2008-03-18 04:09:00 +000011593# Stuff for expat.
Brett Cannonaa5778d2008-03-18 04:09:00 +000011594for ac_func in memmove
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011595do :
11596 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011597if test "x$ac_cv_func_memmove" = xyes; then :
Brett Cannonaa5778d2008-03-18 04:09:00 +000011598 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011599#define HAVE_MEMMOVE 1
Brett Cannonaa5778d2008-03-18 04:09:00 +000011600_ACEOF
11601
11602fi
11603done
11604
11605
Michael W. Hudson54241132001-12-07 15:38:26 +000011606# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000011607for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011608do :
11609 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11610ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011611if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011612 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011613#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011614_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000011615
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011616fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000011617done
11618
Michael W. Hudson54241132001-12-07 15:38:26 +000011619
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011620ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011621if test "x$ac_cv_func_dup2" = xyes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011622 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000011623
Martin v. Löwis1142de32002-03-29 16:28:31 +000011624else
Martin v. Löwiseba40652007-08-30 20:10:57 +000011625 case " $LIBOBJS " in
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011626 *" dup2.$ac_objext "* ) ;;
11627 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Martin v. Löwiseba40652007-08-30 20:10:57 +000011628 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011629esac
11630
Martin v. Löwis1142de32002-03-29 16:28:31 +000011631fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011632
11633ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011634if test "x$ac_cv_func_getcwd" = xyes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011635 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
11636
11637else
11638 case " $LIBOBJS " in
11639 *" getcwd.$ac_objext "* ) ;;
11640 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
11641 ;;
11642esac
11643
11644fi
11645
11646ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011647if test "x$ac_cv_func_strdup" = xyes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011648 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
11649
11650else
11651 case " $LIBOBJS " in
11652 *" strdup.$ac_objext "* ) ;;
11653 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
11654 ;;
11655esac
11656
11657fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000011658
11659
11660for ac_func in getpgrp
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011661do :
11662 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011663if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011664 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011665#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011666_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011667 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011668/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011669#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011670int
11671main ()
11672{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011673getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011674 ;
11675 return 0;
11676}
11677_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011678if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011679
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011680$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011681
Guido van Rossum627b2d71993-12-24 10:39:16 +000011682fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011683rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011684
Guido van Rossum627b2d71993-12-24 10:39:16 +000011685fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011686done
Guido van Rossum627b2d71993-12-24 10:39:16 +000011687
Jack Jansen150753c2003-03-29 22:07:47 +000011688for ac_func in setpgrp
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011689do :
11690 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011691if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000011692 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011693#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000011694_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011695 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011696/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000011697#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000011698int
11699main ()
11700{
11701setpgrp(0,0);
11702 ;
11703 return 0;
11704}
11705_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011706if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011707
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011708$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011709
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011710fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011711rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000011712
11713fi
11714done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011715
Thomas Wouters3a584202000-08-05 23:28:51 +000011716for ac_func in gettimeofday
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011717do :
11718 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011719if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011720 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011721#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011722_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011723 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011724/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011725#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011726int
11727main ()
11728{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011729gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011730 ;
11731 return 0;
11732}
11733_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011734if ac_fn_c_try_compile "$LINENO"; then :
11735
Guido van Rossum627b2d71993-12-24 10:39:16 +000011736else
Skip Montanaro6dead952003-09-25 14:50:04 +000011737
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011738$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011739
Martin v. Löwis11437992002-04-12 09:54:03 +000011740
Guido van Rossum627b2d71993-12-24 10:39:16 +000011741fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011742rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011743
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011744fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011745done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011746
Michael W. Hudson54241132001-12-07 15:38:26 +000011747
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
11749$as_echo_n "checking for major... " >&6; }
11750cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011751/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011752
Neal Norwitz6eb37f02003-02-23 23:28:15 +000011753#if defined(MAJOR_IN_MKDEV)
11754#include <sys/mkdev.h>
11755#elif defined(MAJOR_IN_SYSMACROS)
11756#include <sys/sysmacros.h>
11757#else
11758#include <sys/types.h>
11759#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011760
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011761int
11762main ()
11763{
11764
11765 makedev(major(0),minor(0));
11766
11767 ;
11768 return 0;
11769}
11770_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011771if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011772
11773
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011774$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011775
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11777$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011778
11779else
Skip Montanaro6dead952003-09-25 14:50:04 +000011780
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11782$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011783
11784fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011785rm -f core conftest.err conftest.$ac_objext \
11786 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011787
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011788# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000011789# for [no]getaddrinfo in netdb.h.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
11791$as_echo_n "checking for getaddrinfo... " >&6; }
11792cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011793/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011794
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011795#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011796#include <sys/socket.h>
11797#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011798#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011799
Martin v. Löwis11437992002-04-12 09:54:03 +000011800int
11801main ()
11802{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011803getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000011804 ;
11805 return 0;
11806}
11807_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011808if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011809 have_getaddrinfo=yes
11810else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011811 have_getaddrinfo=no
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011812fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011813rm -f core conftest.err conftest.$ac_objext \
11814 conftest$ac_exeext conftest.$ac_ext
11815{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
11816$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011817if test $have_getaddrinfo = yes
11818then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011819 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
11820$as_echo_n "checking getaddrinfo bug... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011821 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011822 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011823else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011824 if test "$cross_compiling" = yes; then :
doko@python.orgd65e2ba2013-01-31 23:52:03 +010011825
11826if test "${enable_ipv6+set}" = set; then
11827 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
11828else
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011829 ac_cv_buggy_getaddrinfo=yes
doko@python.orgd65e2ba2013-01-31 23:52:03 +010011830fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011831else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011832 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011833/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011834
Stefan Krah0afe4e42012-11-22 23:56:51 +010011835#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011836#include <sys/types.h>
11837#include <netdb.h>
11838#include <string.h>
11839#include <sys/socket.h>
11840#include <netinet/in.h>
11841
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011842int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011843{
11844 int passive, gaierr, inet4 = 0, inet6 = 0;
11845 struct addrinfo hints, *ai, *aitop;
11846 char straddr[INET6_ADDRSTRLEN], strport[16];
11847
11848 for (passive = 0; passive <= 1; passive++) {
11849 memset(&hints, 0, sizeof(hints));
11850 hints.ai_family = AF_UNSPEC;
11851 hints.ai_flags = passive ? AI_PASSIVE : 0;
11852 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000011853 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011854 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
11855 (void)gai_strerror(gaierr);
11856 goto bad;
11857 }
11858 for (ai = aitop; ai; ai = ai->ai_next) {
11859 if (ai->ai_addr == NULL ||
11860 ai->ai_addrlen == 0 ||
11861 getnameinfo(ai->ai_addr, ai->ai_addrlen,
11862 straddr, sizeof(straddr), strport, sizeof(strport),
11863 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
11864 goto bad;
11865 }
11866 switch (ai->ai_family) {
11867 case AF_INET:
11868 if (strcmp(strport, "54321") != 0) {
11869 goto bad;
11870 }
11871 if (passive) {
11872 if (strcmp(straddr, "0.0.0.0") != 0) {
11873 goto bad;
11874 }
11875 } else {
11876 if (strcmp(straddr, "127.0.0.1") != 0) {
11877 goto bad;
11878 }
11879 }
11880 inet4++;
11881 break;
11882 case AF_INET6:
11883 if (strcmp(strport, "54321") != 0) {
11884 goto bad;
11885 }
11886 if (passive) {
11887 if (strcmp(straddr, "::") != 0) {
11888 goto bad;
11889 }
11890 } else {
11891 if (strcmp(straddr, "::1") != 0) {
11892 goto bad;
11893 }
11894 }
11895 inet6++;
11896 break;
11897 case AF_UNSPEC:
11898 goto bad;
11899 break;
11900 default:
11901 /* another family support? */
11902 break;
11903 }
11904 }
Benjamin Petersond34677c2016-09-06 15:54:24 -070011905 freeaddrinfo(aitop);
11906 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011907 }
11908
11909 if (!(inet4 == 0 || inet4 == 2))
11910 goto bad;
11911 if (!(inet6 == 0 || inet6 == 2))
11912 goto bad;
11913
11914 if (aitop)
11915 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011916 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011917
11918 bad:
11919 if (aitop)
11920 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011921 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011922}
11923
Martin v. Löwis11437992002-04-12 09:54:03 +000011924_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011925if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011926 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011927else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011928 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011929fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011930rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11931 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011932fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011933
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011934fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011935
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011936fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011937
Benjamin Peterson75fed812010-11-01 01:47:19 +000011938{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
11939$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
11940
Mark Dickinson0ef0b912009-12-31 21:11:48 +000011941if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011942then
11943 if test $ipv6 = yes
11944 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011945 echo 'Fatal: You must get working getaddrinfo() function.'
11946 echo ' or you can specify "--disable-ipv6"'.
11947 exit 1
11948 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011949else
Martin v. Löwis11437992002-04-12 09:54:03 +000011950
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011951$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011952
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011953fi
Benjamin Peterson75fed812010-11-01 01:47:19 +000011954
Jack Jansen9a66b6d2001-08-08 13:56:14 +000011955for ac_func in getnameinfo
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011956do :
11957 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011958if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011959 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011960#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011961_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011962
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011963fi
11964done
11965
Michael W. Hudson54241132001-12-07 15:38:26 +000011966
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011967# checks for structures
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
11969$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011970if ${ac_cv_header_time+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011971 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011972else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011973 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011974/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011975#include <sys/types.h>
11976#include <sys/time.h>
11977#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011978
Martin v. Löwis11437992002-04-12 09:54:03 +000011979int
11980main ()
11981{
11982if ((struct tm *) 0)
11983return 0;
11984 ;
11985 return 0;
11986}
11987_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011988if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011989 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011990else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011991 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011992fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011993rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011994fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011995{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
11996$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011997if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011998
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011999$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012000
12001fi
12002
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
12004$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012005if ${ac_cv_struct_tm+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012006 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012007else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012008 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012009/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012010#include <sys/types.h>
12011#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012012
Martin v. Löwis11437992002-04-12 09:54:03 +000012013int
12014main ()
12015{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012016struct tm tm;
12017 int *p = &tm.tm_sec;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012018 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000012019 ;
12020 return 0;
12021}
12022_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012023if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012024 ac_cv_struct_tm=time.h
12025else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012026 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012027fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012028rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012029fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012030{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
12031$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012032if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012033
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012034$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012035
12036fi
12037
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012038ac_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 +000012039#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012040
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012041"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012042if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012043
12044cat >>confdefs.h <<_ACEOF
12045#define HAVE_STRUCT_TM_TM_ZONE 1
12046_ACEOF
12047
12048
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012049fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012050
Martin v. Löwis11437992002-04-12 09:54:03 +000012051if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12052
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012053$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012054
12055else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012056 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
12057"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012058if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012059 ac_have_decl=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000012060else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012061 ac_have_decl=0
Martin v. Löwiseba40652007-08-30 20:10:57 +000012062fi
12063
Martin v. Löwiseba40652007-08-30 20:10:57 +000012064cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012065#define HAVE_DECL_TZNAME $ac_have_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +000012066_ACEOF
12067
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012068 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
12069$as_echo_n "checking for tzname... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012070if ${ac_cv_var_tzname+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012071 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000012072else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012073 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012074/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012075#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000012076#if !HAVE_DECL_TZNAME
12077extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000012078#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012079
Martin v. Löwis11437992002-04-12 09:54:03 +000012080int
12081main ()
12082{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012083return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012084 ;
12085 return 0;
12086}
12087_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012088if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012089 ac_cv_var_tzname=yes
12090else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012091 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012092fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012093rm -f core conftest.err conftest.$ac_objext \
12094 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000012095fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012096{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
12097$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012098 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012099
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012100$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012101
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012102 fi
12103fi
12104
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012105ac_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 +010012106if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012107
12108cat >>confdefs.h <<_ACEOF
12109#define HAVE_STRUCT_STAT_ST_RDEV 1
12110_ACEOF
12111
12112
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012113fi
12114
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012115ac_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 +010012116if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012117
Martin v. Löwis11437992002-04-12 09:54:03 +000012118cat >>confdefs.h <<_ACEOF
12119#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
12120_ACEOF
12121
12122
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012123fi
12124
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012125ac_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 +010012126if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000012127
12128cat >>confdefs.h <<_ACEOF
12129#define HAVE_STRUCT_STAT_ST_FLAGS 1
12130_ACEOF
12131
12132
12133fi
12134
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012135ac_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 +010012136if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012137
12138cat >>confdefs.h <<_ACEOF
12139#define HAVE_STRUCT_STAT_ST_GEN 1
12140_ACEOF
12141
12142
12143fi
12144
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012145ac_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 +010012146if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012147
12148cat >>confdefs.h <<_ACEOF
12149#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
12150_ACEOF
12151
12152
12153fi
12154
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012155ac_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 +010012156if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012157
Martin v. Löwis11437992002-04-12 09:54:03 +000012158cat >>confdefs.h <<_ACEOF
12159#define HAVE_STRUCT_STAT_ST_BLOCKS 1
12160_ACEOF
12161
12162
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012163fi
12164
Michael W. Hudson54241132001-12-07 15:38:26 +000012165
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
12167$as_echo_n "checking for time.h that defines altzone... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012168if ${ac_cv_header_time_altzone+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012169 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012170else
Matthias Klosec511b472010-05-08 11:01:39 +000012171
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012172 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012173/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012174#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012175int
12176main ()
12177{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012178return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000012179 ;
12180 return 0;
12181}
12182_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012183if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012184 ac_cv_header_time_altzone=yes
12185else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012186 ac_cv_header_time_altzone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012187fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012188rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosec511b472010-05-08 11:01:39 +000012189
Martin v. Löwiseba40652007-08-30 20:10:57 +000012190fi
12191
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012192{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
12193$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012194if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012195
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012196$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012197
12198fi
12199
Guido van Rossumda88dad1995-01-26 00:46:29 +000012200was_it_defined=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
12202$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
12203cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012204/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012205
12206#include <sys/types.h>
12207#include <sys/select.h>
12208#include <sys/time.h>
12209
Martin v. Löwis11437992002-04-12 09:54:03 +000012210int
12211main ()
12212{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012213;
Martin v. Löwis11437992002-04-12 09:54:03 +000012214 ;
12215 return 0;
12216}
12217_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012218if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012219
12220
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012221$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012222
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012223 was_it_defined=yes
12224
Martin v. Löwiseba40652007-08-30 20:10:57 +000012225fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012226rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012227{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
12228$as_echo "$was_it_defined" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012229
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012230{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
12231$as_echo_n "checking for addrinfo... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012232if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012233 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012234else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012235 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012236/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +000012237#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012238int
12239main ()
12240{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012241struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000012242 ;
12243 return 0;
12244}
12245_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012246if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012247 ac_cv_struct_addrinfo=yes
12248else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012249 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012250fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012251rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12252fi
12253
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012254{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
12255$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012256if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012257
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012258$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012259
12260fi
12261
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
12263$as_echo_n "checking for sockaddr_storage... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012264if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012265 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012266else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012267 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012268/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012269
12270# include <sys/types.h>
12271# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012272int
12273main ()
12274{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012275struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000012276 ;
12277 return 0;
12278}
12279_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012280if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012281 ac_cv_struct_sockaddr_storage=yes
12282else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012283 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012284fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012285rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12286fi
12287
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012288{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
12289$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012290if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012291
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012292$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012293
12294fi
12295
Guido van Rossum627b2d71993-12-24 10:39:16 +000012296# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000012297
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
12299$as_echo_n "checking whether char is unsigned... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012300if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012301 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000012302else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012303 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012304/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012305$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012306int
12307main ()
12308{
12309static int test_array [1 - 2 * !(((char) -1) < 0)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012310test_array [0] = 0;
12311return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012312
12313 ;
12314 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000012315}
Martin v. Löwis11437992002-04-12 09:54:03 +000012316_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012317if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012318 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012319else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012320 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012321fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012322rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012323fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012324{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
12325$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012326if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012327 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012328
12329fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000012330
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12332$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012333if ${ac_cv_c_const+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012334 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012335else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012336 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012337/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012338
Martin v. Löwis11437992002-04-12 09:54:03 +000012339int
12340main ()
12341{
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012342
Martin v. Löwis11437992002-04-12 09:54:03 +000012343#ifndef __cplusplus
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012344 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012345 typedef int charset[2];
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012346 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000012347 /* SunOS 4.1.1 cc rejects this. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000012348 char const *const *pcpcc;
12349 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000012350 /* NEC SVR4.0.2 mips cc rejects this. */
12351 struct point {int x, y;};
12352 static struct point const zero = {0,0};
12353 /* AIX XL C 1.02.0.0 rejects this.
12354 It does not let you subtract one const X* pointer from another in
12355 an arm of an if-expression whose if-part is not a constant
12356 expression */
12357 const char *g = "string";
Martin v. Löwiseba40652007-08-30 20:10:57 +000012358 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012359 /* HPUX 7.0 cc rejects these. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000012360 ++pcpcc;
12361 ppc = (char**) pcpcc;
12362 pcpcc = (char const *const *) ppc;
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012363 { /* SCO 3.2v4 cc rejects this sort of thing. */
12364 char tx;
12365 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000012366 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012367
Martin v. Löwis11437992002-04-12 09:54:03 +000012368 *t++ = 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012369 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012370 }
12371 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12372 int x[] = {25, 17};
12373 const int *foo = &x[0];
12374 ++foo;
12375 }
12376 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12377 typedef const int *iptr;
12378 iptr p = 0;
12379 ++p;
12380 }
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012381 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000012382 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012383 struct s { int j; const int *ap[3]; } bx;
12384 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000012385 }
12386 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12387 const int foo = 10;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012388 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012389 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012390 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000012391#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000012392
Martin v. Löwis11437992002-04-12 09:54:03 +000012393 ;
12394 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012395}
Martin v. Löwis11437992002-04-12 09:54:03 +000012396_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012397if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012398 ac_cv_c_const=yes
12399else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012400 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012401fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012402rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012403fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012404{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12405$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012406if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012407
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012408$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012409
12410fi
12411
Michael W. Hudson54241132001-12-07 15:38:26 +000012412
Guido van Rossumda88dad1995-01-26 00:46:29 +000012413works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
12415$as_echo_n "checking for working volatile... " >&6; }
12416cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012417/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012418
Martin v. Löwis11437992002-04-12 09:54:03 +000012419int
12420main ()
12421{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012422volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012423 ;
12424 return 0;
12425}
12426_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012427if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012428 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012429else
Skip Montanaro6dead952003-09-25 14:50:04 +000012430
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012431$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012432
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012433
Guido van Rossum627b2d71993-12-24 10:39:16 +000012434fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012435rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012436{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12437$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012438
Guido van Rossumda88dad1995-01-26 00:46:29 +000012439works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
12441$as_echo_n "checking for working signed char... " >&6; }
12442cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012443/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012444
Martin v. Löwis11437992002-04-12 09:54:03 +000012445int
12446main ()
12447{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012448signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000012449 ;
12450 return 0;
12451}
12452_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012453if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012454 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012455else
Skip Montanaro6dead952003-09-25 14:50:04 +000012456
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012457$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000012458
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012459
Guido van Rossum7f43da71994-08-01 12:15:30 +000012460fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012461rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012462{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12463$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012464
Guido van Rossumda88dad1995-01-26 00:46:29 +000012465have_prototypes=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
12467$as_echo_n "checking for prototypes... " >&6; }
12468cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012469/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012470int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012471int
12472main ()
12473{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012474return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000012475 ;
12476 return 0;
12477}
12478_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012479if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012480
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012481$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012482
Matthias Klosec511b472010-05-08 11:01:39 +000012483 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012484fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012485rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012486{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
12487$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012488
Guido van Rossumda88dad1995-01-26 00:46:29 +000012489works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012490{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
12491$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
12492cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012493/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012494
12495#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000012496int foo(int x, ...) {
12497 va_list va;
12498 va_start(va, x);
12499 va_arg(va, int);
12500 va_arg(va, char *);
12501 va_arg(va, double);
12502 return 0;
12503}
Guido van Rossum7f43da71994-08-01 12:15:30 +000012504
Martin v. Löwis11437992002-04-12 09:54:03 +000012505int
12506main ()
12507{
Guido van Rossum90eea071996-08-30 20:58:57 +000012508return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000012509 ;
12510 return 0;
12511}
12512_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012513if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012514
12515
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012516$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012517
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012518 works=yes
12519
Guido van Rossum627b2d71993-12-24 10:39:16 +000012520fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012521rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012522{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12523$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012524
Martin v. Löwisd6320502004-08-12 13:45:08 +000012525# check for socketpair
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
12527$as_echo_n "checking for socketpair... " >&6; }
12528cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012529/* end confdefs.h. */
12530
12531#include <sys/types.h>
12532#include <sys/socket.h>
12533
12534int
12535main ()
12536{
12537void *x=socketpair
12538 ;
12539 return 0;
12540}
12541_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012542if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000012543
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012544$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000012545
Matthias Klosec511b472010-05-08 11:01:39 +000012546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012547$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012548else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12550$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012551
12552fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012553rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012554
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012555# check if sockaddr has sa_len member
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
12557$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
12558cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012559/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012560#include <sys/types.h>
12561#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012562int
12563main ()
12564{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012565struct sockaddr x;
12566x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012567 ;
12568 return 0;
12569}
12570_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012571if ac_fn_c_try_compile "$LINENO"; then :
12572 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12573$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012574
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012575$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012576
12577else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12579$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000012580
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012581fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012582rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012583
Guido van Rossumda88dad1995-01-26 00:46:29 +000012584va_list_is_array=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
12586$as_echo_n "checking whether va_list is an array... " >&6; }
12587cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012588/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012589
12590#ifdef HAVE_STDARG_PROTOTYPES
12591#include <stdarg.h>
12592#else
12593#include <varargs.h>
12594#endif
12595
Martin v. Löwis11437992002-04-12 09:54:03 +000012596int
12597main ()
12598{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012599va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000012600 ;
12601 return 0;
12602}
12603_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012604if ac_fn_c_try_compile "$LINENO"; then :
12605
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012606else
Skip Montanaro6dead952003-09-25 14:50:04 +000012607
Martin v. Löwis11437992002-04-12 09:54:03 +000012608
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012609$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012610
Guido van Rossumda88dad1995-01-26 00:46:29 +000012611 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012612
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012613fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012614rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012615{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
12616$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012617
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012618# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000012619
12620
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012621ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012622if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012623
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012624 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000012625
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012626 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
12627$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012628 OLD_CFLAGS=$CFLAGS
12629 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012630 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012631/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012632
12633# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012634
Martin v. Löwis11437992002-04-12 09:54:03 +000012635int
12636main ()
12637{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012638
12639 char *name;
12640 struct hostent *he, *res;
12641 char buffer[2048];
12642 int buflen = 2048;
12643 int h_errnop;
12644
12645 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012646
12647 ;
12648 return 0;
12649}
12650_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012651if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012652
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012653 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012654
Martin v. Löwis11437992002-04-12 09:54:03 +000012655
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012656$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012657
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12659$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012660
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012661else
Skip Montanaro6dead952003-09-25 14:50:04 +000012662
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12664$as_echo "no" >&6; }
12665 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
12666$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
12667 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012668/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012669
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012670# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012671
Martin v. Löwis11437992002-04-12 09:54:03 +000012672int
12673main ()
12674{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012675
12676 char *name;
12677 struct hostent *he;
Matthias Klosec511b472010-05-08 11:01:39 +000012678 char buffer[2048];
12679 int buflen = 2048;
12680 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012681
Matthias Klosec511b472010-05-08 11:01:39 +000012682 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012683
12684 ;
12685 return 0;
12686}
12687_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012688if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012689
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012690 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012691
Martin v. Löwis11437992002-04-12 09:54:03 +000012692
Matthias Klosec511b472010-05-08 11:01:39 +000012693$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012694
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12696$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012697
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012698else
Skip Montanaro6dead952003-09-25 14:50:04 +000012699
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12701$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000012702 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
12703$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
12704 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12705/* end confdefs.h. */
12706
12707# include <netdb.h>
12708
12709int
12710main ()
12711{
12712
12713 char *name;
12714 struct hostent *he;
12715 struct hostent_data data;
12716
12717 (void) gethostbyname_r(name, he, &data);
12718
12719 ;
12720 return 0;
12721}
12722_ACEOF
12723if ac_fn_c_try_compile "$LINENO"; then :
12724
12725 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
12726
12727
12728$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
12729
12730 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12731$as_echo "yes" >&6; }
12732
12733else
12734
12735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12736$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012737
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012738fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012739rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012740
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012741fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012742rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012743
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012744fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012745rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012746 CFLAGS=$OLD_CFLAGS
12747
12748else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012749
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012750 for ac_func in gethostbyname
12751do :
12752 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012753if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012754 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012755#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012756_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012757
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012758fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012759done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012760
Michael W. Hudson54241132001-12-07 15:38:26 +000012761
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012762fi
12763
Michael W. Hudson54241132001-12-07 15:38:26 +000012764
12765
12766
12767
12768
12769
Guido van Rossum627b2d71993-12-24 10:39:16 +000012770# checks for system services
12771# (none yet)
12772
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012773# Linux requires this for correct f.p. operations
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012774ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012775if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012776
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012777else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012778 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
12779$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012780if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012781 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012782else
Martin v. Löwis11437992002-04-12 09:54:03 +000012783 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012784LIBS="-lieee $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012785cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012786/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012787
Martin v. Löwiseba40652007-08-30 20:10:57 +000012788/* Override any GCC internal prototype to avoid an error.
12789 Use char because int might match the return type of a GCC
12790 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012791#ifdef __cplusplus
12792extern "C"
12793#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012794char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012795int
12796main ()
12797{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012798return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012799 ;
12800 return 0;
12801}
12802_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012803if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012804 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012805else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012806 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012807fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012808rm -f core conftest.err conftest.$ac_objext \
12809 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012810LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012811fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012812{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
12813$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012814if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012815 cat >>confdefs.h <<_ACEOF
12816#define HAVE_LIBIEEE 1
12817_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012818
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012819 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012820
Guido van Rossum627b2d71993-12-24 10:39:16 +000012821fi
12822
Michael W. Hudson54241132001-12-07 15:38:26 +000012823
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012824fi
12825
Michael W. Hudson54241132001-12-07 15:38:26 +000012826
Guido van Rossum7f253911997-05-09 02:42:48 +000012827# Check for --with-fpectl
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
12829$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012830
Martin v. Löwiseba40652007-08-30 20:10:57 +000012831# Check whether --with-fpectl was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012832if test "${with_fpectl+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000012833 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000012834if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000012835then
12836
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012837$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012838
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12840$as_echo "yes" >&6; }
12841else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12842$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012843fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000012844else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12846$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012847fi
12848
Guido van Rossum7f253911997-05-09 02:42:48 +000012849
Guido van Rossum7f43da71994-08-01 12:15:30 +000012850# check for --with-libm=...
12851
Guido van Rossum563e7081996-09-10 18:20:48 +000012852case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000012853Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012854BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000012855*) LIBM=-lm
12856esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
12858$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012859
Martin v. Löwiseba40652007-08-30 20:10:57 +000012860# Check whether --with-libm was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012861if test "${with_libm+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000012862 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000012863if test "$withval" = no
12864then LIBM=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
12866$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012867elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012868then LIBM=$withval
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
12870$as_echo "set LIBM=\"$withval\"" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012871else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012872fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012873else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
12875$as_echo "default LIBM=\"$LIBM\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012876fi
12877
Guido van Rossum7f43da71994-08-01 12:15:30 +000012878
12879# check for --with-libc=...
12880
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
12882$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012883
Martin v. Löwiseba40652007-08-30 20:10:57 +000012884# Check whether --with-libc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012885if test "${with_libc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000012886 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000012887if test "$withval" = no
12888then LIBC=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
12890$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012891elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012892then LIBC=$withval
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
12894$as_echo "set LIBC=\"$withval\"" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012895else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012896fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012897else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012898 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
12899$as_echo "default LIBC=\"$LIBC\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012900fi
12901
Guido van Rossum7f43da71994-08-01 12:15:30 +000012902
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012903# **************************************************
12904# * Check for various properties of floating point *
12905# **************************************************
Mark Dickinson265d7382008-04-21 22:32:24 +000012906
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
12908$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012909if ${ac_cv_little_endian_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012910 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012911else
12912
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012913if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012914 ac_cv_little_endian_double=no
12915else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012916 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012917/* end confdefs.h. */
12918
12919#include <string.h>
12920int main() {
12921 double x = 9006104071832581.0;
12922 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
12923 return 0;
12924 else
12925 return 1;
12926}
12927
12928_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012929if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012930 ac_cv_little_endian_double=yes
12931else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012932 ac_cv_little_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012933fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012934rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12935 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012936fi
12937
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012938fi
12939
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012940{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
12941$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012942if test "$ac_cv_little_endian_double" = yes
12943then
12944
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012945$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012946
12947fi
12948
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
12950$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012951if ${ac_cv_big_endian_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012952 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012953else
12954
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012955if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012956 ac_cv_big_endian_double=no
12957else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012958 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012959/* end confdefs.h. */
12960
12961#include <string.h>
12962int main() {
12963 double x = 9006104071832581.0;
12964 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
12965 return 0;
12966 else
12967 return 1;
12968}
12969
12970_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012971if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012972 ac_cv_big_endian_double=yes
12973else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012974 ac_cv_big_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012975fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012976rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12977 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012978fi
12979
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012980fi
12981
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012982{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
12983$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012984if test "$ac_cv_big_endian_double" = yes
12985then
12986
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012987$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012988
12989fi
12990
12991# Some ARM platforms use a mixed-endian representation for doubles.
12992# While Python doesn't currently have full support for these platforms
12993# (see e.g., issue 1762561), we can at least make sure that float <-> string
12994# conversions work.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
12996$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012997if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012998 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012999else
13000
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013001if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013002 ac_cv_mixed_endian_double=no
13003else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013004 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013005/* end confdefs.h. */
13006
13007#include <string.h>
13008int main() {
13009 double x = 9006104071832581.0;
13010 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
13011 return 0;
13012 else
13013 return 1;
13014}
13015
13016_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013017if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013018 ac_cv_mixed_endian_double=yes
13019else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013020 ac_cv_mixed_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013021fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013022rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13023 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013024fi
13025
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013026fi
13027
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013028{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
13029$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013030if test "$ac_cv_mixed_endian_double" = yes
13031then
13032
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013033$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013034
13035fi
13036
13037# The short float repr introduced in Python 3.1 requires the
13038# correctly-rounded string <-> double conversion functions from
13039# Python/dtoa.c, which in turn require that the FPU uses 53-bit
13040# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsona548dee2009-11-15 13:12:43 +000013041# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013042# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsona548dee2009-11-15 13:12:43 +000013043
13044# This inline assembler syntax may also work for suncc and icc,
13045# so we try it on all platforms.
13046
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013047{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
13048$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
13049cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013050/* end confdefs.h. */
13051
13052int
13053main ()
13054{
13055
Mark Dickinsona548dee2009-11-15 13:12:43 +000013056 unsigned short cw;
13057 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
13058 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013059
13060 ;
13061 return 0;
13062}
13063_ACEOF
Stefan Krah99e36b92015-07-03 15:30:54 +020013064if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013065 have_gcc_asm_for_x87=yes
13066else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013067 have_gcc_asm_for_x87=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013068fi
Stefan Krah99e36b92015-07-03 15:30:54 +020013069rm -f core conftest.err conftest.$ac_objext \
13070 conftest$ac_exeext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013071{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
13072$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsona548dee2009-11-15 13:12:43 +000013073if test "$have_gcc_asm_for_x87" = yes
13074then
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013075
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013076$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013077
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013078fi
Mark Dickinson7a3d8642008-04-22 00:54:27 +000013079
Mark Dickinson04b27232009-01-04 12:29:36 +000013080# Detect whether system arithmetic is subject to x87-style double
13081# rounding issues. The result of this test has little meaning on non
13082# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
13083# mode is round-to-nearest and double rounding issues are present, and
13084# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
13086$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinson99abd142009-10-24 13:44:16 +000013087# $BASECFLAGS may affect the result
13088ac_save_cc="$CC"
13089CC="$CC $BASECFLAGS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013090if test "$cross_compiling" = yes; then :
Mark Dickinson04b27232009-01-04 12:29:36 +000013091 ac_cv_x87_double_rounding=no
13092else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013093 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson04b27232009-01-04 12:29:36 +000013094/* end confdefs.h. */
13095
13096#include <stdlib.h>
13097#include <math.h>
13098int main() {
13099 volatile double x, y, z;
13100 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
13101 x = 0.99999999999999989; /* 1-2**-53 */
13102 y = 1./x;
13103 if (y != 1.)
13104 exit(0);
13105 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
13106 x = 1e16;
13107 y = 2.99999;
13108 z = x + y;
13109 if (z != 1e16+4.)
13110 exit(0);
13111 /* both tests show evidence of double rounding */
13112 exit(1);
13113}
13114
13115_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013116if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson04b27232009-01-04 12:29:36 +000013117 ac_cv_x87_double_rounding=no
13118else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013119 ac_cv_x87_double_rounding=yes
Mark Dickinson04b27232009-01-04 12:29:36 +000013120fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013121rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13122 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson04b27232009-01-04 12:29:36 +000013123fi
13124
Mark Dickinson99abd142009-10-24 13:44:16 +000013125CC="$ac_save_cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013126{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
13127$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson04b27232009-01-04 12:29:36 +000013128if test "$ac_cv_x87_double_rounding" = yes
13129then
13130
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013131$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson04b27232009-01-04 12:29:36 +000013132
13133fi
13134
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013135# ************************************
13136# * Check for mathematical functions *
13137# ************************************
13138
13139LIBS_SAVE=$LIBS
13140LIBS="$LIBS $LIBM"
13141
Mark Dickinson265d7382008-04-21 22:32:24 +000013142# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
13143# -0. on some architectures.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
13145$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013146if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013147 $as_echo_n "(cached) " >&6
Mark Dickinson265d7382008-04-21 22:32:24 +000013148else
13149
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013150if test "$cross_compiling" = yes; then :
Mark Dickinson265d7382008-04-21 22:32:24 +000013151 ac_cv_tanh_preserves_zero_sign=no
13152else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013153 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson265d7382008-04-21 22:32:24 +000013154/* end confdefs.h. */
13155
13156#include <math.h>
Mark Dickinson7a3d8642008-04-22 00:54:27 +000013157#include <stdlib.h>
Mark Dickinson265d7382008-04-21 22:32:24 +000013158int main() {
13159 /* return 0 if either negative zeros don't exist
13160 on this platform or if negative zeros exist
13161 and tanh(-0.) == -0. */
13162 if (atan2(0., -1.) == atan2(-0., -1.) ||
13163 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
13164 else exit(1);
13165}
13166
13167_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013168if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson265d7382008-04-21 22:32:24 +000013169 ac_cv_tanh_preserves_zero_sign=yes
13170else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013171 ac_cv_tanh_preserves_zero_sign=no
Mark Dickinson265d7382008-04-21 22:32:24 +000013172fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013173rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13174 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson265d7382008-04-21 22:32:24 +000013175fi
13176
Mark Dickinson265d7382008-04-21 22:32:24 +000013177fi
13178
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013179{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
13180$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Mark Dickinson265d7382008-04-21 22:32:24 +000013181if test "$ac_cv_tanh_preserves_zero_sign" = yes
13182then
13183
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013184$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Mark Dickinson265d7382008-04-21 22:32:24 +000013185
13186fi
13187
Mark Dickinson65898e02009-09-05 10:27:00 +000013188for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013189do :
13190 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13191ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013192if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinson65898e02009-09-05 10:27:00 +000013193 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013194#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Mark Dickinson65898e02009-09-05 10:27:00 +000013195_ACEOF
13196
13197fi
13198done
13199
Mark Dickinson65898e02009-09-05 10:27:00 +000013200for ac_func in hypot lgamma log1p round tgamma
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013201do :
13202 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13203ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013204if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Christian Heimes0a8143f2007-12-18 23:22:54 +000013205 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013206#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes0a8143f2007-12-18 23:22:54 +000013207_ACEOF
13208
13209fi
13210done
13211
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013212ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
13213"
Matthias Klose3cef2a92012-03-14 23:39:33 +010013214if test "x$ac_cv_have_decl_isinf" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013215 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013216else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013217 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013218fi
13219
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013220cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013221#define HAVE_DECL_ISINF $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013222_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013223ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
13224"
Matthias Klose3cef2a92012-03-14 23:39:33 +010013225if test "x$ac_cv_have_decl_isnan" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013226 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013227else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013228 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013229fi
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013230
13231cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013232#define HAVE_DECL_ISNAN $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013233_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013234ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
13235"
Matthias Klose3cef2a92012-03-14 23:39:33 +010013236if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013237 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013238else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013239 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013240fi
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013241
13242cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013243#define HAVE_DECL_ISFINITE $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013244_ACEOF
13245
13246
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000013247LIBS=$LIBS_SAVE
13248
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013249# For multiprocessing module, check that sem_open
13250# actually works. For FreeBSD versions <= 7.2,
13251# the kernel module that provides POSIX semaphores
13252# isn't loaded by default, so an attempt to call
13253# sem_open results in a 'Signal 12' error.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
13255$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013256if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013257 $as_echo_n "(cached) " >&6
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013258else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013259 if test "$cross_compiling" = yes; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013260 ac_cv_posix_semaphores_enabled=yes
13261else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013262 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013263/* end confdefs.h. */
13264
13265#include <unistd.h>
13266#include <fcntl.h>
13267#include <stdio.h>
13268#include <semaphore.h>
13269#include <sys/stat.h>
13270
13271int main(void) {
13272 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
13273 if (a == SEM_FAILED) {
13274 perror("sem_open");
13275 return 1;
13276 }
13277 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000013278 sem_unlink("/autoconf");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013279 return 0;
13280}
13281
13282_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013283if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013284 ac_cv_posix_semaphores_enabled=yes
13285else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013286 ac_cv_posix_semaphores_enabled=no
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013287fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013288rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13289 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013290fi
13291
13292
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013293fi
13294
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013295{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
13296$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013297if test $ac_cv_posix_semaphores_enabled = no
13298then
13299
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013300$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013301
13302fi
13303
13304# Multiprocessing check for broken sem_getvalue
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
13306$as_echo_n "checking for broken sem_getvalue... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013307if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013308 $as_echo_n "(cached) " >&6
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013309else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013310 if test "$cross_compiling" = yes; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013311 ac_cv_broken_sem_getvalue=yes
13312else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013313 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013314/* end confdefs.h. */
13315
13316#include <unistd.h>
13317#include <fcntl.h>
13318#include <stdio.h>
13319#include <semaphore.h>
13320#include <sys/stat.h>
13321
13322int main(void){
Mark Dickinson59dc89e2009-12-13 21:06:06 +000013323 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013324 int count;
13325 int res;
13326 if(a==SEM_FAILED){
13327 perror("sem_open");
13328 return 1;
13329
13330 }
13331 res = sem_getvalue(a, &count);
13332 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000013333 sem_unlink("/autocftw");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013334 return res==-1 ? 1 : 0;
13335}
13336
13337_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013338if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013339 ac_cv_broken_sem_getvalue=no
13340else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013341 ac_cv_broken_sem_getvalue=yes
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013342fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013343rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13344 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013345fi
13346
13347
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013348fi
13349
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013350{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
13351$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013352if test $ac_cv_broken_sem_getvalue = yes
13353then
13354
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013355$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013356
13357fi
13358
Mark Dickinsonefc82f72009-03-20 15:51:55 +000013359# determine what size digit to use for Python's longs
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
13361$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000013362# Check whether --enable-big-digits was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013363if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonefc82f72009-03-20 15:51:55 +000013364 enableval=$enable_big_digits; case $enable_big_digits in
13365yes)
13366 enable_big_digits=30 ;;
13367no)
13368 enable_big_digits=15 ;;
1336915|30)
13370 ;;
13371*)
Matthias Klose3cef2a92012-03-14 23:39:33 +010013372 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 +000013373esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013374{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
13375$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000013376
13377cat >>confdefs.h <<_ACEOF
13378#define PYLONG_BITS_IN_DIGIT $enable_big_digits
13379_ACEOF
13380
13381
13382else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13384$as_echo "no value specified" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000013385fi
13386
13387
Guido van Rossumef2255b2000-03-10 22:30:29 +000013388# check for wchar.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013389ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +010013390if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013391
13392
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013393$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013394
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013395 wchar_h="yes"
13396
Guido van Rossumef2255b2000-03-10 22:30:29 +000013397else
Martin v. Löwis11437992002-04-12 09:54:03 +000013398 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000013399
13400fi
13401
Michael W. Hudson54241132001-12-07 15:38:26 +000013402
Martin v. Löwis11437992002-04-12 09:54:03 +000013403
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013404# determine wchar_t size
13405if test "$wchar_h" = yes
13406then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013407 # The cast to long int works around a bug in the HP C Compiler
Martin v. Löwiseba40652007-08-30 20:10:57 +000013408# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13409# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13410# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013411{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
13412$as_echo_n "checking size of wchar_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013413if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013414 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013415else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013416 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
13417"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013418
Martin v. Löwis11437992002-04-12 09:54:03 +000013419else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013420 if test "$ac_cv_type_wchar_t" = yes; then
13421 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13422$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013423as_fn_error 77 "cannot compute sizeof (wchar_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +010013424See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013425 else
13426 ac_cv_sizeof_wchar_t=0
13427 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013428fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013429
Martin v. Löwis11437992002-04-12 09:54:03 +000013430fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013431{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
13432$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013433
13434
13435
Martin v. Löwis11437992002-04-12 09:54:03 +000013436cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013437#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013438_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013439
Michael W. Hudson54241132001-12-07 15:38:26 +000013440
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013441fi
13442
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
13444$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013445have_ucs4_tcl=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013446cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013447/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013448
13449#include <tcl.h>
13450#if TCL_UTF_MAX != 6
13451# error "NOT UCS4_TCL"
13452#endif
13453int
13454main ()
13455{
13456
13457 ;
13458 return 0;
13459}
13460_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013461if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013462
13463
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013464$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013465
13466 have_ucs4_tcl=yes
13467
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013468fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013469rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013470{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
13471$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013472
Skip Montanaro6dead952003-09-25 14:50:04 +000013473# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013474if test "$wchar_h" = yes
13475then
13476 # check whether wchar_t is signed or not
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013477 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
13478$as_echo_n "checking whether wchar_t is signed... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013479 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013480 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013481else
13482
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013483 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013484 ac_cv_wchar_t_signed=yes
13485else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013486 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013487/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013488
13489 #include <wchar.h>
13490 int main()
13491 {
Martin v. Löwis44fe0e42006-04-11 07:15:30 +000013492 /* Success: exit code 0 */
13493 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013494 }
13495
13496_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013497if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013498 ac_cv_wchar_t_signed=yes
13499else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013500 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013501fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013502rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13503 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013504fi
13505
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013506fi
13507
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
13509$as_echo "$ac_cv_wchar_t_signed" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013510fi
13511
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what type to use for unicode" >&5
13513$as_echo_n "checking what type to use for unicode... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013514# Check whether --enable-unicode was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013515if test "${enable_unicode+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000013516 enableval=$enable_unicode;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013517else
13518 enable_unicode=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +000013519fi
13520
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013521
13522if test $enable_unicode = yes
13523then
Martin v. Löwisfd917792001-06-27 20:22:04 +000013524 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013525 case "$have_ucs4_tcl" in
13526 yes) enable_unicode="ucs4"
13527 ;;
13528 *) enable_unicode="ucs2"
13529 ;;
13530 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013531fi
13532
Martin v. Löwis0036cba2002-04-12 09:58:45 +000013533
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013534case "$enable_unicode" in
13535ucs2) unicode_size="2"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013536 $as_echo "#define Py_UNICODE_SIZE 2" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013537
13538 ;;
13539ucs4) unicode_size="4"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013540 $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013541
13542 ;;
Martin v. Löwised11a5d2012-05-20 10:42:17 +020013543no) ;; # To allow --disable-unicode
Matthias Klose3cef2a92012-03-14 23:39:33 +010013544*) 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 +000013545esac
13546
Michael W. Hudson54241132001-12-07 15:38:26 +000013547
Martin v. Löwis11437992002-04-12 09:54:03 +000013548
13549
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013550if test "$enable_unicode" = "no"
13551then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000013552 UNICODE_OBJS=""
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not used" >&5
13554$as_echo "not used" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013555else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000013556 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000013557
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013558$as_echo "#define Py_USING_UNICODE 1" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013559
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013560
13561 # wchar_t is only usable if it maps to an unsigned type
13562 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000013563 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013564 then
13565 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013566
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013567$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013568
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013569 $as_echo "#define PY_UNICODE_TYPE wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013570
13571 elif test "$ac_cv_sizeof_short" = "$unicode_size"
13572 then
13573 PY_UNICODE_TYPE="unsigned short"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013574 $as_echo "#define PY_UNICODE_TYPE unsigned short" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013575
13576 elif test "$ac_cv_sizeof_long" = "$unicode_size"
13577 then
13578 PY_UNICODE_TYPE="unsigned long"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013579 $as_echo "#define PY_UNICODE_TYPE unsigned long" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013580
13581 else
13582 PY_UNICODE_TYPE="no type found"
13583 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013584 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PY_UNICODE_TYPE" >&5
13585$as_echo "$PY_UNICODE_TYPE" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013586fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000013587
13588# check for endianness
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013589 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13590$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013591if ${ac_cv_c_bigendian+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013592 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000013593else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013594 ac_cv_c_bigendian=unknown
13595 # See if we're dealing with a universal compiler.
13596 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13597/* end confdefs.h. */
13598#ifndef __APPLE_CC__
13599 not a universal capable compiler
13600 #endif
13601 typedef int dummy;
13602
Skip Montanaro6dead952003-09-25 14:50:04 +000013603_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013604if ac_fn_c_try_compile "$LINENO"; then :
13605
13606 # Check for potential -arch flags. It is not universal unless
13607 # there are at least two -arch flags with different values.
13608 ac_arch=
13609 ac_prev=
13610 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13611 if test -n "$ac_prev"; then
13612 case $ac_word in
13613 i?86 | x86_64 | ppc | ppc64)
13614 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13615 ac_arch=$ac_word
13616 else
13617 ac_cv_c_bigendian=universal
13618 break
13619 fi
13620 ;;
13621 esac
13622 ac_prev=
13623 elif test "x$ac_word" = "x-arch"; then
13624 ac_prev=arch
13625 fi
13626 done
13627fi
13628rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13629 if test $ac_cv_c_bigendian = unknown; then
13630 # See if sys/param.h defines the BYTE_ORDER macro.
13631 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013632/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013633#include <sys/types.h>
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013634 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013635
Martin v. Löwis11437992002-04-12 09:54:03 +000013636int
13637main ()
13638{
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013639#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13640 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13641 && LITTLE_ENDIAN)
13642 bogus endian macros
13643 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013644
13645 ;
13646 return 0;
13647}
13648_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013649if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013650 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013651 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013652/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013653#include <sys/types.h>
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013654 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013655
Martin v. Löwis11437992002-04-12 09:54:03 +000013656int
13657main ()
13658{
Guido van Rossumef2255b2000-03-10 22:30:29 +000013659#if BYTE_ORDER != BIG_ENDIAN
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013660 not big endian
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 ac_cv_c_bigendian=yes
13669else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013670 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000013671fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013672rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013673fi
13674rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13675 fi
13676 if test $ac_cv_c_bigendian = unknown; then
13677 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13678 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013679/* end confdefs.h. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013680#include <limits.h>
13681
Martin v. Löwis11437992002-04-12 09:54:03 +000013682int
13683main ()
13684{
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013685#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13686 bogus endian macros
13687 #endif
13688
Martin v. Löwis11437992002-04-12 09:54:03 +000013689 ;
13690 return 0;
13691}
13692_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013693if ac_fn_c_try_compile "$LINENO"; then :
13694 # It does; now see whether it defined to _BIG_ENDIAN or not.
13695 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13696/* end confdefs.h. */
13697#include <limits.h>
13698
13699int
13700main ()
13701{
13702#ifndef _BIG_ENDIAN
13703 not big endian
13704 #endif
13705
13706 ;
13707 return 0;
13708}
13709_ACEOF
13710if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013711 ac_cv_c_bigendian=yes
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000013712else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013713 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013714fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013715rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13716fi
13717rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13718 fi
13719 if test $ac_cv_c_bigendian = unknown; then
13720 # Compile a test program.
13721 if test "$cross_compiling" = yes; then :
13722 # Try to guess by grepping values from an object file.
13723 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13724/* end confdefs.h. */
13725short int ascii_mm[] =
13726 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13727 short int ascii_ii[] =
13728 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13729 int use_ascii (int i) {
13730 return ascii_mm[i] + ascii_ii[i];
13731 }
13732 short int ebcdic_ii[] =
13733 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13734 short int ebcdic_mm[] =
13735 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13736 int use_ebcdic (int i) {
13737 return ebcdic_mm[i] + ebcdic_ii[i];
13738 }
13739 extern int foo;
Martin v. Löwiseba40652007-08-30 20:10:57 +000013740
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013741int
13742main ()
13743{
13744return use_ascii (foo) == use_ebcdic (foo);
13745 ;
13746 return 0;
13747}
13748_ACEOF
13749if ac_fn_c_try_compile "$LINENO"; then :
13750 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
13751 ac_cv_c_bigendian=yes
13752 fi
13753 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
13754 if test "$ac_cv_c_bigendian" = unknown; then
13755 ac_cv_c_bigendian=no
13756 else
13757 # finding both strings is unlikely to happen, but who knows?
13758 ac_cv_c_bigendian=unknown
13759 fi
13760 fi
13761fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013762rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013763else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013764 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013765/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000013766$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013767int
13768main ()
13769{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013770
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013771 /* Are we little or big endian? From Harbison&Steele. */
13772 union
13773 {
13774 long int l;
13775 char c[sizeof (long int)];
13776 } u;
13777 u.l = 1;
13778 return u.c[sizeof (long int) - 1] == 1;
Martin v. Löwiseba40652007-08-30 20:10:57 +000013779
13780 ;
13781 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000013782}
Martin v. Löwis11437992002-04-12 09:54:03 +000013783_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013784if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013785 ac_cv_c_bigendian=no
13786else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013787 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000013788fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013789rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13790 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000013791fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013792
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013793 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013794fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013795{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
13796$as_echo "$ac_cv_c_bigendian" >&6; }
13797 case $ac_cv_c_bigendian in #(
13798 yes)
13799 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
13800;; #(
13801 no)
13802 ;; #(
13803 universal)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013804
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013805$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000013806
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013807 ;; #(
13808 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013809 as_fn_error $? "unknown endianness
Matthias Klose3cef2a92012-03-14 23:39:33 +010013810 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013811 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000013812
Michael W. Hudson54241132001-12-07 15:38:26 +000013813
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013814# Check whether right shifting a negative integer extends the sign bit
13815# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
13817$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013818if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013819 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000013820else
Martin v. Löwis11437992002-04-12 09:54:03 +000013821
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013822if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013823 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013824else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013825 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013826/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013827
13828int main()
13829{
Vladimir Marangozova6180282000-07-12 05:05:06 +000013830 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013831}
13832
Martin v. Löwis11437992002-04-12 09:54:03 +000013833_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013834if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000013835 ac_cv_rshift_extends_sign=yes
13836else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013837 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000013838fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013839rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13840 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000013841fi
13842
Martin v. Löwiseba40652007-08-30 20:10:57 +000013843fi
13844
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013845{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
13846$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000013847if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013848then
Martin v. Löwis11437992002-04-12 09:54:03 +000013849
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013850$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013851
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013852fi
13853
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013854# check for getc_unlocked and related locking functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013855{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
13856$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013857if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013858 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013859else
Martin v. Löwis11437992002-04-12 09:54:03 +000013860
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013861cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013862/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013863#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013864int
13865main ()
13866{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013867
13868 FILE *f = fopen("/dev/null", "r");
13869 flockfile(f);
13870 getc_unlocked(f);
13871 funlockfile(f);
13872
Martin v. Löwis11437992002-04-12 09:54:03 +000013873 ;
13874 return 0;
13875}
13876_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013877if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013878 ac_cv_have_getc_unlocked=yes
13879else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013880 ac_cv_have_getc_unlocked=no
13881fi
13882rm -f core conftest.err conftest.$ac_objext \
13883 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013884fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013885
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013886{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
13887$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013888if test "$ac_cv_have_getc_unlocked" = yes
13889then
Martin v. Löwis11437992002-04-12 09:54:03 +000013890
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013891$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013892
13893fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013894
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013895# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000013896# save the value of LIBS so we don't actually link Python with readline
13897LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013898
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013899# On some systems we need to link readline to a termcap compatible
13900# library. NOTE: Keep the precedence of listed libraries synchronised
13901# with setup.py.
13902py_cv_lib_readline=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
13904$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013905for py_libtermcap in "" ncursesw ncurses curses termcap; do
13906 if test -z "$py_libtermcap"; then
13907 READLINE_LIBS="-lreadline"
13908 else
13909 READLINE_LIBS="-lreadline -l$py_libtermcap"
13910 fi
13911 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013912 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013913/* end confdefs.h. */
13914
Martin v. Löwiseba40652007-08-30 20:10:57 +000013915/* Override any GCC internal prototype to avoid an error.
13916 Use char because int might match the return type of a GCC
13917 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013918#ifdef __cplusplus
13919extern "C"
13920#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013921char readline ();
13922int
13923main ()
13924{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013925return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013926 ;
13927 return 0;
13928}
13929_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013930if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013931 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013932fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013933rm -f core conftest.err conftest.$ac_objext \
13934 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013935 if test $py_cv_lib_readline = yes; then
13936 break
13937 fi
13938done
13939# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
13940#AC_SUBST([READLINE_LIBS])
Gregory P. Smithe080cdf2008-09-07 19:19:04 +000013941if test $py_cv_lib_readline = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
13943$as_echo "none" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013944else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013945 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
13946$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013947
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013948$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013949
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013950fi
13951
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013952# check for readline 2.1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013953{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
13954$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013955if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013956 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013957else
13958 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013959LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013960cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013961/* end confdefs.h. */
13962
Martin v. Löwiseba40652007-08-30 20:10:57 +000013963/* Override any GCC internal prototype to avoid an error.
13964 Use char because int might match the return type of a GCC
13965 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013966#ifdef __cplusplus
13967extern "C"
13968#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013969char rl_callback_handler_install ();
13970int
13971main ()
13972{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013973return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013974 ;
13975 return 0;
13976}
13977_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013978if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013979 ac_cv_lib_readline_rl_callback_handler_install=yes
13980else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013981 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013982fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013983rm -f core conftest.err conftest.$ac_objext \
13984 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013985LIBS=$ac_check_lib_save_LIBS
13986fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013987{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
13988$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013989if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013990
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013991$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013992
13993fi
13994
13995
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013996# check for readline 2.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013997cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013998/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013999#include <readline/readline.h>
14000_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014001if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014002 have_readline=yes
14003else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014004 have_readline=no
Matthias Klosec511b472010-05-08 11:01:39 +000014005
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014006fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014007rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014008if test $have_readline = yes
14009then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014010 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014011/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014012#include <readline/readline.h>
14013
14014_ACEOF
14015if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014016 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014017
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014018$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014019
14020fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000014021rm -f conftest*
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000014022
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014023 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000014024/* end confdefs.h. */
14025#include <readline/readline.h>
14026
14027_ACEOF
14028if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014029 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000014030
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014031$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000014032
14033fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000014034rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014035
14036fi
14037
Martin v. Löwis0daad592001-09-30 21:09:59 +000014038# check for readline 4.0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
14040$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014041if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014042 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000014043else
Martin v. Löwis11437992002-04-12 09:54:03 +000014044 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000014045LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014046cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014047/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014048
Martin v. Löwiseba40652007-08-30 20:10:57 +000014049/* Override any GCC internal prototype to avoid an error.
14050 Use char because int might match the return type of a GCC
14051 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014052#ifdef __cplusplus
14053extern "C"
14054#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014055char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014056int
14057main ()
14058{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014059return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014060 ;
14061 return 0;
14062}
14063_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014064if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014065 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000014066else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014067 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000014068fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014069rm -f core conftest.err conftest.$ac_objext \
14070 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014071LIBS=$ac_check_lib_save_LIBS
14072fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014073{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
14074$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014075if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014076
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014077$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000014078
Martin v. Löwis0daad592001-09-30 21:09:59 +000014079fi
14080
Michael W. Hudson54241132001-12-07 15:38:26 +000014081
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000014082# also in 4.0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
14084$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014085if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014086 $as_echo_n "(cached) " >&6
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000014087else
14088 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000014089LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014090cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000014091/* end confdefs.h. */
14092
14093/* Override any GCC internal prototype to avoid an error.
14094 Use char because int might match the return type of a GCC
14095 builtin and then its argument prototype would still apply. */
14096#ifdef __cplusplus
14097extern "C"
14098#endif
14099char rl_completion_display_matches_hook ();
14100int
14101main ()
14102{
14103return rl_completion_display_matches_hook ();
14104 ;
14105 return 0;
14106}
14107_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014108if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000014109 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
14110else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014111 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000014112fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014113rm -f core conftest.err conftest.$ac_objext \
14114 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000014115LIBS=$ac_check_lib_save_LIBS
14116fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014117{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
14118$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014119if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000014120
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014121$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000014122
14123fi
14124
14125
Martin Pantera70c3232016-04-03 02:54:58 +000014126# also in 4.0, but not in editline
14127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
14128$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
14129if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
14130 $as_echo_n "(cached) " >&6
14131else
14132 ac_check_lib_save_LIBS=$LIBS
14133LIBS="-lreadline $READLINE_LIBS $LIBS"
14134cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14135/* end confdefs.h. */
14136
14137/* Override any GCC internal prototype to avoid an error.
14138 Use char because int might match the return type of a GCC
14139 builtin and then its argument prototype would still apply. */
14140#ifdef __cplusplus
14141extern "C"
14142#endif
14143char rl_resize_terminal ();
14144int
14145main ()
14146{
14147return rl_resize_terminal ();
14148 ;
14149 return 0;
14150}
14151_ACEOF
14152if ac_fn_c_try_link "$LINENO"; then :
14153 ac_cv_lib_readline_rl_resize_terminal=yes
14154else
14155 ac_cv_lib_readline_rl_resize_terminal=no
14156fi
14157rm -f core conftest.err conftest.$ac_objext \
14158 conftest$ac_exeext conftest.$ac_ext
14159LIBS=$ac_check_lib_save_LIBS
14160fi
14161{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
14162$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
14163if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
14164
14165$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
14166
14167fi
14168
14169
Martin v. Löwis0daad592001-09-30 21:09:59 +000014170# check for readline 4.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
14172$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014173if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014174 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000014175else
Martin v. Löwis11437992002-04-12 09:54:03 +000014176 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000014177LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014178cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014179/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014180
Martin v. Löwiseba40652007-08-30 20:10:57 +000014181/* Override any GCC internal prototype to avoid an error.
14182 Use char because int might match the return type of a GCC
14183 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014184#ifdef __cplusplus
14185extern "C"
14186#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014187char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014188int
14189main ()
14190{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014191return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014192 ;
14193 return 0;
14194}
14195_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014196if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014197 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000014198else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014199 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000014200fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014201rm -f core conftest.err conftest.$ac_objext \
14202 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014203LIBS=$ac_check_lib_save_LIBS
14204fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014205{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
14206$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014207if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014208
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014209$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000014210
Guido van Rossum353ae582001-07-10 16:45:32 +000014211fi
14212
Jack Jansendd19cf82001-12-06 22:36:17 +000014213
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014214# also in readline 4.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014215cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014216/* end confdefs.h. */
14217#include <readline/readline.h>
14218_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014219if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014220 have_readline=yes
14221else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014222 have_readline=no
Matthias Klosec511b472010-05-08 11:01:39 +000014223
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014224fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014225rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014226if test $have_readline = yes
14227then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014228 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014229/* end confdefs.h. */
14230#include <readline/readline.h>
14231
14232_ACEOF
14233if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014234 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014235
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014236$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014237
14238fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000014239rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014240
14241fi
14242
Martin v. Löwis82bca632006-02-10 20:49:30 +000014243# End of readline checks: restore LIBS
14244LIBS=$LIBS_no_readline
14245
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
14247$as_echo_n "checking for broken nice()... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014248if ${ac_cv_broken_nice+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014249 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014250else
Martin v. Löwis11437992002-04-12 09:54:03 +000014251
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014252if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014253 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014254else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014255 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014256/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014257
14258int main()
14259{
14260 int val1 = nice(1);
14261 if (val1 != -1 && val1 == nice(2))
14262 exit(0);
14263 exit(1);
14264}
14265
Martin v. Löwis11437992002-04-12 09:54:03 +000014266_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014267if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014268 ac_cv_broken_nice=yes
14269else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014270 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014271fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014272rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14273 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014274fi
14275
Martin v. Löwiseba40652007-08-30 20:10:57 +000014276fi
14277
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014278{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
14279$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014280if test "$ac_cv_broken_nice" = yes
14281then
Martin v. Löwis11437992002-04-12 09:54:03 +000014282
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014283$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014284
14285fi
14286
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014287{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
14288$as_echo_n "checking for broken poll()... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014289if ${ac_cv_broken_poll+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014290 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014291else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014292 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014293 ac_cv_broken_poll=no
14294else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014295 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014296/* end confdefs.h. */
14297
14298#include <poll.h>
14299
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014300int main()
14301{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014302 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014303 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014304
14305 close (42);
14306
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014307 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014308 if (poll_test < 0)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014309 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014310 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014311 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014312 else
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014313 return 1;
14314}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014315
14316_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014317if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014318 ac_cv_broken_poll=yes
14319else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014320 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014321fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014322rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14323 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014324fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014325
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014326fi
14327
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014328{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
14329$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014330if test "$ac_cv_broken_poll" = yes
14331then
14332
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014333$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014334
14335fi
14336
Brett Cannon43802422005-02-10 20:48:03 +000014337# 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 +000014338# (which is not required by ISO C or UNIX spec) and/or if we support
14339# tzname[]
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014340ac_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 +000014341#include <$ac_cv_struct_tm>
14342
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014343"
Matthias Klose3cef2a92012-03-14 23:39:33 +010014344if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000014345
14346cat >>confdefs.h <<_ACEOF
14347#define HAVE_STRUCT_TM_TM_ZONE 1
14348_ACEOF
14349
14350
14351fi
14352
14353if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
14354
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014355$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014356
14357else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014358 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
14359"
Matthias Klose3cef2a92012-03-14 23:39:33 +010014360if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014361 ac_have_decl=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000014362else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014363 ac_have_decl=0
Martin v. Löwiseba40652007-08-30 20:10:57 +000014364fi
14365
Martin v. Löwiseba40652007-08-30 20:10:57 +000014366cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014367#define HAVE_DECL_TZNAME $ac_have_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +000014368_ACEOF
14369
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014370 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
14371$as_echo_n "checking for tzname... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014372if ${ac_cv_var_tzname+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014373 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000014374else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014375 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014376/* end confdefs.h. */
14377#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000014378#if !HAVE_DECL_TZNAME
14379extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000014380#endif
14381
14382int
14383main ()
14384{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014385return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000014386 ;
14387 return 0;
14388}
14389_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014390if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000014391 ac_cv_var_tzname=yes
14392else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014393 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000014394fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014395rm -f core conftest.err conftest.$ac_objext \
14396 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014397fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014398{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
14399$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000014400 if test $ac_cv_var_tzname = yes; then
14401
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014402$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014403
14404 fi
14405fi
14406
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014407
Martin v. Löwis1d459062005-03-14 21:23:33 +000014408# check tzset(3) exists and works like we expect it to
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
14410$as_echo_n "checking for working tzset()... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014411if ${ac_cv_working_tzset+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014412 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014413else
14414
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014415if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014416 ac_cv_working_tzset=no
14417else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014418 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014419/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014420
14421#include <stdlib.h>
14422#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000014423#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000014424
14425#if HAVE_TZNAME
14426extern char *tzname[];
14427#endif
14428
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014429int main()
14430{
Brett Cannon18367812003-09-19 00:59:16 +000014431 /* Note that we need to ensure that not only does tzset(3)
14432 do 'something' with localtime, but it works as documented
14433 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000014434 This includes making sure that tzname is set properly if
14435 tm->tm_zone does not exist since it is the alternative way
14436 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000014437
14438 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000014439 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000014440 */
14441
Martin v. Löwis1d459062005-03-14 21:23:33 +000014442 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000014443 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
14444
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014445 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014446 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014447 if (localtime(&groundhogday)->tm_hour != 0)
14448 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014449#if HAVE_TZNAME
14450 /* For UTC, tzname[1] is sometimes "", sometimes " " */
14451 if (strcmp(tzname[0], "UTC") ||
14452 (tzname[1][0] != 0 && tzname[1][0] != ' '))
14453 exit(1);
14454#endif
Brett Cannon18367812003-09-19 00:59:16 +000014455
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014456 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014457 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014458 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014459 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014460#if HAVE_TZNAME
14461 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
14462 exit(1);
14463#endif
Brett Cannon18367812003-09-19 00:59:16 +000014464
14465 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
14466 tzset();
14467 if (localtime(&groundhogday)->tm_hour != 11)
14468 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014469#if HAVE_TZNAME
14470 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
14471 exit(1);
14472#endif
14473
14474#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000014475 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
14476 exit(1);
14477 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
14478 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014479#endif
Brett Cannon18367812003-09-19 00:59:16 +000014480
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014481 exit(0);
14482}
14483
14484_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014485if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014486 ac_cv_working_tzset=yes
14487else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014488 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014489fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014490rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14491 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014492fi
14493
Martin v. Löwiseba40652007-08-30 20:10:57 +000014494fi
14495
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014496{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
14497$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014498if test "$ac_cv_working_tzset" = yes
14499then
14500
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014501$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014502
14503fi
14504
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014505# Look for subsecond timestamps in struct stat
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
14507$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014508if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014509 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014510else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014511 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014512/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014513#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014514int
14515main ()
14516{
14517
14518struct stat st;
14519st.st_mtim.tv_nsec = 1;
14520
14521 ;
14522 return 0;
14523}
14524_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014525if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000014526 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014527else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014528 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014529fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014530rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14531fi
14532
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014533{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
14534$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014535if test "$ac_cv_stat_tv_nsec" = yes
14536then
14537
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014538$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014539
14540fi
14541
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014542# Look for BSD style subsecond timestamps in struct stat
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
14544$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014545if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014546 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014547else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014548 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014549/* end confdefs.h. */
14550#include <sys/stat.h>
14551int
14552main ()
14553{
14554
14555struct stat st;
14556st.st_mtimespec.tv_nsec = 1;
14557
14558 ;
14559 return 0;
14560}
14561_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014562if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014563 ac_cv_stat_tv_nsec2=yes
14564else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014565 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014566fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014567rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14568fi
14569
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014570{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
14571$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014572if test "$ac_cv_stat_tv_nsec2" = yes
14573then
14574
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014575$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014576
14577fi
14578
doko@ubuntu.comf27ec3e2014-04-17 20:11:19 +020014579# first curses configure check
14580ac_save_cppflags="$CPPFLAGS"
14581CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
14582
14583for ac_header in curses.h ncurses.h
14584do :
14585 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14586ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
14587if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
14588 cat >>confdefs.h <<_ACEOF
14589#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14590_ACEOF
14591
14592fi
14593
14594done
14595
14596
14597# On Solaris, term.h requires curses.h
14598for ac_header in term.h
14599do :
14600 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
14601#ifdef HAVE_CURSES_H
14602#include <curses.h>
14603#endif
14604
14605"
14606if test "x$ac_cv_header_term_h" = xyes; then :
14607 cat >>confdefs.h <<_ACEOF
14608#define HAVE_TERM_H 1
14609_ACEOF
14610
14611fi
14612
14613done
14614
14615
Jack Jansen666b1e72001-10-31 12:11:48 +000014616# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
14618$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014619if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014620 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014621else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014622 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014623/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014624#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014625int
14626main ()
14627{
Jack Jansen666b1e72001-10-31 12:11:48 +000014628
14629 int rtn;
14630 rtn = mvwdelch(0,0,0);
14631
Martin v. Löwis11437992002-04-12 09:54:03 +000014632 ;
14633 return 0;
14634}
14635_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014636if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014637 ac_cv_mvwdelch_is_expression=yes
14638else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014639 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014640fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014641rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14642fi
14643
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014644{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
14645$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000014646
14647if test "$ac_cv_mvwdelch_is_expression" = yes
14648then
Martin v. Löwis11437992002-04-12 09:54:03 +000014649
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014650$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014651
14652fi
14653
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
14655$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014656if ${ac_cv_window_has_flags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014657 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014658else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014659 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014660/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014661#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014662int
14663main ()
14664{
Jack Jansen666b1e72001-10-31 12:11:48 +000014665
14666 WINDOW *w;
14667 w->_flags = 0;
14668
Martin v. Löwis11437992002-04-12 09:54:03 +000014669 ;
14670 return 0;
14671}
14672_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014673if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014674 ac_cv_window_has_flags=yes
14675else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014676 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014677fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014678rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14679fi
14680
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014681{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
14682$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000014683
Jack Jansen666b1e72001-10-31 12:11:48 +000014684
14685if test "$ac_cv_window_has_flags" = yes
14686then
Martin v. Löwis11437992002-04-12 09:54:03 +000014687
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014688$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014689
14690fi
14691
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
14693$as_echo_n "checking for is_term_resized... " >&6; }
14694cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000014695/* end confdefs.h. */
14696#include <curses.h>
14697int
14698main ()
14699{
14700void *x=is_term_resized
14701 ;
14702 return 0;
14703}
14704_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014705if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000014706
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014707$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000014708
Matthias Klosec511b472010-05-08 11:01:39 +000014709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014710$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014711else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14713$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014714
14715fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014716rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14717
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
14719$as_echo_n "checking for resize_term... " >&6; }
14720cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000014721/* end confdefs.h. */
14722#include <curses.h>
14723int
14724main ()
14725{
14726void *x=resize_term
14727 ;
14728 return 0;
14729}
14730_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014731if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000014732
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014733$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000014734
Matthias Klosec511b472010-05-08 11:01:39 +000014735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014736$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014737else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14739$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014740
14741fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014742rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14743
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
14745$as_echo_n "checking for resizeterm... " >&6; }
14746cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000014747/* end confdefs.h. */
14748#include <curses.h>
14749int
14750main ()
14751{
14752void *x=resizeterm
14753 ;
14754 return 0;
14755}
14756_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014757if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000014758
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014759$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000014760
Matthias Klosec511b472010-05-08 11:01:39 +000014761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014762$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014763else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14765$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014766
14767fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014768rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.comf27ec3e2014-04-17 20:11:19 +020014769# last curses configure check
14770CPPFLAGS=$ac_save_cppflags
Martin v. Löwiseba40652007-08-30 20:10:57 +000014771
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
14773$as_echo "$as_me: checking for device files" >&6;}
14774
14775if test "x$cross_compiling" = xyes; then
14776 if test "${ac_cv_file__dev_ptmx+set}" != set; then
14777 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14778$as_echo_n "checking for /dev/ptmx... " >&6; }
14779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14780$as_echo "not set" >&6; }
14781 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14782 fi
14783 if test "${ac_cv_file__dev_ptc+set}" != set; then
14784 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14785$as_echo_n "checking for /dev/ptc... " >&6; }
14786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14787$as_echo "not set" >&6; }
14788 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14789 fi
14790fi
14791
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14793$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014794if ${ac_cv_file__dev_ptmx+:} false; then :
14795 $as_echo_n "(cached) " >&6
14796else
14797 test "$cross_compiling" = yes &&
14798 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14799if test -r "/dev/ptmx"; then
14800 ac_cv_file__dev_ptmx=yes
14801else
14802 ac_cv_file__dev_ptmx=no
14803fi
14804fi
14805{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
14806$as_echo "$ac_cv_file__dev_ptmx" >&6; }
14807if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Martin v. Löwisfefbc202006-10-17 18:59:23 +000014808
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014809fi
14810
14811if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014812
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014813$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014814
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014815fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14817$as_echo_n "checking for /dev/ptc... " >&6; }
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014818if ${ac_cv_file__dev_ptc+:} false; then :
14819 $as_echo_n "(cached) " >&6
14820else
14821 test "$cross_compiling" = yes &&
14822 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14823if test -r "/dev/ptc"; then
14824 ac_cv_file__dev_ptc=yes
14825else
14826 ac_cv_file__dev_ptc=no
14827fi
14828fi
14829{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
14830$as_echo "$ac_cv_file__dev_ptc" >&6; }
14831if test "x$ac_cv_file__dev_ptc" = xyes; then :
Martin v. Löwisfefbc202006-10-17 18:59:23 +000014832
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014833fi
14834
14835if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000014836
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014837$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000014838
Neal Norwitz865400f2003-03-21 01:42:58 +000014839fi
14840
Mark Dickinson82864d12009-11-15 16:18:58 +000014841if test "$have_long_long" = yes
14842then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014843 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
14844$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014845 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014846 $as_echo_n "(cached) " >&6
Mark Dickinson82864d12009-11-15 16:18:58 +000014847else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014848 if test "$cross_compiling" = yes; then :
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014849 ac_cv_have_long_long_format="cross -- assuming no"
14850 if test x$GCC = xyes; then
14851 save_CFLAGS=$CFLAGS
14852 CFLAGS="$CFLAGS -Werror -Wformat"
14853 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14854/* end confdefs.h. */
14855
14856 #include <stdio.h>
14857 #include <stddef.h>
14858
14859int
14860main ()
14861{
14862
14863 char *buffer;
14864 sprintf(buffer, "%lld", (long long)123);
14865 sprintf(buffer, "%lld", (long long)-123);
14866 sprintf(buffer, "%llu", (unsigned long long)123);
14867
14868 ;
14869 return 0;
14870}
14871_ACEOF
14872if ac_fn_c_try_compile "$LINENO"; then :
14873 ac_cv_have_long_long_format=yes
14874
14875fi
14876rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14877 CFLAGS=$save_CFLAGS
14878 fi
Mark Dickinson82864d12009-11-15 16:18:58 +000014879else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson82864d12009-11-15 16:18:58 +000014881/* end confdefs.h. */
14882
14883 #include <stdio.h>
14884 #include <stddef.h>
14885 #include <string.h>
14886
14887 #ifdef HAVE_SYS_TYPES_H
14888 #include <sys/types.h>
14889 #endif
14890
14891 int main()
14892 {
14893 char buffer[256];
14894
14895 if (sprintf(buffer, "%lld", (long long)123) < 0)
14896 return 1;
14897 if (strcmp(buffer, "123"))
14898 return 1;
14899
14900 if (sprintf(buffer, "%lld", (long long)-123) < 0)
14901 return 1;
14902 if (strcmp(buffer, "-123"))
14903 return 1;
14904
14905 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
14906 return 1;
14907 if (strcmp(buffer, "123"))
14908 return 1;
14909
14910 return 0;
14911 }
14912
14913_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014914if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson82864d12009-11-15 16:18:58 +000014915 ac_cv_have_long_long_format=yes
14916else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014917 ac_cv_have_long_long_format=no
Mark Dickinson82864d12009-11-15 16:18:58 +000014918fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014919rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14920 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson82864d12009-11-15 16:18:58 +000014921fi
14922
14923
Mark Dickinson82864d12009-11-15 16:18:58 +000014924fi
14925
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
14927$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson82864d12009-11-15 16:18:58 +000014928fi
14929
Mark Dickinson5ce84742009-12-31 20:48:04 +000014930if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson82864d12009-11-15 16:18:58 +000014931then
14932
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014933$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson82864d12009-11-15 16:18:58 +000014934
14935fi
14936
Ronald Oussoren315cd0c2009-11-19 16:25:21 +000014937if test $ac_sys_system = Darwin
14938then
14939 LIBS="$LIBS -framework CoreFoundation"
14940fi
14941
Mark Dickinson82864d12009-11-15 16:18:58 +000014942
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
14944$as_echo_n "checking for %zd printf() format support... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014945if ${ac_cv_have_size_t_format+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014946 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014947else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014948 if test "$cross_compiling" = yes; then :
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000014949 ac_cv_have_size_t_format="cross -- assuming yes"
14950
Brett Cannon09d12362006-05-11 05:11:33 +000014951else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014952 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon09d12362006-05-11 05:11:33 +000014953/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014954
Brett Cannon09d12362006-05-11 05:11:33 +000014955#include <stdio.h>
14956#include <stddef.h>
14957#include <string.h>
14958
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000014959#ifdef HAVE_SYS_TYPES_H
14960#include <sys/types.h>
14961#endif
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000014962
14963#ifdef HAVE_SSIZE_T
14964typedef ssize_t Py_ssize_t;
14965#elif SIZEOF_VOID_P == SIZEOF_LONG
14966typedef long Py_ssize_t;
14967#else
14968typedef int Py_ssize_t;
14969#endif
Brett Cannon09d12362006-05-11 05:11:33 +000014970
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000014971int main()
14972{
14973 char buffer[256];
14974
Brett Cannon09d12362006-05-11 05:11:33 +000014975 if(sprintf(buffer, "%zd", (size_t)123) < 0)
14976 return 1;
14977
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000014978 if (strcmp(buffer, "123"))
14979 return 1;
14980
14981 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
14982 return 1;
14983
14984 if (strcmp(buffer, "-123"))
Brett Cannon09d12362006-05-11 05:11:33 +000014985 return 1;
14986
14987 return 0;
14988}
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014989
Brett Cannon09d12362006-05-11 05:11:33 +000014990_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014991if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014992 ac_cv_have_size_t_format=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014993else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014994 ac_cv_have_size_t_format=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014995fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014996rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14997 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000014998fi
14999
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000015000fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015001{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
15002$as_echo "$ac_cv_have_size_t_format" >&6; }
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000015003if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000015004
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015005$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000015006
15007fi
15008
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015009ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000015010#ifdef HAVE_SYS_TYPES_H
15011#include <sys/types.h>
15012#endif
15013#ifdef HAVE_SYS_SOCKET_H
15014#include <sys/socket.h>
15015#endif
15016
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015017"
Matthias Klose3cef2a92012-03-14 23:39:33 +010015018if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000015019
Martin v. Löwis11437992002-04-12 09:54:03 +000015020else
Guido van Rossum95713eb2000-05-18 20:53:31 +000015021
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015022$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000015023
15024fi
15025
Michael W. Hudson54241132001-12-07 15:38:26 +000015026
Benjamin Peterson7497e912010-10-16 00:53:39 +000015027case $ac_sys_system in
15028AIX*)
15029
15030$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
15031 ;;
15032esac
15033
15034
Michael W. Hudson54241132001-12-07 15:38:26 +000015035
15036
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000015037for h in `(cd $srcdir;echo Python/thread_*.h)`
15038do
15039 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
15040done
15041
Michael W. Hudson54241132001-12-07 15:38:26 +000015042
Neal Norwitzd24499d2005-12-18 21:36:39 +000015043SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
15045$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015046for dir in $SRCDIRS; do
15047 if test ! -d $dir; then
15048 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000015049 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015050done
Benjamin Peterson2c992a02015-05-28 12:45:31 -050015051
15052# BEGIN_COMPUTED_GOTO
15053# Check for --with-computed-gotos
15054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
15055$as_echo_n "checking for --with-computed-gotos... " >&6; }
15056
15057# Check whether --with-computed-gotos was given.
15058if test "${with_computed_gotos+set}" = set; then :
15059 withval=$with_computed_gotos;
15060if test "$withval" = yes
15061then
15062
15063$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
15064
15065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15066$as_echo "yes" >&6; }
15067fi
15068if test "$withval" = no
15069then
15070
15071$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
15072
15073 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15074$as_echo "no" >&6; }
15075fi
15076
15077else
15078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
15079$as_echo "no value specified" >&6; }
15080fi
15081
15082
15083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
15084$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
15085if ${ac_cv_computed_gotos+:} false; then :
15086 $as_echo_n "(cached) " >&6
15087else
15088 if test "$cross_compiling" = yes; then :
15089 if test "${with_computed_gotos+set}" = set; then
15090 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
15091 else
15092 ac_cv_computed_gotos=no
15093 fi
15094else
15095 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15096/* end confdefs.h. */
15097
15098int main(int argc, char **argv)
15099{
15100 static void *targets[1] = { &&LABEL1 };
15101 goto LABEL2;
15102LABEL1:
15103 return 0;
15104LABEL2:
15105 goto *targets[0];
15106 return 1;
15107}
15108
15109_ACEOF
15110if ac_fn_c_try_run "$LINENO"; then :
15111 ac_cv_computed_gotos=yes
15112else
15113 ac_cv_computed_gotos=no
15114fi
15115rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15116 conftest.$ac_objext conftest.beam conftest.$ac_ext
15117fi
15118
15119fi
15120
15121{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
15122$as_echo "$ac_cv_computed_gotos" >&6; }
15123case "$ac_cv_computed_gotos" in yes*)
15124
15125$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
15126
15127esac
15128# END_COMPUTED_GOTO
15129
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015130{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
15131$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000015132
Ned Deily3f1d0b32014-11-20 02:11:03 -080015133# ensurepip option
15134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
15135$as_echo_n "checking for ensurepip... " >&6; }
15136
15137# Check whether --with-ensurepip was given.
15138if test "${with_ensurepip+set}" = set; then :
15139 withval=$with_ensurepip;
15140else
15141 with_ensurepip=no
15142fi
15143
15144case $with_ensurepip in #(
15145 yes|upgrade) :
15146 ENSUREPIP=upgrade ;; #(
15147 install) :
15148 ENSUREPIP=install ;; #(
15149 no) :
15150 ENSUREPIP=no ;; #(
15151 *) :
15152 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
15153esac
15154{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
15155$as_echo "$ENSUREPIP" >&6; }
15156
15157
Guido van Rossum627b2d71993-12-24 10:39:16 +000015158# generate output files
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000015159ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000015160
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000015161ac_config_files="$ac_config_files Modules/ld_so_aix"
15162
Martin v. Löwis11437992002-04-12 09:54:03 +000015163cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015164# This file is a shell script that caches the results of configure
15165# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000015166# scripts and configure runs, see configure's option --config-cache.
15167# It is not useful on other systems. If it contains results you don't
15168# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015169#
Martin v. Löwis11437992002-04-12 09:54:03 +000015170# config.status only pays attention to the cache file if you give it
15171# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015172#
Skip Montanaro6dead952003-09-25 14:50:04 +000015173# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000015174# loading this file, other *unset* `ac_cv_foo' will be assigned the
15175# following values.
15176
15177_ACEOF
15178
Guido van Rossumf78abae1997-01-21 22:02:36 +000015179# The following way of writing the cache mishandles newlines in values,
15180# but we know of no workaround that is simple, portable, and efficient.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015181# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015182# Ultrix sh set writes to stderr and can't be redirected directly,
15183# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015184(
15185 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
15186 eval ac_val=\$$ac_var
15187 case $ac_val in #(
15188 *${as_nl}*)
15189 case $ac_var in #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015190 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
15191$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015192 esac
15193 case $ac_var in #(
15194 _ | IFS | as_nl) ;; #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015195 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
15196 *) { eval $ac_var=; unset $ac_var;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015197 esac ;;
15198 esac
15199 done
15200
Martin v. Löwis11437992002-04-12 09:54:03 +000015201 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +000015202 case $as_nl`(ac_space=' '; set) 2>&1` in #(
15203 *${as_nl}ac_space=\ *)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015204 # `set' does not quote correctly, so add quotes: double-quote
15205 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000015206 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015207 "s/'/'\\\\''/g;
15208 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Martin v. Löwiseba40652007-08-30 20:10:57 +000015209 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000015210 *)
15211 # `set' quotes correctly as required by POSIX, so do not add quotes.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015212 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000015213 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015214 esac |
15215 sort
15216) |
Martin v. Löwis11437992002-04-12 09:54:03 +000015217 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000015218 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000015219 t clear
Martin v. Löwiseba40652007-08-30 20:10:57 +000015220 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000015221 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15222 t end
Martin v. Löwiseba40652007-08-30 20:10:57 +000015223 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15224 :end' >>confcache
15225if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
15226 if test -w "$cache_file"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +010015227 if test "x$cache_file" != "x/dev/null"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015228 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
15229$as_echo "$as_me: updating cache $cache_file" >&6;}
Matthias Klose3cef2a92012-03-14 23:39:33 +010015230 if test ! -f "$cache_file" || test -h "$cache_file"; then
15231 cat confcache >"$cache_file"
15232 else
15233 case $cache_file in #(
15234 */* | ?:*)
15235 mv -f confcache "$cache_file"$$ &&
15236 mv -f "$cache_file"$$ "$cache_file" ;; #(
15237 *)
15238 mv -f confcache "$cache_file" ;;
15239 esac
15240 fi
15241 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015242 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015243 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
15244$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015245 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015246fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015247rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000015248
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015249test "x$prefix" = xNONE && prefix=$ac_default_prefix
15250# Let make expand exec_prefix.
15251test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000015252
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015253DEFS=-DHAVE_CONFIG_H
15254
Skip Montanaro6dead952003-09-25 14:50:04 +000015255ac_libobjs=
15256ac_ltlibobjs=
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015257U=
Skip Montanaro6dead952003-09-25 14:50:04 +000015258for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
15259 # 1. Remove the extension, and $U if already installed.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015260 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015261 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015262 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
15263 # will be set to the directory where LIBOBJS objects are built.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015264 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
15265 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000015266done
15267LIBOBJS=$ac_libobjs
15268
15269LTLIBOBJS=$ac_ltlibobjs
15270
15271
Martin v. Löwis11437992002-04-12 09:54:03 +000015272
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015273
Matthias Klose3cef2a92012-03-14 23:39:33 +010015274: "${CONFIG_STATUS=./config.status}"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015275ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000015276ac_clean_files_save=$ac_clean_files
15277ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015278{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
15279$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
15280as_write_fail=0
15281cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015282#! $SHELL
15283# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015284# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015285# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000015286# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015287
Martin v. Löwis11437992002-04-12 09:54:03 +000015288debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000015289ac_cs_recheck=false
15290ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000015291
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015292SHELL=\${CONFIG_SHELL-$SHELL}
15293export SHELL
15294_ASEOF
15295cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
15296## -------------------- ##
15297## M4sh Initialization. ##
15298## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000015299
Martin v. Löwiseba40652007-08-30 20:10:57 +000015300# Be more Bourne compatible
15301DUALCASE=1; export DUALCASE # for MKS sh
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015302if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015303 emulate sh
15304 NULLCMD=:
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015305 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000015306 # is contrary to our usage. Disable this feature.
15307 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000015308 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000015309else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015310 case `(set -o) 2>/dev/null` in #(
15311 *posix*) :
15312 set -o posix ;; #(
15313 *) :
15314 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015315esac
Martin v. Löwis11437992002-04-12 09:54:03 +000015316fi
Michael W. Hudson54241132001-12-07 15:38:26 +000015317
Skip Montanaro6dead952003-09-25 14:50:04 +000015318
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015319as_nl='
15320'
15321export as_nl
15322# Printing a long string crashes Solaris 7 /usr/bin/printf.
15323as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
15324as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
15325as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
15326# Prefer a ksh shell builtin over an external printf program on Solaris,
15327# but without wasting forks for bash or zsh.
15328if test -z "$BASH_VERSION$ZSH_VERSION" \
15329 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
15330 as_echo='print -r --'
15331 as_echo_n='print -rn --'
15332elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
15333 as_echo='printf %s\n'
15334 as_echo_n='printf %s'
15335else
15336 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
15337 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
15338 as_echo_n='/usr/ucb/echo -n'
15339 else
15340 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
15341 as_echo_n_body='eval
15342 arg=$1;
15343 case $arg in #(
15344 *"$as_nl"*)
15345 expr "X$arg" : "X\\(.*\\)$as_nl";
15346 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
15347 esac;
15348 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
15349 '
15350 export as_echo_n_body
15351 as_echo_n='sh -c $as_echo_n_body as_echo'
15352 fi
15353 export as_echo_body
15354 as_echo='sh -c $as_echo_body as_echo'
15355fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015356
15357# The user is always right.
15358if test "${PATH_SEPARATOR+set}" != set; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015359 PATH_SEPARATOR=:
15360 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
15361 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
15362 PATH_SEPARATOR=';'
15363 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000015364fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015365
Martin v. Löwiseba40652007-08-30 20:10:57 +000015366
15367# IFS
15368# We need space, tab and new line, in precisely that order. Quoting is
15369# there to prevent editors from complaining about space-tab.
15370# (If _AS_PATH_WALK were called with IFS unset, it would disable word
15371# splitting by setting IFS to empty value.)
Martin v. Löwiseba40652007-08-30 20:10:57 +000015372IFS=" "" $as_nl"
15373
15374# Find who we are. Look in the path if we contain no directory separator.
Matthias Klose3cef2a92012-03-14 23:39:33 +010015375as_myself=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015376case $0 in #((
Martin v. Löwiseba40652007-08-30 20:10:57 +000015377 *[\\/]* ) as_myself=$0 ;;
15378 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000015379for as_dir in $PATH
15380do
15381 IFS=$as_save_IFS
15382 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015383 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
15384 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000015385IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000015386
Martin v. Löwiseba40652007-08-30 20:10:57 +000015387 ;;
15388esac
15389# We did not find ourselves, most probably we were run as `sh COMMAND'
15390# in which case we are not to be found in the path.
15391if test "x$as_myself" = x; then
15392 as_myself=$0
15393fi
15394if test ! -f "$as_myself"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015395 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
15396 exit 1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015397fi
15398
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015399# Unset variables that we do not need and which cause bugs (e.g. in
15400# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
15401# suppresses any "Segmentation fault" message there. '((' could
15402# trigger a bug in pdksh 5.2.14.
15403for as_var in BASH_ENV ENV MAIL MAILPATH
15404do eval test x\${$as_var+set} = xset \
15405 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Martin v. Löwiseba40652007-08-30 20:10:57 +000015406done
15407PS1='$ '
15408PS2='> '
15409PS4='+ '
15410
15411# NLS nuisances.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015412LC_ALL=C
15413export LC_ALL
15414LANGUAGE=C
15415export LANGUAGE
Martin v. Löwiseba40652007-08-30 20:10:57 +000015416
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015417# CDPATH.
15418(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
15419
15420
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015421# as_fn_error STATUS ERROR [LINENO LOG_FD]
15422# ----------------------------------------
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015423# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
15424# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015425# script with STATUS, using 1 if that was 0.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015426as_fn_error ()
15427{
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015428 as_status=$1; test $as_status -eq 0 && as_status=1
15429 if test "$4"; then
15430 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
15431 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015432 fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015433 $as_echo "$as_me: error: $2" >&2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015434 as_fn_exit $as_status
15435} # as_fn_error
15436
15437
15438# as_fn_set_status STATUS
15439# -----------------------
15440# Set $? to STATUS, without forking.
15441as_fn_set_status ()
15442{
15443 return $1
15444} # as_fn_set_status
15445
15446# as_fn_exit STATUS
15447# -----------------
15448# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
15449as_fn_exit ()
15450{
15451 set +e
15452 as_fn_set_status $1
15453 exit $1
15454} # as_fn_exit
15455
15456# as_fn_unset VAR
15457# ---------------
15458# Portably unset VAR.
15459as_fn_unset ()
15460{
15461 { eval $1=; unset $1;}
15462}
15463as_unset=as_fn_unset
15464# as_fn_append VAR VALUE
15465# ----------------------
15466# Append the text in VALUE to the end of the definition contained in VAR. Take
15467# advantage of any shell optimizations that allow amortized linear growth over
15468# repeated appends, instead of the typical quadratic growth present in naive
15469# implementations.
15470if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
15471 eval 'as_fn_append ()
15472 {
15473 eval $1+=\$2
15474 }'
15475else
15476 as_fn_append ()
15477 {
15478 eval $1=\$$1\$2
15479 }
15480fi # as_fn_append
15481
15482# as_fn_arith ARG...
15483# ------------------
15484# Perform arithmetic evaluation on the ARGs, and store the result in the
15485# global $as_val. Take advantage of shells that can avoid forks. The arguments
15486# must be portable across $(()) and expr.
15487if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
15488 eval 'as_fn_arith ()
15489 {
15490 as_val=$(( $* ))
15491 }'
15492else
15493 as_fn_arith ()
15494 {
15495 as_val=`expr "$@" || test $? -eq 1`
15496 }
15497fi # as_fn_arith
15498
15499
Martin v. Löwiseba40652007-08-30 20:10:57 +000015500if expr a : '\(a\)' >/dev/null 2>&1 &&
15501 test "X`expr 00001 : '.*\(...\)'`" = X001; then
15502 as_expr=expr
15503else
15504 as_expr=false
15505fi
15506
15507if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
15508 as_basename=basename
15509else
15510 as_basename=false
15511fi
15512
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015513if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
15514 as_dirname=dirname
15515else
15516 as_dirname=false
15517fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015518
Martin v. Löwiseba40652007-08-30 20:10:57 +000015519as_me=`$as_basename -- "$0" ||
15520$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15521 X"$0" : 'X\(//\)$' \| \
15522 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015523$as_echo X/"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000015524 sed '/^.*\/\([^/][^/]*\)\/*$/{
15525 s//\1/
15526 q
15527 }
15528 /^X\/\(\/\/\)$/{
15529 s//\1/
15530 q
15531 }
15532 /^X\/\(\/\).*/{
15533 s//\1/
15534 q
15535 }
15536 s/.*/./; q'`
15537
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015538# Avoid depending upon Character Ranges.
15539as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15540as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15541as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15542as_cr_digits='0123456789'
15543as_cr_alnum=$as_cr_Letters$as_cr_digits
Martin v. Löwiseba40652007-08-30 20:10:57 +000015544
15545ECHO_C= ECHO_N= ECHO_T=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015546case `echo -n x` in #(((((
Martin v. Löwiseba40652007-08-30 20:10:57 +000015547-n*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015548 case `echo 'xy\c'` in
Martin v. Löwiseba40652007-08-30 20:10:57 +000015549 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015550 xy) ECHO_C='\c';;
15551 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
15552 ECHO_T=' ';;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015553 esac;;
15554*)
15555 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000015556esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015557
Martin v. Löwis11437992002-04-12 09:54:03 +000015558rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +000015559if test -d conf$$.dir; then
15560 rm -f conf$$.dir/conf$$.file
15561else
15562 rm -f conf$$.dir
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015563 mkdir conf$$.dir 2>/dev/null
Martin v. Löwiseba40652007-08-30 20:10:57 +000015564fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015565if (echo >conf$$.file) 2>/dev/null; then
15566 if ln -s conf$$.file conf$$ 2>/dev/null; then
15567 as_ln_s='ln -s'
15568 # ... but there are two gotchas:
15569 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
15570 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015571 # In both cases, we have to default to `cp -pR'.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015572 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015573 as_ln_s='cp -pR'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015574 elif ln conf$$.file conf$$ 2>/dev/null; then
15575 as_ln_s=ln
15576 else
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015577 as_ln_s='cp -pR'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015578 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015579else
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015580 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000015581fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015582rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
15583rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000015584
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015585
15586# as_fn_mkdir_p
15587# -------------
15588# Create "$as_dir" as a directory, including parents if necessary.
15589as_fn_mkdir_p ()
15590{
15591
15592 case $as_dir in #(
15593 -*) as_dir=./$as_dir;;
15594 esac
15595 test -d "$as_dir" || eval $as_mkdir_p || {
15596 as_dirs=
15597 while :; do
15598 case $as_dir in #(
15599 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
15600 *) as_qdir=$as_dir;;
15601 esac
15602 as_dirs="'$as_qdir' $as_dirs"
15603 as_dir=`$as_dirname -- "$as_dir" ||
15604$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15605 X"$as_dir" : 'X\(//\)[^/]' \| \
15606 X"$as_dir" : 'X\(//\)$' \| \
15607 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
15608$as_echo X"$as_dir" |
15609 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15610 s//\1/
15611 q
15612 }
15613 /^X\(\/\/\)[^/].*/{
15614 s//\1/
15615 q
15616 }
15617 /^X\(\/\/\)$/{
15618 s//\1/
15619 q
15620 }
15621 /^X\(\/\).*/{
15622 s//\1/
15623 q
15624 }
15625 s/.*/./; q'`
15626 test -d "$as_dir" && break
15627 done
15628 test -z "$as_dirs" || eval "mkdir $as_dirs"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015629 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015630
15631
15632} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000015633if mkdir -p . 2>/dev/null; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015634 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000015635else
Skip Montanarof0d5f792004-08-15 14:08:23 +000015636 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000015637 as_mkdir_p=false
15638fi
15639
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015640
15641# as_fn_executable_p FILE
15642# -----------------------
15643# Test if FILE is an executable regular file.
15644as_fn_executable_p ()
15645{
15646 test -f "$1" && test -x "$1"
15647} # as_fn_executable_p
15648as_test_x='test -x'
15649as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000015650
15651# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015652as_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 +000015653
15654# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015655as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015656
15657
Martin v. Löwis11437992002-04-12 09:54:03 +000015658exec 6>&1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015659## ----------------------------------- ##
15660## Main body of $CONFIG_STATUS script. ##
15661## ----------------------------------- ##
15662_ASEOF
15663test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015664
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015665cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15666# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000015667# report actual input values of CONFIG_FILES etc. instead of their
Martin v. Löwiseba40652007-08-30 20:10:57 +000015668# values after options handling.
15669ac_log="
Martin v. Löwis174440b2008-10-03 08:59:41 +000015670This file was extended by python $as_me 2.7, which was
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015671generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000015672
15673 CONFIG_FILES = $CONFIG_FILES
15674 CONFIG_HEADERS = $CONFIG_HEADERS
15675 CONFIG_LINKS = $CONFIG_LINKS
15676 CONFIG_COMMANDS = $CONFIG_COMMANDS
15677 $ $0 $@
15678
Martin v. Löwiseba40652007-08-30 20:10:57 +000015679on `(hostname || uname -n) 2>/dev/null | sed 1q`
15680"
15681
Martin v. Löwis11437992002-04-12 09:54:03 +000015682_ACEOF
15683
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015684case $ac_config_files in *"
15685"*) set x $ac_config_files; shift; ac_config_files=$*;;
15686esac
15687
15688case $ac_config_headers in *"
15689"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
15690esac
15691
15692
15693cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015694# Files that config.status was made for.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015695config_files="$ac_config_files"
15696config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000015697
Martin v. Löwiseba40652007-08-30 20:10:57 +000015698_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015699
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015700cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015701ac_cs_usage="\
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015702\`$as_me' instantiates files and other configuration actions
15703from templates according to the current configuration. Unless the files
15704and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000015705
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015706Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000015707
15708 -h, --help print this help, then exit
Martin v. Löwiseba40652007-08-30 20:10:57 +000015709 -V, --version print version number and configuration settings, then exit
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015710 --config print configuration, then exit
15711 -q, --quiet, --silent
15712 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000015713 -d, --debug don't remove temporary files
15714 --recheck update $as_me by reconfiguring in the same conditions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015715 --file=FILE[:TEMPLATE]
15716 instantiate the configuration file FILE
15717 --header=FILE[:TEMPLATE]
15718 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000015719
15720Configuration files:
15721$config_files
15722
15723Configuration headers:
15724$config_headers
15725
Benjamin Petersoncc8929b2016-08-03 22:01:32 -070015726Report bugs to <https://bugs.python.org/>."
Skip Montanaro89e975f2007-08-22 19:05:21 +000015727
Martin v. Löwiseba40652007-08-30 20:10:57 +000015728_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015729cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15730ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000015731ac_cs_version="\\
Martin v. Löwis174440b2008-10-03 08:59:41 +000015732python config.status 2.7
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015733configured by $0, generated by GNU Autoconf 2.69,
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015734 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000015735
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015736Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000015737This config.status script is free software; the Free Software Foundation
15738gives unlimited permission to copy, distribute and modify it."
Martin v. Löwiseba40652007-08-30 20:10:57 +000015739
15740ac_pwd='$ac_pwd'
15741srcdir='$srcdir'
15742INSTALL='$INSTALL'
Trent Nelsonf6407a12012-08-30 14:56:13 +000015743MKDIR_P='$MKDIR_P'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015744test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000015745_ACEOF
15746
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015747cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15748# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000015749ac_need_defaults=:
15750while test $# != 0
15751do
15752 case $1 in
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015753 --*=?*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000015754 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15755 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000015756 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000015757 ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015758 --*=)
15759 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15760 ac_optarg=
15761 ac_shift=:
15762 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015763 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000015764 ac_option=$1
15765 ac_optarg=$2
15766 ac_shift=shift
15767 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015768 esac
15769
Skip Montanaro6dead952003-09-25 14:50:04 +000015770 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000015771 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000015772 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15773 ac_cs_recheck=: ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015774 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015775 $as_echo "$ac_cs_version"; exit ;;
15776 --config | --confi | --conf | --con | --co | --c )
15777 $as_echo "$ac_cs_config"; exit ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015778 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000015779 debug=: ;;
15780 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000015781 $ac_shift
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015782 case $ac_optarg in
15783 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015784 '') as_fn_error $? "missing file argument" ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015785 esac
15786 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015787 ac_need_defaults=false;;
15788 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000015789 $ac_shift
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015790 case $ac_optarg in
15791 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15792 esac
15793 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015794 ac_need_defaults=false;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015795 --he | --h)
15796 # Conflict between --help and --header
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015797 as_fn_error $? "ambiguous option: \`$1'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015798Try \`$0 --help' for more information.";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015799 --help | --hel | -h )
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015800 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000015801 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
15802 | -silent | --silent | --silen | --sile | --sil | --si | --s)
15803 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015804
15805 # This is an error.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015806 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015807Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015808
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015809 *) as_fn_append ac_config_targets " $1"
Martin v. Löwiseba40652007-08-30 20:10:57 +000015810 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015811
15812 esac
15813 shift
15814done
15815
Skip Montanaro6dead952003-09-25 14:50:04 +000015816ac_configure_extra_args=
15817
15818if $ac_cs_silent; then
15819 exec 6>/dev/null
15820 ac_configure_extra_args="$ac_configure_extra_args --silent"
15821fi
15822
15823_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015824cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000015825if \$ac_cs_recheck; then
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015826 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015827 shift
15828 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
15829 CONFIG_SHELL='$SHELL'
Martin v. Löwiseba40652007-08-30 20:10:57 +000015830 export CONFIG_SHELL
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015831 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000015832fi
15833
Martin v. Löwis11437992002-04-12 09:54:03 +000015834_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015835cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015836exec 5>>config.log
15837{
15838 echo
15839 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
15840## Running $as_me. ##
15841_ASBOX
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015842 $as_echo "$ac_log"
Martin v. Löwiseba40652007-08-30 20:10:57 +000015843} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015844
Martin v. Löwiseba40652007-08-30 20:10:57 +000015845_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015846cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015847_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015848
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015849cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015850
15851# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000015852for ac_config_target in $ac_config_targets
15853do
Martin v. Löwiseba40652007-08-30 20:10:57 +000015854 case $ac_config_target in
15855 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
15856 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
15857 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
15858 "Mac/IDLE/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/IDLE/Makefile" ;;
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000015859 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
15860 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015861 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
15862 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000015863 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000015864 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015865
Matthias Klose3cef2a92012-03-14 23:39:33 +010015866 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015867 esac
15868done
15869
Martin v. Löwiseba40652007-08-30 20:10:57 +000015870
Martin v. Löwis11437992002-04-12 09:54:03 +000015871# If the user did not use the arguments to specify the items to instantiate,
15872# then the envvar interface is used. Set only those that are not.
15873# We use the long form for the default assignment because of an extremely
15874# bizarre bug on SunOS 4.1.3.
15875if $ac_need_defaults; then
15876 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15877 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
15878fi
15879
Skip Montanaro6dead952003-09-25 14:50:04 +000015880# Have a temporary directory for convenience. Make it in the build tree
Martin v. Löwiseba40652007-08-30 20:10:57 +000015881# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000015882# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015883# Hook for its removal unless debugging.
15884# Note that there is a small window in which the directory will not be cleaned:
15885# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000015886$debug ||
15887{
Matthias Klose3cef2a92012-03-14 23:39:33 +010015888 tmp= ac_tmp=
Martin v. Löwiseba40652007-08-30 20:10:57 +000015889 trap 'exit_status=$?
Matthias Klose3cef2a92012-03-14 23:39:33 +010015890 : "${ac_tmp:=$tmp}"
15891 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +000015892' 0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015893 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000015894}
Martin v. Löwis11437992002-04-12 09:54:03 +000015895# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000015896
Martin v. Löwis11437992002-04-12 09:54:03 +000015897{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015898 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Matthias Klose3cef2a92012-03-14 23:39:33 +010015899 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000015900} ||
15901{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015902 tmp=./conf$$-$RANDOM
15903 (umask 077 && mkdir "$tmp")
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015904} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Matthias Klose3cef2a92012-03-14 23:39:33 +010015905ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000015906
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015907# Set up the scripts for CONFIG_FILES section.
15908# No need to generate them if there are no CONFIG_FILES.
15909# This happens for instance with `./config.status config.h'.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015910if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015911
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015912
15913ac_cr=`echo X | tr X '\015'`
15914# On cygwin, bash can eat \r inside `` if the user requested igncr.
15915# But we know of no other shell where ac_cr would be empty at this
15916# point, so we can use a bashism as a fallback.
15917if test "x$ac_cr" = x; then
15918 eval ac_cr=\$\'\\r\'
15919fi
15920ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
15921if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015922 ac_cs_awk_cr='\\r'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015923else
15924 ac_cs_awk_cr=$ac_cr
15925fi
15926
Matthias Klose3cef2a92012-03-14 23:39:33 +010015927echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000015928_ACEOF
15929
Martin v. Löwiseba40652007-08-30 20:10:57 +000015930
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015931{
15932 echo "cat >conf$$subs.awk <<_ACEOF" &&
15933 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
15934 echo "_ACEOF"
15935} >conf$$subs.sh ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015936 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15937ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015938ac_delim='%!_!# '
15939for ac_last_try in false false false false false :; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015940 . ./conf$$subs.sh ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015941 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015942
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015943 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
15944 if test $ac_delim_n = $ac_delim_num; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015945 break
15946 elif $ac_last_try; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015947 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015948 else
15949 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000015950 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015951done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015952rm -f conf$$subs.sh
Martin v. Löwiseba40652007-08-30 20:10:57 +000015953
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015954cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Matthias Klose3cef2a92012-03-14 23:39:33 +010015955cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000015956_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015957sed -n '
15958h
15959s/^/S["/; s/!.*/"]=/
15960p
15961g
15962s/^[^!]*!//
15963:repl
15964t repl
15965s/'"$ac_delim"'$//
15966t delim
15967:nl
15968h
15969s/\(.\{148\}\)..*/\1/
15970t more1
15971s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
15972p
15973n
15974b repl
15975:more1
15976s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15977p
15978g
15979s/.\{148\}//
15980t nl
15981:delim
15982h
15983s/\(.\{148\}\)..*/\1/
15984t more2
15985s/["\\]/\\&/g; s/^/"/; s/$/"/
15986p
15987b
15988:more2
15989s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15990p
15991g
15992s/.\{148\}//
15993t delim
15994' <conf$$subs.awk | sed '
15995/^[^""]/{
15996 N
15997 s/\n//
15998}
15999' >>$CONFIG_STATUS || ac_write_fail=1
16000rm -f conf$$subs.awk
16001cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16002_ACAWK
Matthias Klose3cef2a92012-03-14 23:39:33 +010016003cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016004 for (key in S) S_is_set[key] = 1
16005 FS = ""
16006
16007}
16008{
16009 line = $ 0
16010 nfields = split(line, field, "@")
16011 substed = 0
16012 len = length(field[1])
16013 for (i = 2; i < nfields; i++) {
16014 key = field[i]
16015 keylen = length(key)
16016 if (S_is_set[key]) {
16017 value = S[key]
16018 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
16019 len += length(value) + length(field[++i])
16020 substed = 1
16021 } else
16022 len += 1 + keylen
16023 }
16024
16025 print line
16026}
16027
16028_ACAWK
Martin v. Löwiseba40652007-08-30 20:10:57 +000016029_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016030cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16031if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
16032 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
16033else
16034 cat
Matthias Klose3cef2a92012-03-14 23:39:33 +010016035fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016036 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016037_ACEOF
16038
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016039# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
16040# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Martin v. Löwiseba40652007-08-30 20:10:57 +000016041# trailing colons and then remove the whole line if VPATH becomes empty
16042# (actually we leave an empty line to preserve line numbers).
16043if test "x$srcdir" = x.; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016044 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
16045h
16046s///
16047s/^/:/
16048s/[ ]*$/:/
16049s/:\$(srcdir):/:/g
16050s/:\${srcdir}:/:/g
16051s/:@srcdir@:/:/g
16052s/^:*//
Martin v. Löwiseba40652007-08-30 20:10:57 +000016053s/:*$//
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016054x
16055s/\(=[ ]*\).*/\1/
16056G
16057s/\n//
Martin v. Löwiseba40652007-08-30 20:10:57 +000016058s/^[^=]*=[ ]*$//
16059}'
16060fi
16061
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016062cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016063fi # test -n "$CONFIG_FILES"
16064
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016065# Set up the scripts for CONFIG_HEADERS section.
16066# No need to generate them if there are no CONFIG_HEADERS.
16067# This happens for instance with `./config.status Makefile'.
16068if test -n "$CONFIG_HEADERS"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +010016069cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016070BEGIN {
16071_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000016072
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016073# Transform confdefs.h into an awk script `defines.awk', embedded as
16074# here-document in config.status, that substitutes the proper values into
16075# config.h.in to produce config.h.
16076
16077# Create a delimiter string that does not exist in confdefs.h, to ease
16078# handling of long lines.
16079ac_delim='%!_!# '
16080for ac_last_try in false false :; do
Matthias Klose3cef2a92012-03-14 23:39:33 +010016081 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
16082 if test -z "$ac_tt"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016083 break
16084 elif $ac_last_try; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016085 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016086 else
16087 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
16088 fi
16089done
16090
16091# For the awk script, D is an array of macro values keyed by name,
16092# likewise P contains macro parameters if any. Preserve backslash
16093# newline sequences.
16094
16095ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
16096sed -n '
16097s/.\{148\}/&'"$ac_delim"'/g
16098t rset
16099:rset
16100s/^[ ]*#[ ]*define[ ][ ]*/ /
16101t def
16102d
16103:def
16104s/\\$//
16105t bsnl
16106s/["\\]/\\&/g
16107s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16108D["\1"]=" \3"/p
16109s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
16110d
16111:bsnl
16112s/["\\]/\\&/g
16113s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16114D["\1"]=" \3\\\\\\n"\\/p
16115t cont
16116s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
16117t cont
16118d
16119:cont
16120n
16121s/.\{148\}/&'"$ac_delim"'/g
16122t clear
16123:clear
16124s/\\$//
16125t bsnlc
16126s/["\\]/\\&/g; s/^/"/; s/$/"/p
16127d
16128:bsnlc
16129s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
16130b cont
16131' <confdefs.h | sed '
16132s/'"$ac_delim"'/"\\\
16133"/g' >>$CONFIG_STATUS || ac_write_fail=1
16134
16135cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16136 for (key in D) D_is_set[key] = 1
16137 FS = ""
16138}
16139/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
16140 line = \$ 0
16141 split(line, arg, " ")
16142 if (arg[1] == "#") {
16143 defundef = arg[2]
16144 mac1 = arg[3]
16145 } else {
16146 defundef = substr(arg[1], 2)
16147 mac1 = arg[2]
16148 }
16149 split(mac1, mac2, "(") #)
16150 macro = mac2[1]
16151 prefix = substr(line, 1, index(line, defundef) - 1)
16152 if (D_is_set[macro]) {
16153 # Preserve the white space surrounding the "#".
16154 print prefix "define", macro P[macro] D[macro]
16155 next
16156 } else {
16157 # Replace #undef with comments. This is necessary, for example,
16158 # in the case of _POSIX_SOURCE, which is predefined and required
16159 # on some systems where configure will not decide to define it.
16160 if (defundef == "undef") {
16161 print "/*", prefix defundef, macro, "*/"
16162 next
16163 }
16164 }
16165}
16166{ print }
16167_ACAWK
16168_ACEOF
16169cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016170 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016171fi # test -n "$CONFIG_HEADERS"
16172
16173
16174eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
16175shift
16176for ac_tag
Martin v. Löwiseba40652007-08-30 20:10:57 +000016177do
16178 case $ac_tag in
16179 :[FHLC]) ac_mode=$ac_tag; continue;;
16180 esac
16181 case $ac_mode$ac_tag in
16182 :[FHL]*:*);;
Matthias Klose3cef2a92012-03-14 23:39:33 +010016183 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016184 :[FH]-) ac_tag=-:-;;
16185 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
16186 esac
16187 ac_save_IFS=$IFS
16188 IFS=:
16189 set x $ac_tag
16190 IFS=$ac_save_IFS
16191 shift
16192 ac_file=$1
16193 shift
16194
16195 case $ac_mode in
16196 :L) ac_source=$1;;
16197 :[FH])
16198 ac_file_inputs=
16199 for ac_f
16200 do
16201 case $ac_f in
Matthias Klose3cef2a92012-03-14 23:39:33 +010016202 -) ac_f="$ac_tmp/stdin";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016203 *) # Look for the file first in the build tree, then in the source tree
16204 # (if the path is not absolute). The absolute path cannot be DOS-style,
16205 # because $ac_f cannot contain `:'.
16206 test -f "$ac_f" ||
16207 case $ac_f in
16208 [\\/$]*) false;;
16209 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
16210 esac ||
Matthias Klose3cef2a92012-03-14 23:39:33 +010016211 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016212 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016213 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
16214 as_fn_append ac_file_inputs " '$ac_f'"
Martin v. Löwiseba40652007-08-30 20:10:57 +000016215 done
16216
16217 # Let's still pretend it is `configure' which instantiates (i.e., don't
16218 # use $as_me), people would be surprised to read:
16219 # /* config.h. Generated by config.status. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016220 configure_input='Generated from '`
16221 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
16222 `' by configure.'
Martin v. Löwiseba40652007-08-30 20:10:57 +000016223 if test x"$ac_file" != x-; then
16224 configure_input="$ac_file. $configure_input"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016225 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
16226$as_echo "$as_me: creating $ac_file" >&6;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000016227 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016228 # Neutralize special characters interpreted by sed in replacement strings.
16229 case $configure_input in #(
16230 *\&* | *\|* | *\\* )
16231 ac_sed_conf_input=`$as_echo "$configure_input" |
16232 sed 's/[\\\\&|]/\\\\&/g'`;; #(
16233 *) ac_sed_conf_input=$configure_input;;
16234 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000016235
16236 case $ac_tag in
Matthias Klose3cef2a92012-03-14 23:39:33 +010016237 *:-:* | *:-) cat >"$ac_tmp/stdin" \
16238 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016239 esac
16240 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016241 esac
16242
Martin v. Löwiseba40652007-08-30 20:10:57 +000016243 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000016244$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016245 X"$ac_file" : 'X\(//\)[^/]' \| \
16246 X"$ac_file" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000016247 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016248$as_echo X"$ac_file" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000016249 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16250 s//\1/
16251 q
16252 }
16253 /^X\(\/\/\)[^/].*/{
16254 s//\1/
16255 q
16256 }
16257 /^X\(\/\/\)$/{
16258 s//\1/
16259 q
16260 }
16261 /^X\(\/\).*/{
16262 s//\1/
16263 q
16264 }
16265 s/.*/./; q'`
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016266 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000016267 ac_builddir=.
16268
Martin v. Löwiseba40652007-08-30 20:10:57 +000016269case "$ac_dir" in
16270.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
16271*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016272 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000016273 # A ".." for each directory in $ac_dir_suffix.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016274 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000016275 case $ac_top_builddir_sub in
16276 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
16277 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
16278 esac ;;
16279esac
16280ac_abs_top_builddir=$ac_pwd
16281ac_abs_builddir=$ac_pwd$ac_dir_suffix
16282# for backward compatibility:
16283ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000016284
16285case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +000016286 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000016287 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +000016288 ac_top_srcdir=$ac_top_builddir_sub
16289 ac_abs_top_srcdir=$ac_pwd ;;
16290 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000016291 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016292 ac_top_srcdir=$srcdir
16293 ac_abs_top_srcdir=$srcdir ;;
16294 *) # Relative name.
16295 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
16296 ac_top_srcdir=$ac_top_build_prefix$srcdir
16297 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016298esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000016299ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000016300
Martin v. Löwis11437992002-04-12 09:54:03 +000016301
Martin v. Löwiseba40652007-08-30 20:10:57 +000016302 case $ac_mode in
16303 :F)
16304 #
16305 # CONFIG_FILE
16306 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016307
16308 case $INSTALL in
16309 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016310 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016311 esac
Trent Nelsonf6407a12012-08-30 14:56:13 +000016312 ac_MKDIR_P=$MKDIR_P
16313 case $MKDIR_P in
16314 [\\/$]* | ?:[\\/]* ) ;;
16315 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
16316 esac
Brett Cannon19fab762007-06-02 03:02:29 +000016317_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000016318
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016319cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000016320# If the template does not know about datarootdir, expand it.
16321# FIXME: This hack should be removed a few years after 2.60.
16322ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016323ac_sed_dataroot='
16324/datarootdir/ {
Martin v. Löwiseba40652007-08-30 20:10:57 +000016325 p
16326 q
16327}
16328/@datadir@/p
16329/@docdir@/p
16330/@infodir@/p
16331/@localedir@/p
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016332/@mandir@/p'
16333case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Martin v. Löwiseba40652007-08-30 20:10:57 +000016334*datarootdir*) ac_datarootdir_seen=yes;;
16335*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016336 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
16337$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000016338_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016339cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000016340 ac_datarootdir_hack='
16341 s&@datadir@&$datadir&g
16342 s&@docdir@&$docdir&g
16343 s&@infodir@&$infodir&g
16344 s&@localedir@&$localedir&g
16345 s&@mandir@&$mandir&g
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016346 s&\\\${datarootdir}&$datarootdir&g' ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016347esac
16348_ACEOF
16349
16350# Neutralize VPATH when `$srcdir' = `.'.
16351# Shell code in configure.ac might set extrasub.
16352# FIXME: do we really want to maintain this feature?
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016353cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16354ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000016355$extrasub
16356_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016357cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016358:t
16359/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016360s|@configure_input@|$ac_sed_conf_input|;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000016361s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016362s&@top_build_prefix@&$ac_top_build_prefix&;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000016363s&@srcdir@&$ac_srcdir&;t t
16364s&@abs_srcdir@&$ac_abs_srcdir&;t t
16365s&@top_srcdir@&$ac_top_srcdir&;t t
16366s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
16367s&@builddir@&$ac_builddir&;t t
16368s&@abs_builddir@&$ac_abs_builddir&;t t
16369s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
16370s&@INSTALL@&$ac_INSTALL&;t t
Trent Nelsonf6407a12012-08-30 14:56:13 +000016371s&@MKDIR_P@&$ac_MKDIR_P&;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000016372$ac_datarootdir_hack
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016373"
Matthias Klose3cef2a92012-03-14 23:39:33 +010016374eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
16375 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016376
Martin v. Löwiseba40652007-08-30 20:10:57 +000016377test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Matthias Klose3cef2a92012-03-14 23:39:33 +010016378 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
16379 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
16380 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016381 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016382which seems to be undefined. Please make sure it is defined" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016383$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016384which seems to be undefined. Please make sure it is defined" >&2;}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016385
Matthias Klose3cef2a92012-03-14 23:39:33 +010016386 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000016387 case $ac_file in
Matthias Klose3cef2a92012-03-14 23:39:33 +010016388 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
16389 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016390 esac \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016391 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016392 ;;
16393 :H)
16394 #
16395 # CONFIG_HEADER
16396 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016397 if test x"$ac_file" != x-; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016398 {
16399 $as_echo "/* $configure_input */" \
Matthias Klose3cef2a92012-03-14 23:39:33 +010016400 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
16401 } >"$ac_tmp/config.h" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016402 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Matthias Klose3cef2a92012-03-14 23:39:33 +010016403 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016404 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
16405$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016406 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016407 rm -f "$ac_file"
Matthias Klose3cef2a92012-03-14 23:39:33 +010016408 mv "$ac_tmp/config.h" "$ac_file" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016409 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016410 fi
16411 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016412 $as_echo "/* $configure_input */" \
Matthias Klose3cef2a92012-03-14 23:39:33 +010016413 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016414 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016415 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016416 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000016417
Martin v. Löwiseba40652007-08-30 20:10:57 +000016418
16419 esac
16420
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000016421
16422 case $ac_file$ac_mode in
16423 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
16424
16425 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000016426done # for ac_tag
16427
Guido van Rossum627b2d71993-12-24 10:39:16 +000016428
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016429as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000016430_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016431ac_clean_files=$ac_clean_files_save
16432
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016433test $ac_write_fail = 0 ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016434 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016435
Martin v. Löwis11437992002-04-12 09:54:03 +000016436
16437# configure is writing to config.log, and then calls config.status.
16438# config.status does its own redirection, appending to config.log.
16439# Unfortunately, on DOS this fails, as config.log is still kept open
16440# by configure, so config.status won't be able to write to it; its
16441# output is simply discarded. So we exec the FD to /dev/null,
16442# effectively closing config.log, so it can be properly (re)opened and
16443# appended to by config.status. When coming back to configure, we
16444# need to make the FD available again.
16445if test "$no_create" != yes; then
16446 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000016447 ac_config_status_args=
16448 test "$silent" = yes &&
16449 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000016450 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000016451 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000016452 exec 5>>config.log
16453 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16454 # would make configure fail if this is the last instruction.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016455 $ac_cs_success || as_fn_exit 1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016456fi
16457if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
16458 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
16459$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016460fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000016461
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016462
Martin v. Löwisf7afe952006-04-14 15:16:15 +000016463echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016464if test ! -f Modules/Setup
16465then
16466 cp $srcdir/Modules/Setup.dist Modules/Setup
16467fi
16468
Martin v. Löwisf7afe952006-04-14 15:16:15 +000016469echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016470if test ! -f Modules/Setup.local
16471then
16472 echo "# Edit this file for local setup changes" >Modules/Setup.local
16473fi
16474
16475echo "creating Makefile"
16476$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
16477 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000016478 Modules/Setup.local Modules/Setup
Skip Montanaro89e975f2007-08-22 19:05:21 +000016479
16480case $ac_sys_system in
16481BeOS)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016482 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000016483
16484 Support for BeOS is deprecated as of Python 2.6.
16485 See PEP 11 for the gory details.
16486 " >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016487$as_echo "$as_me: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000016488
16489 Support for BeOS is deprecated as of Python 2.6.
16490 See PEP 11 for the gory details.
16491 " >&2;}
16492 ;;
16493*) ;;
16494esac
16495
Neil Schemenauerc761fc82001-02-19 04:50:49 +000016496mv config.c Modules
Gregory P. Smith6d8fdfc2016-09-07 23:28:23 -070016497
16498if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
16499 echo "" >&6
16500 echo "" >&6
16501 echo "If you want a release build with all optimizations active (LTO, PGO, etc),"
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)b9999152016-11-20 21:19:36 +000016502 echo "please run ./configure --enable-optimizations" >&6
Gregory P. Smith6d8fdfc2016-09-07 23:28:23 -070016503 echo "" >&6
16504 echo "" >&6
16505fi